System.nanoTime

I had the following error when I try to compile a java program that have a System.nanoTime method:

TimerRes.java:96: cannot resolve symbol

symbol : method nanoTime ()

location: class java.lang.System

count1 = System.nanoTime();

I checked for the JRE and JDK installation and it seems to be correct:

J2SE Development Kit 5.0 Update 6

J2SE Runtime Environment 5.0 Update 6

Java 2 Runtime Environment, SE v1.4.2_10

Java 2 SDK, SE v1.4.2_10

I installed the Java 3D 1.3.2 by unzipping it into the jre directory version 1.5.

I cannot understand where is the problem....maybe the classpath?

Thanks for the help.

[683 byte] By [adercole25a] at [2007-10-2 16:15:01]
# 1

hello,

may be you have installed java 5, but are you sure the compiler you are using is not of lower version. i mean you check before compile check this.

java -version

C:\>java -version

java version "1.5.0_01"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_01-b08)

Java HotSpot(TM) Client VM (build 1.5.0_01-b08, mixed mode, sharing)

this is what i found on my system. so please check this.

Aniruddha-Herea at 2007-7-13 17:04:16 > top of Java-index,Other Topics,Java Game Development...
# 2

I also verified that:

java version "1.5.0_06"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_06-b05)

Java HotSpot(TM) Client VM (build 1.5.0_06-b05, mixed mode, sharing)

really I noted that I don't have javac.exe program into my installation directory C:\java15.

Than I used the javac.exe of the 1.4 version from the C:\java14 directory.

Thanks.

adercole25a at 2007-7-13 17:04:16 > top of Java-index,Other Topics,Java Game Development...
# 3
I solved it.I installed again JRE and JDK and now it compile.....MIRACLE!!!!Thanks.
adercole25a at 2007-7-13 17:04:16 > top of Java-index,Other Topics,Java Game Development...