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



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!
.



Relevant Pages

  • Jdk 1.6 will not compile: cannot access java.lang.Object
    ... I just installed Jdk 1.6 update 4 and tried my first compilation. ... class file has wrong version 49.0, ... I compile directly with javac from a DOS prompt. ...
    (comp.lang.java.programmer)
  • Re: How do I import a user defined class into VisualStudio .net J#
    ... > I'm using Visual Studio .NET with J#. ... > windowyou get a class file. ... > One example if you have a java file called Test.java and you compile this ...
    (microsoft.public.dotnet.vjsharp)
  • Re: Alternative to JVM
    ... compile class file, but can run Java program with help of a different ... language grammer tree to a 2-address / 3-address instruction set. ... class file from Parse Tree directly. ...
    (comp.lang.java.machine)
  • Re: dependency-detection in java - Take 2
    ... expensive than a full compile? ... determine "relevant" changes between each new .class file and it's ... method-implementations or private members were changed. ...
    (comp.lang.java.programmer)
  • Re: Reuse code on multiple pages of project
    ... > If you use Visual Studio it will do the compile for you and place it in the bin ... > directory AFAIK. ... > drop the class file in the App_Code folder and after importing the namespace you are ...
    (microsoft.public.dotnet.framework.aspnet)