LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 01-25-2011, 10:15 AM   #1
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Rep: Reputation: 16
Question java.lang.UnsupportedClassVersionError: Bad version number in .class file


Hi Everybody.

I have installed a software and ever thing was OK and the
installation completed. I also defined the PATH to the
software on my "bashrc".

But when I types "reflex" insted of running the program it
gives the following error.

I would be very grateful if someone could help me in this matter.

With best regards,
Hassan


pc@ubuntu:~$ reflex
[null] Exception in thread "main" java.lang.UnsupportedClassVersionError: Bad version number in .class file
[null] at java.lang.ClassLoader.defineClass1(Native Method)
[null] at java.lang.ClassLoader.defineClass(ClassLoader.java:620)
[null] at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
[null] at java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
[null] at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
[null] at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
[null] at java.security.AccessController.doPrivileged(Native Method)
[null] at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
[null] at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
[null] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
[null] at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
[null] at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
Exception in thread "main" Java returned: 1
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:105)
at org.kepler.build.runner.Kepler.main(Kepler.java:78)
Caused by: Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.kepler.build.Run.runSuite(Run.java:298)
at org.kepler.build.Run.run(Run.java:202)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:101)
... 1 more
--- Nested Exception ---
Java returned: 1
at org.apache.tools.ant.taskdefs.Java.execute(Java.java:108)
at org.kepler.build.Run.runSuite(Run.java:298)
at org.kepler.build.Run.run(Run.java:202)
at org.kepler.build.modules.ModulesTask.execute(ModulesTask.java:101)
at org.kepler.build.runner.Kepler.main(Kepler.java:78)
pc@ubuntu:~$

Last edited by msbstar; 01-25-2011 at 10:54 AM.
 
Old 01-26-2011, 07:37 AM   #2
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
Quote:
But when I types "reflex" instead of running the program it
gives the following error
May be you are not supposed to use the command 'reflex' ?

Which program is this about ?
And which Linux OS are you using ? Like Fedora 14, CentOS 5.5, etc. etc.
When answered, then somebody may have a chance to solve your issues.

Please read :
http://www.linuxquestions.org/linux/...Ask_a_Question
http://linuxsilo.net/docs/smart-questions_en.html
..
 
Old 01-26-2011, 07:58 AM   #3
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Original Poster
Rep: Reputation: 16
Hi knudfl,

Thanks for replying to my post.
I am using Ubuntu 9.10. and I have installed "reflex" which
is an astronomical software. Its source is from here:

"http://www.eso.org/sci/software/reflex/"

Thanks.
 
Old 01-27-2011, 04:41 AM   #4
JZL240I-U
Senior Member
 
Registered: Apr 2003
Location: Germany
Distribution: openSuSE Tumbleweed-KDE, Mint 21, MX-21, Manjaro
Posts: 4,629

Rep: Reputation: Disabled
What version of java do you run, is it up to date? Try "java -v" and compare it to the current version. HTH.
 
Old 01-27-2011, 06:55 AM   #5
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen DK
Distribution: PCLinuxOS2023 Fedora38 + 50+ other Linux OS, for test only.
Posts: 17,511

Rep: Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641Reputation: 3641
http://www.eso.org/sci/software/reflex
>> wget ftp://ftp.eso.org/pub/dfs/reflex/install_uves_reflex
> 'install_uves_reflex' ( script, to download and install reflex.)


Running 'reflex' the way you try : Probably not possible ?
( reflex must be executed from Reflex/software/bin to find its data files, etc.)

I can run it in three ways : 1) The full path,
/home/knudfl/Reflex/software/bin/reflex
2) cd /home/knudfl/Reflex/software/bin/ && ./reflex
2a) You can also make a "start-reflex" script with that command,
and copy it to /usr/local/bin/ .

3) cd /usr/local/bin/ && ln -s /home/knudfl/Reflex/software/bin/reflex
..... And then you have 'reflex' in your path.

.

Last edited by knudfl; 01-27-2011 at 07:07 AM.
 
Old 01-27-2011, 03:11 PM   #6
msbstar
Member
 
Registered: Jan 2010
Distribution: Ubuntu 10.4
Posts: 122

Original Poster
Rep: Reputation: 16
Hi knudfl,

Thanks.
I did what you suggested and it work.

Thanks a lot for your helpful comments.

Best regards,
Hassan
 
  


Reply

Tags
reflex


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
unrecognized class file version : when running simple Java program yuubouna Linux - Newbie 1 11-27-2008 11:25 PM
Exception in thread "main" java.lang.NoClassDefFoundError: org/aspectj/lang/Signature canonas Linux - Software 3 06-16-2008 04:00 AM
how to run .class java file? rabbit2345 Programming 2 01-24-2008 10:43 AM
Exception in thread "main" java.lang.UnsupportedClassVersionError manolakis Programming 2 01-20-2007 10:56 AM
executing java class file niranjan_mr Linux - Software 1 12-27-2004 02:03 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 01:40 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