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