Campbell Ritchie wrote:Most likely, you have compiled the .java files with a more recent version of "javac" than the version of "java" you are using to execute it.
Please use copy and paste not screenshots.
Carey Brown wrote:The 'public' that should be in front of the word 'class' is missing.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
John de Michele wrote:
Did you change your path to make sure that the 1.6 version of java and javac are being called?
Suvojit Chakraborty wrote:
path:H:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Java\jdk1.6.0_20\bin;C:\Program Files\Java\jre6
Maneesh Godbole wrote:
What is C:\Program Files\Oracle\jre\1.3.1\bin;? Jre as in Java JRE?
Maneesh Godbole wrote:
Suvojit Chakraborty wrote:
path:H:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;%SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;C:\Program Files\Microsoft SQL Server\100\Tools\Binn\;C:\Program Files\Microsoft SQL Server\100\DTS\Binn\;C:\Program Files\Java\jdk1.6.0_20\bin;C:\Program Files\Java\jre6
What is C:\Program Files\Oracle\jre\1.3.1\bin;? Jre as in Java JRE?
The System will pick up the first JDK/JRE it finds. Ideally you should have only one JAVA_HOME variable on your system which points to your Java installation directory.
C:\Documents and Settings\suvojit123>javac -version
javac 1.6.0_20
C:\Documents and Settings\suvojit123>java -version
java version "1.6.0_20"
Java(TM) SE Runtime Environment (build 1.6.0_20-b02)
Java HotSpot(TM) Client VM (build 16.3-b01, mixed mode, sharing)
Maneesh Godbole wrote:You mean the path, not classpath.
Like I mentioned before, the system will pick up the first JDK/JRE it finds.
I am guessing, someone installed some Oracle related stuff on your system. Maybe it came bundled with the 1.3 version?
To avoid criticism do nothing, say nothing, be nothing. -Elbert Hubbard. Please critique this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
|