Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / First Aid / January 2006

Tip: Looking for answers? Try searching our database.

class file has wrong version 49.0, should be 48.0

Thread view: 
Michael - 13 Jan 2006 14:53 GMT
Hi I am having great problems getting DrJava to run on my machine any ideas
this is the error I keep getting,
any help to resolve this would be greatly appreciated

Michael.

1 error found:
File: C:\Documents and Settings\Michael\Desktop\java
samples\11\demo1\Application1.java  [line: 2]
Error: cannot access java.lang.Object
bad class file: C:\Program
Files\Java\jre1.5.0_04\lib\rt.jar(java/lang/Object.class)
class file has wrong version 49.0, should be 48.0
Please remove or make sure it appears in the correct subdirectory of the
classpath.
Fabien Bergeret - 13 Jan 2006 15:45 GMT
> Hi I am having great problems getting DrJava to run on my machine any ideas
> this is the error I keep getting,
[quoted text clipped - 11 lines]
> Please remove or make sure it appears in the correct subdirectory of the
> classpath.

You compile with a java 1.5, and you execute with a java 1.4
To make sure : type java -version in a terminal
If the asumption is true, then you'll have to change your PATH varible
to reference the right jre
Michael - 13 Jan 2006 16:57 GMT
Thanks for that, after looking into it your right, but how can i change the
settings?

unfortunitly i have just about had enough of java and uni for this week!
i just hate not getting something to work, i bet its so simple too.
Thanks
Michael
>> Hi I am having great problems getting DrJava to run on my machine any
>> ideas this is the error I keep getting,
[quoted text clipped - 16 lines]
> If the asumption is true, then you'll have to change your PATH varible to
> reference the right jre
Fabien Bergeret - 16 Jan 2006 08:49 GMT
> Thanks for that, after looking into it your right, but how can i change the
> settings?
[quoted text clipped - 24 lines]
>>If the asumption is true, then you'll have to change your PATH varible to
>>reference the right jre

Obviously, you're using Windows. So here is the procedure (on Windows
200) (menu labels are translated from French to English, and maybe not
exactely the same).
Start->Paramters->Configuration Panel->System->Advanced->Environment
variables
Find PATH, select it, modify button, insert the path to the 1.5 java.exe
at the beginning of the line (; as a separator), OK, OK.
Start a new cmd, and try java -version. Version should now be 1.5
Roedy Green - 13 Jan 2006 20:15 GMT
On Fri, 13 Jan 2006 14:53:38 GMT, "Michael"
<mhiggins@REMOVEMEblueyonder.co.uk> wrote, quoted or indirectly quoted
someone who said :

>Files\Java\jre1.5.0_04\lib\rt.jar(java/lang/Object.class)
>class file has wrong version 49.0, should be 48.0

Try uninstalling all your JDKS and JREs and installing the latest one
1.5.0_06.

See http://mindprod.com/jgloss/jdk.html

It sounds like pieces from two different JDKS are getting muddled
together.
Signature

Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.