Help answer threads with 0 replies.
Go Back > Forums > Linux Forums > Linux - General
User Name
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.


  Search this Thread
Old 12-04-2004, 01:56 PM   #1
LQ Newbie
Registered: Nov 2004
Location: Edinburgh
Distribution: Mandrake Linux 10.1 Community
Posts: 8

Rep: Reputation: 0
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
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>(
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...

Last edited by paulmai; 12-04-2004 at 02:07 PM.
Old 12-04-2004, 06:06 PM   #2
LQ Newbie
Registered: Nov 2004
Posts: 13

Rep: Reputation: 0
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.
Old 12-04-2004, 07:51 PM   #3
LQ Newbie
Registered: Nov 2004
Location: Edinburgh
Distribution: Mandrake Linux 10.1 Community
Posts: 8

Original Poster
Rep: Reputation: 0
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.


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
windows java based app running on fedora core 3? linuxmandrake Linux - Software 2 06-18-2005 12:10 PM
error in running a java app in linux milo36472 Linux - Newbie 16 02-10-2005 12:44 AM
Running a Java App on Linux sxa Linux - Software 3 12-09-2004 06:26 PM
couldn't import swing in JAVA on REDHAT LINUX 9 nedian123 Programming 2 06-20-2004 02:47 AM
help with running a java app Soggy Linux - Software 7 11-20-2003 08:57 PM > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:48 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration