Problems running a Java Swing app under Linux
I am not sure if anyone will be able to help with this as the question is fairly specialised. I am attempting to run a Java application that uses Swing, it is a small UML modelling application supplied by my university.
It can be downloaded from http://www.dcs.napier.ac.uk/~kab/jeRome/jeRome.html The application runs just fine under Windows but under linux it crashes with the following error.... [paul@x1-6-XX-XX-XX-XX-XX-XX paul]$ java jerome.Rome PROGRAM START... (do not close this window) Exception in thread "main" java.lang.NullPointerException at javax.swing.ImageIcon.<init>(ImageIcon.java:138) at window.RomeSplash.showSplash(Unknown Source) at jerome.Rome.main(Unknown Source) I have set up all the required CLASSPATH and PATH environment variables for the application (as per the windows batch file) I admit that I have managed to get this to run under linux before and I know that the solution is quite simple but I cannot remember how to solve this problem. Any help would be appreciated. May I also add that I tested that Swing was working by making a small app that generates a JFrame, that works fine... Thanks in advance... Paul |
My best guess is that you have to edit source where images are referenced.
You might find them in the form of "C:\xxxxx\yyyy\zzz.gif". Change them to "//xxxxx/yyyy/zz.gif" If that does not work let me know. |
Thanks for the reply, that was more or less the problem. I have been investigating this with one of my mates from uni, we found that the classloader does not seem to like loading resources from outside of a JAR file.
Extracting the jar and altering the classpath eventually got it running. A kludge I know, but I know the application author so hopefully he can be persuaded to fix the code. Thanks for all your help, it is appreciated. |
All times are GMT -5. The time now is 04:43 PM. |