Jonelo's Java FAQs
für
Deutsch bitte hier klicken
If you have trouble to run one of my Java applications you find an answer
here, probably. If not, please contact me at jonelo@jonelo.de
What do I need to download - the JRE or the
JDK?
The JRE (Java Runtime Environment) is required to run a Java
application. The JRE is much smaller than the JDK (Java Development Kit).
If you want to recompile my applications or develop your own applications,
you need the JDK.
Where can I get the JRE or JDK?
The following links take you to the vendors of a JRE or JDK
which is suitable for your operating system (this list is not exhaustive):
I have a problem with the NumericalChameleon
Please read the specific FAQs
for the NumericalChameleon.
I have a problem with Jacksum
Please read the specific
FAQs for Jacksum
I have a problem with BigAl
Please read the specific
FAQs for BigAl
If I doubleclick on a jar, the java application
does not start. What's the problem?
Usually this problem occurs only on Windows. There are many
root causes. Fortunately simple solutions exist.
A program has stolen the .jar association
This is the most common root cause. If you have installed Java the
first time, the file type called "jar" is assigned to javaw.exe correctly.
"jar" is an abbreviation for "java archive" and javaw.exe is the correct
program to execute a .jar. However, on Windows any other program can steal
a file type at any time even it is already associated with a program. Many
zip programs prefer to do this, because a jar is stored in the .zip format.
If you doubleclick on a .jar, your pack program opens the file, rather
than javaw runs the program, because your pack program ignores the meta
information which is also stored in a .jar.
Solution: You can fix this problem with the jarfix
program.
The application doesn't have a GUI
The program you would like to launch doesn't have a graphical user
interface (GUI). For example, BigAl and Jacksum are command line tools
and therefore, nothing graphical will appear.
Solution: Open a new terminal at you operating system (on Windows
it is known as "command prompt") and enter the commands you find in the
readme.txt.
Failed to load Main-Class manifest attribute
The jar file contains no meta information. This is ok, if the jar represents
a library classes rather than a real application. Of course, in this case
there is nothing to launch. Don't care about it.
Solution: It make no sense to try to launch a program library.
A bug in Java 1.3
If you are using JRE or JDK < 1.4 on Windows, and the jar file is
stored in a subdirectory with a blank (e. g. "Program Files") you run into
a small bug and the application won't start. The bug is fixed in JRE/JDK
1.4 and later.
Solution: Upgrade to JRE 1.4 or later or fix the problem with
the jarfix program.
The Java VM crashes
The Java application crashes, because the Java VM crashes. Probably,
a log file called "hs_err_pid*.log" will be created which can be give some
detail information why the crash occurs. Read "My Java
Application crashes, what can I do?"
My Java Application crashes, what can I do?
If a Java-Application crashes, usually the Java VM crashes.
The reason of the crash can be a bug in the Java-Application or a bug in
the Java VM.
If the Java-Application is the one to blame, in most cases it's a wrong
implementation of JNI. But, my programs don't use JNI, they are 100% Java.
Therefore, if one of my Java-Applications crashes, it is a bug in the Java
VM.
However, in most cases, an upgrade
to the latest Java release will fix your problem.
On Windows, you can have also a crash due to some bad Windows Fonts.
Due to the fact, that this happens only on older Windows-Systems, the bug#
4482430
is fixed in the Java Runtime Environment 5.0. If you have an older JRE,
you can workaround the bug.
If you have such a crash, a log file will be created (usually this file
has form hs_err_pid*.log), containing an error message like this:
An unexpected exception has been
detected in native code outside the VM.
Unexpected Signal : EXCEPTION_ACCESS_VIOLATION
occurred at PC=0x6D1C36EF
Function=[Unknown.]
Library=(N/A)
NOTE: We are unable to locate the
function name symbol for the error
just occurred. Please refer to release documentation for possible
reason and solutions.
Current Java thread:
at sun.awt.font.NativeFontWrapper.registerFonts(Native
Method)
...
In this case, copy all four standard font files called "arial.ttf,
cour.ttf, times.ttf and wingding.ttf" from your Windows font
folder to a folder of your choice (e. g. c:\fonts) and do a
set JAVA_FONTS=c:\fonts
in your DOS prompt window, then run the application. The application
should not crash again.
Alternatively you can do a
set JAVA2D_DEBUGFONTS=1
in your DOS prompt window, then run the application. You will get a
log of font activity. The last font file opened is usually the one to blame.
Remove that font file and repeat the procedure described above until no
further bad font will be found.
|