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 / Tools / January 2008

Tip: Looking for answers? Try searching our database.

Jdk 1.6 will not compile: cannot access java.lang.Object

Thread view: 
rzeira@comcast.net - 17 Jan 2008 15:11 GMT
Hi all,

I just installed Jdk 1.6 update 4 and tried my first compilation. I
compiled something that previously compiled easily. However, with Jdk
1.6 I got the error:
SomeFile.java:45: cannot access java.lang.Object
bad class file: C:\Tools\Jdk16\jre\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.
    private UserRec currRec = null;

I compile directly with javac from a DOS prompt. I tried to compile
few other files and got the same results.

Please help!
Juha Laiho - 17 Jan 2008 16:37 GMT
rzeira@comcast.net said:
>I just installed Jdk 1.6 update 4 and tried my first compilation. I
>compiled something that previously compiled easily. However, with Jdk
[quoted text clipped - 8 lines]
>I compile directly with javac from a DOS prompt. I tried to compile
>few other files and got the same results.

Looks much like the "javac" executable you're running is from some
older JDK version. Check each directory on your %PATH% to find out
which javac you're actually running.
Signature

Wolf  a.k.a.  Juha Laiho     Espoo, Finland
(GC 3.0) GIT d- s+: a C++ ULSH++++$ P++@ L+++ E- W+$@ N++ !K w !O !M V
        PS(+) PE Y+ PGP(+) t- 5 !X R !tv b+ !DI D G e+ h---- r+++ y++++
"...cancel my subscription to the resurrection!" (Jim Morrison)

rzeira@comcast.net - 17 Jan 2008 16:52 GMT
Thanks for you reply!

However, I have only one javac.exe which came with JDK 1.6.0_04 and is
dated December 14, 2007. I think this version is defective. Does
anybody knows how to get one that is fixed?

Thanks
Roedy Green - 17 Jan 2008 18:20 GMT
> Does
>anybody knows how to get one that is fixed?

Follow the instructions at
http://mindprod.com/jgloss/jdk.html#UPGRADING

don't multipost.

See http://mindprod.com/jgloss/multiposting.html
Signature

Roedy Green, Canadian Mind Products
The Java Glossary, http://mindprod.com



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.