Section 1: General Questions
Section 2: Technical questions
1. Installation problems
Linux / Unix:
2. Runtime questions
Linux / Unix:
Section 1: General Questions
How much does BlueJ cost?
BlueJ is, and will remain, free for all users.
What's the licensing deal?
Here it is:
Copyright, licensing and redistribution
The copyright © for BlueJ is held by M. Kölling and J.
The BlueJ system and the tutorial are available under the GNU General Public
License version 2 with the Classpath Exception.
For more information see the BlueJ License.
What are the installation instructions
Section 2: Technical questions
Can I run BlueJ 3.0+ on Java 5?
BlueJ 3.0 is not supported on Java 5. It may work, but has not been tested on Java 5, and potential problems may not be fixed in the future. If you use BlueJ 3.0, it is recommended that you use Java 6. If you cannot use Java 6, you can use BlueJ 3.0 with Java 5, but we offer no technical support. Alternatively, you can use BlueJ 2.5.3, which is fully compatible with BlueJ 3.0 and Java 5.
(Linux/Unix) Installer failed to open: java.io.IOexception:
No space left on device
During the installation process, BlueJ needs to write some files.
It attempts to write those to the /tmp directory. The error most
likely indicates, that you do not have write permission to
the system's tmp directory.
If this is the case, you can start java and tell it to use a
different directory for temporary files:
java -Djava.io.tmpdir=/something/something -jar bluej-200.jar
Another possibility is that you are out of disk space
altogether. Worth checking as well.
could not find any Java systems. A JDK/J2SDK must be installed
Before it can run, BlueJ requires that a Java development system (also called a JDK or
J2SDK) is installed on your system. If you
get this message, then no Java system was found.
You should download J2SDK from the Sun Microsystems Java website
and install it. You can get it here: http://java.sun.com/javase/downloads/
Make sure to get the JDK (not just the JRE). Avoid JDK "bundles" (JDK with Java EE, or with Netbeans) - the correct option is labelled (something like) "JDK 6 Update 16".
(Windows) How do I perform a "silent installation"?
If you are a system administrator you may wish to perform a scripted or "silent" installation of BlueJ. You can use the standard Windows MSI installation tools with the new MSI installer. For example to install BlueJ with all the default settings but without the GUI, you can use:
msiexec /qn /L* logfile.txt /i bluej-307.msi
(The "/qn" turns off the GUI, the "/L* logfile.txt" logs to a file so you can check if the install succeeded afterwards - look at the end of the file - and the "/i bluej-307.msi" tells it which installer to install from.)
If you want to customise the settings, then here's the full set of properties that you might want to tweak for a 32-bit install:
msiexec /qn /L* logfile.txt /i bluej-307.msi ALLUSERS=no INSTALLDIR="C:\Program Files\BlueJ" INSTALLASSOCIATIONS=1 INSTALLMENUSHORTCUT=1 INSTALLDESKTOPSHORTCUT=1 JDKVERSION="1.6" JDKHOME="C:\Program Files\Java\jdk1.6.0_26"
You can leave off any that you don't want to alter from the default setting. By default, the JDKVERSION and JDKHOME are auto-detected, the values above are just examples. The two JDK properties are a pair: either specify both of them, or neither. All the other properties are independent of each other, and can be added or removed individuall; specify "" (an empty pair of double-quotes) as the property value in order to turn a setting off. For instance, to prevent creation of a desktop shortcut:
msiexec /qn /L* logfile.txt /i bluej-307.msi ALLUSERS=no INSTALLDIR="C:\Program Files\BlueJ" INSTALLASSOCIATIONS=1 INSTALLMENUSHORTCUT=1 INSTALLDESKTOPSHORTCUT="" JDKVERSION="1.6" JDKHOME="C:\Program Files\Java\jdk1.6.0_26"
is the lib directory on MacOS?
Tip 12 in the tips archive answers this question.
When I start BlueJ, the "New class" and "Compile" buttons are disabled!
Most likely, you don't have any project open. You need to open a project, or create a new project, before you can create classes and compile them. Use the "Open Project..." or "New Project..." command from the Project menu (see the tutorial for more information!).
How do I pass command line arguments
to "main" in BlueJ?
How can I use a custom library (that
came with my textbook)?
Sometimes you want your programs to import classes from a custom
library, either one given to you by a textbook author, or one
you made yourself. How to do this is explained in Tip
5 in the "Tip of the Week" archive.
I'm following the tutorial, but can't create objects or inspect classes!
Some people get confused when they right click a class and the only options are "Open Editor", "Compile", "Inspect" (which is greyed out) and "Remove". The tutorial shows another option, "new Staff()" (where "Staff" is the name of the class) which doesn't seem to be present.
This problem is easily solved - the class simply needs to be compiled. The best way to do this is to use the "Compile" button which appears at the left hand side of the BlueJ window - this will compile all classes which are presently uncompiled. Alternatively the "Compile" option available in a Class's popup menu can be used to compile that class by itself.
Once a class is compiled, the grey diagonal stripes across the class will disappear and the "new Staff()" (or equivalent) option becomes available.
How can I pass arguments to the Java Virtual Machine which BlueJ runs on?
BlueJ actually runs two Java VMs: One is for BlueJ itself, and the other runs user code (for instance if you instantiate a class the resulting object is created in the user VM).
To specify arguments for the user VM, use the bluej.vm.args property in bluej.defs (see Configuring BlueJ).
To specify VM arguments for the primary VM, you need to do something different according to the operating system you are using:
- Windows: use the bluej.windows.vm.args property in bluej.defs
- Linux/Unix/equivalent: edit the "bluej" shell script which is created by the installer (in the directory where you installed BlueJ), and modify the last line (which launches BlueJ).
- Mac OS: Control-click the BlueJ icon, and choose "show package contents" from the popup menu; then, double-click the Contents folder, and then the Info.plist file (which should cause the properties editor to open). Expand the "Root" tree and then the "Java" tree, and the "Properties" tree appears below. You can then add new property name/value pairs (equivalent to the command-line argument "-Dname=value") to the "Properties" tree. You can also create a new key "VMOptions" as a child of the "Java" tree, and specify additional command-line arguments as its value. Before you can do this you need to have the Apple Developer Tools installed - the Property List Editor is part of the developer tools; you can find them on the Mac OS installation disc.
Be warned that changing the Java VM arguments is generally unnecessary and if done improperly can prevent BlueJ from functioning correctly.
How can I specify the file encoding that BlueJ uses?
Since BlueJ 3.0.5, encoding is maintained per-project and defaults to UTF-8 for new projects. The encoding is specified in the 'project.charset' setting of the package.bluej file (in the project root).
For older versions of BlueJ (before 3.0.5):
You need to change the "file.encoding" property to a support character encoding name ("UTF-8" or "ISO-8859-1" for example - a list of character set names is available here, though java does not support them all).
You can do this by passing
-Dfile.encoding=UTF-8 (for example) as an argument to the Java Virtual Machine. See the FAQ question above for how to do this. You should probably specify the same encoding on both the main and the user VM.
I wrote a program that asks for input (using Scanner class, System.in.read(...), java.io.* classes). When I run it, it does nothing, and just keeps running forever!
If your program requests input, then you must supply the input before the program can continue running! What is happening is that your program is waiting (indefinitely) for the input that it has asked for.
Generally, you can open the terminal from the 'view' menu and then type into it. Press 'enter' after supplying the input (the terminal input is line buffered).
As a better solution, you should have your program output a prompt (eg. "Please enter your name") before trying to read input. That will cause the terminal window to open automatically.
(Linux) Printing and Page setup don't work
There is a Java bug which prevents printing in some circumstances (please note the bug has been fixed in recent JDKs).
A suggested workaround is to change the orientation for every printer to something other than "automatic rotation" (using your system's printer configuration utility).
(Linux) Error: "BlueJ was unable to create a virtual machine (VM) to execute projects..."
On Linux, this problem can be caused by Security Enhanced Linux ("SELinux") or overly restrictive firewall rules. Consult your distribution's documentation to find out to disable or correctly configure SELinux and/or the firewall. More information is available on our firewall information page.
If you are running Debian "Sid" (the "unstable" Debian release) and you get this error message, it may be because of an apparent incompatibility or bug with Java. Some users have been able to resolve this by editing the file "/etc/sysctl.d/bindv6only.conf" and changing the setting "net.ipv6.bindv6only" from 1 to 0, and restarting the computer. However, we recommend that you do not run the unstable Debian release (or any other "unstable" Linux distribution or operating system) if you are not able to resolve problems like these on your own.
(Windows) "Open Project", "New Project" appear to do nothing (Dialogs don't open)
BlueJ when running on Windows uses the "Windows look-and-feel" provided by java, by default. The implementation of the look-and-feel is somewhat less robust than one might hope and it sometimes causes problems. This usually manifests itself as file dialogs failing to open (for instance, the "new project", "open project", etc commands in the project menu appear to do nothing when they are clicked).
If you see this problem, you should first make sure you are running the latest Java update. Older Java versions are more likely to have problems than newer versions.
An entry in Sun's bug database which relates to this problem is here. There are some suggested workarounds in that entry.
There is also a BlueJ-specific workaround for the issue, and that is to disable the use of the Windows look-and-feel in BlueJ. This involves editing the "bluej.defs" configuration file and changing the "bluej.lookAndFeel" setting to "crossplatform". (Just remove the '#' at the beginning of the existing line in the file). BlueJ's appearance is somewhat uglier when this is done, however the file dialogs should no longer fail to appear.
For more help on editing the bluej.defs file, see http://www.bluej.org/help/archive.html#tip4 or consult the reference manual.
(Windows) BlueJ doesn't start (Splash screen shows, but BlueJ window doesn't appear)
There is a Java bug which can cause this problem. If this bug is affecting you, the BlueJ debug log will contain a stack trace with (at some point) a message something like:
Caused by: java.lang.IllegalArgumentException: 181193932 incompatible with Text- specific LCD contrast key
Supposedly this bug is fixed in Java 7.
It is also possible to resolve this problem by running "Cleartype Tuner" as described in this blog post.
(Windows) "Open Project" dialog (and other file choosers) are extremely slow
This can be the result of a Java bug (fixed for Java 6 Update 10 and Java 7). When you have large zip files in the folders that you browse through, the bug causes the file chooser window to be extremely slow to respond.
The easiest solution is to move the zip files into a sub-folder which is "out of the way".
(Windows) On launching BlueJ: "This application has failed to start because MSVCR71.dll was not found"
Update 7/10/2009: This problem is believed fixed in recent versions of BlueJ (2.5.2+)
Although this message may appear, it is generally harmless as after clicking "Ok" BlueJ continues to launch (the error message is generated by Windows, not by BlueJ, and is clearly incorrect because the application hasn't failed to start at all).
Copying the MSVCR71.DLL file from your JDK's "jre\bin" subdirectory into the directory in which BlueJ is installed will prevent the error message from reoccurring.
Error: "Bluej was unable to create
a virtual machine (VM) to execute projects".
As the full message text states, this problem is normally caused by firewall software interfering with BlueJ's operation. More information on how to deal with this issue is available here.
Another possible cause of this problem is that characters in the path to your project (including the project name) are not representable in the system character set. This often occurs when you use accented characters (or non-English characters) in your project path, and is actually due to a Java bug. In this case the easiest solution is to rename/move your projects to a location without the troublesome characters.
If you cannot resolve the problem, you will need to contact the BlueJ support team.
(Windows) Error: "Couldn't find the bluej.Boot class"
The most common cause of this problem is that only an old JDK (Java 5 JDK) is installed. You need the Java 6 or Java 7 JDK to run BlueJ.
You can download the JDK here:
Then, use the "select VM" utility (from the start menu) to choose the newer JDK for BlueJ.
asks for the JDK location on every startup - how can I fix this?
The situation is usually this: on a multi-user installation,
the system administrator installs and starts BlueJ, including
the selection of the Java version (JDK/J2SDK). BlueJ runs fine.
But when other users start BlueJ, they are prompted every time
for the JDK location.
The reason are write restrictions to the Windows registry. On
Windows, BlueJ remembers the selected JDK version by writing
an entry into the user space of the registry. If the registry
is write protected, or if it is restored to its original state
on every login, this information is lost, and the user will be
There are two solutions available.
The first is to give users write access to the Windows registry.
If this is not practical (for example in some lab environments)
then BlueJ can be explicitly configured to use a specific JDK,
using a property in bluej.defs (see Tip
4 in the tips archive for general info about configuring
Set the 'bluej.windows.vm' property in bluej.defs to the path
of the JDK you want to use. This property is commented out by
default. If it is set, BlueJ will not check the registry,
not ask the user, but just use this Java version and start.
(Windows) Problems occur after opening a project from a network location
This problem affects BlueJ versions 2.0.4 and later. It is due to a java bug (see the Sun bug database here and BlueJ bug database here). This bug has been fixed in Java 6.
BlueJ 2.0.5 and later incorporate a workaround for this problem, but it must be enabled by editing the
bluej.defs configuration file and uncommenting the following setting:
(You just need to remove the '#' from the beginning of the line). You might prefer to add the setting to the
bluej.properties file instead, as it will then apply to all versions of BlueJ.
(Windows) There are visual artifacts on the BlueJ windows (black areas, distorted text, etc)
Visual artifacts - black areas, distorted text, etc - are usually a result of either a display driver bug or a Java bug. Try updating your display drivers (see here for Windows 7) and make sure your Java JDK is up-to-date. Remember to run the "select VM" utility to ensure that BlueJ runs with your most recent Java version.
On my laptop, BlueJ runs unbearably slowly if I disconnect the AC power (i.e. if I am running using battery power)
This is a problem which affects some laptops. It may be due to video driver problems, so it's worth trying to update your video drivers if possible.
The problem affects Java applications other than BlueJ and there is a bug in Sun's bug database regarding the issue.
The suggested fix is to edit the
bluej.defs configuration file and enter the following settings:
This has solved the problem in at least one case.
not work on MacOS with a network
On MacOS 10.2 and later, execution in BlueJ can fail when several
Macintoshes on the same network have the same computer name (set
in System Preferences/Sharing).
Solution: ensure that different machines have different names.
am using MacOS, and I cannot create objects
If you are on MacOS, and you try to create an object and it
never finishes (the message
"Creating object..." stays in the status bar),
the reason may be the use of a proxy server for network access.
BlueJ uses sockets for communicating between two local virtual
machines, and this is affected by the system's network settings.
If your organisation uses a proxy, this may be the cause.
solution: configure localhost traffic not to use the proxy
Here is how:
In recent versions of OS X, including Snow Leopard, open your System Preferences, go to the Network panel, click Advanced... and select the Proxies tab. Add "localhost" (without the quotes) to the Bypass proxy settings box.
On older versions of OS X, open your System Preferences,
go to the Network panel, click Configure and
Proxies for your network connection. Add "localhost" (without
the quotes) to the Bypass Proxy Settings box.
How do I know if I have the correct Java version for BlueJ on MacOS X?
BlueJ 3.0+ requires Java 6 and previous versions (2.5.0+) require Java 5.
On Mac OS X 10.4 (Tiger), only Java 5 is available. On Mac OS X 10.5 (Leopard), Java 6 is available with an update (10.5.2) but only on 64-bit Intel processor systems (not on systems with a PowerPC, Intel Core or Intel Core Duo processor).
What this means is: you will not be able to run BlueJ 3.0+ on a Mac with OS X 10.4 (Tiger), nor on some Macs with OS X 10.5 (Leopard). You can however run BlueJ 2.5.3 on these systems.
Regardless of which OS X version you have:
You must make sure that the correct Java version is active in order to run BlueJ. To do this, run the "Java Preferences" application (Tiger: Applications / Utilities / Java / J2SE 5.0 / Java Preferences; Leopard/Snow Leopard: Applications / Utilities / Java Preferences), choose the "General" tab, and move Java SE 6 (or Java SE 5 if you do not have Java SE 6) to the top of the list. If you do not see Java SE 6 in the list, you will not be able to run BlueJ 3.0+.
(MacOS) The "BlueJ" menu is non-functional (and the other menus don't appear)
There appears to be a bug in Apple's Java (Mac OS X 10.6.2, Java 1.6.0_17) which prevents BlueJ's menus from working when certain languages are selected as the preferred language via the system preferences.
One workaround is to set English as the preferred language.
Another workaround is to set BlueJ to use the "cross platform" look-and-feel rather than the "Aqua" (Mac OS X native) look-and-feel. To do this, edit the "bluej.defs" file (see tip of the week #12) and remove the '#' at the beginning of the line which reads:
So that it reads:
This will make BlueJ use the (uglier) "cross platform" look-and-feel, but at least the menus (which will appear at the top of the BlueJ window) will be functional.
If the answer to your question was not in the list, please read
How to ask for help.