LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
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.

Notices


Reply
  Search this Thread
Old 12-04-2004, 12:56 PM   #1
paulmai
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
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

Last edited by paulmai; 12-04-2004 at 01:07 PM.
 
Old 12-04-2004, 05:06 PM   #2
nlasystems
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, 06:51 PM   #3
paulmai
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.
 
  


Reply


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 11:10 AM
error in running a java app in linux milo36472 Linux - Newbie 16 02-09-2005 11:44 PM
Running a Java App on Linux sxa Linux - Software 3 12-09-2004 05:26 PM
couldn't import swing in JAVA on REDHAT LINUX 9 nedian123 Programming 2 06-20-2004 01:47 AM
help with running a java app Soggy Linux - Software 7 11-20-2003 07:57 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 05:55 AM.

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