Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

java.lang.ExceptionInInitializerError in Windows XP 1

Status
Not open for further replies.

mikrom

Programmer
Mar 27, 2002
3,001
SK
I have an Java application for Windows. It works good in Windows NT 4.0,
but when I try to run it in Windows XP it crashes and I get this error:

Exception in thread "main" java.lang.ExceptionInInitializerError
at
at
at com.sun.java.swing.UIManager.maybeInitialize(UIManager.java:544)
at com.sun.java.swing.UIManager.getDefaults(UIManager.java:228)
at com.sun.java.swing.UIManager.getColor(UIManager.java:213)
at com.sun.java.swing.JPanel.<init>(JPanel.java:104)
at com.sun.java.swing.JPanel.<init>(JPanel.java:76)
at com.sun.java.swing.JRootPane.createGlassPane(JRootPane.java:416)
at com.sun.java.swing.JRootPane.<init>(JRootPane.java:361)
at com.sun.java.swing.JFrame.createRootPane(JFrame.java:583)
at com.sun.java.swing.JFrame.frameInit(JFrame.java:603)
at com.sun.java.swing.JFrame.<init>(JFrame.java:545)
at de.mmsoft.Application$SystemContext.<init>(Application.java:18)
at de.mmsoft.Launcher.boot(Compiled Code)
at de.mmsoft.Application.main(Application.java:43)

Does anybody know what this error means and how can I eliminate it?


 
In the meantime I solved this problem myself. The problem was not caused by Windows XP, but by the Java JIT compiler included in JRE and the Pentium IV processor in my new computer.

I use the JRE Version 1.1.8. This version includes the Symantec JIT compiler, which will not run on Pentium 4 systems.

So, I tried to turn off the JIT compiler by the command line switch -nojit and now my application is running ok on the new system.
 
Hey mikrom, I have to say a *big* thank you - I have just come across exactly the same problem, and now you have given me the solution! [thumbsup]

Do you know if this has any effect on application performance ?

Regards, SteveB.
 
Hello StevePB,

I am glad :), that the tip was helpful.
Now, about the performance:
Practically, I don't remarked, that my application runs slower. However, theoretically the execution speed should be a little bit decreasing, because JIT speeds up.
But in my case, the execution speed was not so important. My task was only: bring to run the old legacy software installation procedure (written in Java) on new XP machines.

If you need the JIT compiler to increase the performance of your application, you can try to use other Java Virtual Machine (not JRE), or the higher version of JRE (if available). I don't know, I'm not a Java specialist.
 
A note to all those out there that are having a similar problem with their java programs... since pt4s are and will be more common. Sun insisted they were developing a fix for this, was to be released in March 2003, but never was. Instead of trying to fix it to work, fix it to not work... The JIT is not working with the pt4 architecture so do this. Goto your java plugin folder normally in program files/java or java plugin x.xx open the bin and look for the dll file that is affecting the jit, it will be called something jit.dll or you can do a find file for jit and that dll should pop up. Rename that file .old and you should be able to run the java interface you have been trying to run since you got the new processor. If you are on a network and are having authentication errors in your java enviro, try going into your java plugin control panel interface and set your network access to unrestricted.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top