bluej-logo BlueJ
Search the BlueJ site

 
 
home
about BlueJ
download
documentation
extensions
help & Info
resources

FREQUENTLY ASKED QUESTIONS

Section 1: General Questions

Section 2: Technical questions

1. Installation problems

Linux / Unix :

Windows:

MacOS:

2. Runtime questions

General:

Linux / Unix:

Windows:

MacOS:

 

Answers:

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. Rosenberg.

    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 again?

 

Section 2: Technical questions

Installation problems

(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.

(Windows) "BlueJ could not find any Java systems. A JDK/J2SDK must be installed to
run BlueJ."

    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".

Where is the lib directory on MacOS?

Tip 12 in the tips archive answers this question.

       

Runtime questions

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: you cannot specify arbitrary arguments on Mac OS, although you can specify particular properties and their desired values (i.e. the equivalent of the -D argument). To do this, 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.

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?

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.

(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.

(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) "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.

Error: Javaw.exe crashes with an error mentioning fonts

Sun's website notes that some javaw.exe Application Errors can be caused by font problems within Windows. The "Fonts" folder in Windows is rather sensitive and if it is set up incorrectly, it can cause system-wide problems that affect javaw.exe.

If you get this error, check your Windows\Fonts\ (or Winnt\Fonts\) folder. You're looking for shortcuts to other font files. The "Fonts" folder should only contain regular font files. Shortcuts to font files in other locations will cause problems in the folder. If you find a shortcut to a font file, locate the font file it is pointing to and copy that font to the "Fonts" folder. Then delete the shortcut. Do this for every shortcut you find in "Fonts". Then reboot the computer and try to Run BlueJ again.

If that doesn't work you can try some more drastic troubleshooting techniques.

In some situations, simply "opening" each font file can fix this problem.

If all else fails, back up your font files to a safe location and delete them from the Fonts directory. Add each font file back in to the Fonts directory, one at a time, and try BlueJ. If you get the javaw error, then you know the font you just added is causing the problem.

This piece of advice was found on Borland Developer Network.

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 asked again.

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 BlueJ).

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:

bluej.windows.customUNCHandler=true

(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.

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:

bluej.vm.args=-Dsun.java2d.ddoffscreen=false
bluej.windows.vm.args=-Dsun.java2d.ddoffscreen=false

This has solved the problem in at least one case.

Execution does 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.

I 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.

The solution: configure localhost traffic not to use the proxy server.

Here is how: 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 get BlueJ to use Java 5 on MacOS X?

With modern MacOS X versions, Java 5 (or 6) is the default.

When Java 5 was initially released for MacOS X, it was not the default and BlueJ would continue to use Java 1.4. The instructions to change this are here.

(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:

#bluej.lookAndFeel=crossplatform

So that it reads:

bluej.lookAndFeel=crossplatform

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.

 

Not found?

If the answer to your question was not in the list, please read How to ask for help.

 
 
 

Discussion Group

bluej-discuss

Announcements

For notificaton of new releases, subscribe to: BlueJ-announce

 
Bug Parade
View or submit bugs

maintained by
Michael Kölling
.