[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Compiling for older version of java

joel wrote:
Mark Dexter wrote:

Hi Joel. The application hangs, both when I try to run the Jar and when I try to run JChessboard.java from inside Eclipse. It hangs on line 955 when I debug. It draws a transparent frame and hangs. Am I missing something needed to run the app? Once I get it working here, I can play with it on Linux. Thanks. Mark

Mark:

That's a bug that pops up occasionally - haven't figured out why just yet. Just kill the java or javaw process and try it again. It will start.

--Joel

Hi Joel. It appears to work as expected on my Windows and Linux systems. That is, if I have Windows / Preferences / Java / Compiler / Compiler compliance level 6.0, create a jar (e.g. jchessboad16.jar) and then try to run it on my Linux machine (which has 1.5 JRE), I get the message "Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file". (Note that I don't have any project-specific settings, so the default preferences is the only relevant setting. If you have project-specific settings, I guess you would change those instead.)

If I change the compiler compliance level to 5.0, create a new Jar file, it works on my Linux machine. Both jar files execute on my Windows system.

So, as they say, "it works fine on my machine" (which is Eclipse 3.3.0). So it would appear to be something about your environment rather than something about the program. You could prove that by trying it with a simple hello world jar file. Hope this helps. Mark

P.S. The hang-up bug in the program does not seem to be consistent. On the Linux machine, I only got the Jar file to run correctly once out of several attempts. On my Windows system, it seems to work about 1/3 of the time.