| Section 1: General Questions
Section 2: Technical questions
1. Installation problems
Linux / Unix :
Windows:
MacOS:
2. Runtime questions
general:
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 BlueJ system and the tutorial are freely available to
anyone 'as is' for use and non-commercial distribution. The
system and its documentation may be redistributed freely. Disassembly
of the system is prohibited. Alteration and reuse of substantial
parts of the documentation only with explicit permission from
the authors.
No part of the BlueJ system or its documentation may be sold
for profit or included in a package that is sold for profit
without written authorisation of the authors.
The copyright © for BlueJ is held by M. Kölling and
J. Rosenberg.
What are the installation instructions
again?
Section 2: Technical questions
Installation problems
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.
Error: "BlueJ
could not find any Java systems. A JDK/J2SDK must be installed
to
run BlueJ."
BlueJ requires that a Java system (also called a Java2 SDK or
J2SDK) is installed on your system before it can run. 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: java.sun.com/j2se
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.
(Linux) Printing and Page setup don't work
There is a Java bug which prevents printing in some circumstances.
A suggested workaround is to change the orientation for every printer to something other than "automatic rotation" (using your system's printer configuration utility).
"Open Project", "New Project" appear to do nothing
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 even on Windows XP machines it sometimes causes problems. Also, the Java 5.0 (and earlier) implementation of the Windows look-and-feel fails miserably on Windows Vista. 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.
There is a 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. 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".
BlueJ can't create objects and I'm running
ZoneAlarm 6.
If early versions of Zone Alarm 6 is installed it seems to affect BlueJ's ability
to communicate with its second debug VM that is used to create
objects and called methods upon them (recent updates of Zone Alarm 6 don't seem to have this problem).
Even disabling Zone Alarm
6 once installed has no effect. You should try updating Zone Alarm if you are experiencing this problem.
If that doesn't work, there are two options. The first is the more extreme: uninstalling
ZoneAlarm 6. The second option is to manually reconfigure BlueJ
to use a different communication mechanism with the second VM.
You need to edit the bluej.defs file (see Tip
4 for from the tips
archive for help on how to find and edit this file), and change
the following line:
#bluej.vm.transport=dt_shmem
to:
bluej.vm.transport=dt_shmem
(That is, just remove the '#' from
the beginning of the line).
Due to a bug in BlueJ 2.1.2, you shouldn't use this setting in that version (also applies to 2.1.0 and 2.1.1).
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 (which an option available from the Control Panel). You can either change the system setting, or rename/move your projects to a location without the troublesome characters. This problem is actually due to a Java bug.
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.
Problems occur after opening a project from a network location (Windows)
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?
The instructions to do this are here.
How can I change the character encoding used for source files (MacOS X)?
Ctrl-click the BlueJ application package (BlueJ.app) and choose "Show Package Contents". The file Info.plist should be visible just inside the contents folder - double click it to open in the properties editor. The editor presents a tree-like structure; you need to open the java sub-tree, and then select the properties sub-tree underneath that. Click the "New Child" button and specify a key of "file.encoding" with a value specifying a character encoding ("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 should also, generally, change the file encoding for the user VM by adding "-Dfile.encoding=UTF-8" (or equivalent for the chosen character set) to the bluej.vm.args setting in the bluej.defs file (see tip-of-the-week #12 for information on how to edit this file).
Not found?
If the answer to your question was not in the list, please read
How to ask for help.
|