Error while compiling java file using J2SE 1.5.0

Dear Sir,

I'm getting the following error while compiling the java file.The code is also given.

package test;

public class TestRowSet {

public TestRowSet() {

}

}

"TestRowSet.java": cannot access java.lang.Object,bad class file: D:\Program Files\Java\jdk1.5.0\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. at line 4, column 1

Please help me out.

--Suketu Naik.

[549 byte] By [Suketu_Naik] at [2007-9-30 19:32:08]
# 1
I am guessing that the compiler you are using is a previous version, not a 1.5 version. It seems to be complaining that java.lang.Object is a newer version than what it is expecting. How are you compiling?
atmguy at 2007-7-7 0:17:27 > top of Java-index,Administration Tools,Sun Connection...
# 2

Thanks for your suggestion.

But I'm compiling within "Borland JBuilder 9.0". I've set the JDK path of the current project to point to the path of JDK 1.5.0 . I've also tried to compile at command prompt with "javac". I'm getting the same error of "Undefinedclassloader" with long StatckTrace.

Suketu_Naik at 2007-7-7 0:17:27 > top of Java-index,Administration Tools,Sun Connection...
# 3
The prior answer is correct, somehow you are mixing two different versions of Java.Try compiling from the command line, it should work. I don't use that IDE, sorry, can't help fix it.
ChuckBing at 2007-7-7 0:17:27 > top of Java-index,Administration Tools,Sun Connection...
# 4

> But I'm compiling within "Borland JBuilder 9.0". I've

> set the JDK path of the current project to point to

> the path of JDK 1.5.0 . I've also tried to compile at

> command prompt with "javac". I'm getting the same

> error of "Undefinedclassloader" with long StatckTrace.

>

I don't know anything about JBuilder either. If you use the command prompt and enter the full path to the 1.5 javac.exe then that will prove whether the issue is using an older javac or not. For example "c:\j2sdk1.5.0_01\bin\javac HelloWorld.java"

atmguy at 2007-7-7 0:17:27 > top of Java-index,Administration Tools,Sun Connection...