This week's book giveaway is in the Clojure forum.
We're giving away four copies of Clojure in Action and have Amit Rathore and Francis Avila on-line!
See this thread for details.
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Wrong java version!

 
Arun raghvan
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
After installing java 6 update 20 ....i still get the version as 1.3 ,can someone could help me...and java 1.3 is not there in control panel
path.jpg
[Thumbnail for path.jpg]
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is your PATH environment variable set to? Are you sure you do not have Java 1.3 installed somewhere?

Do you have Oracle database client software installed? Older versions of the Oracle client software installed a Java 1.3 JDK along. Make sure the bin directory of your Java 6 JDK is in the PATH before any other Java installations on your system.
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
(And please just copy and paste text when showing console output. Thanks!)
 
Arun raghvan
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Jesper Young wrote: Older versions of the Oracle client software installed a Java 1.3 JDK along


Your right ,i have Oracle 9i .

PATH:
F:\oracle\ora92\bin;D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;JAVA_HOME\bin;

JAVA_HOME
;F:\Java\jdk1.6.0_03
 
Rene Larsen
Ranch Hand
Posts: 1179
Eclipse IDE Mac OS X
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just delete "C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;" from your path - oracle will work anyway.
 
Campbell Ritchie
Sheriff
Pie
Posts: 47232
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oracle has a reputation for installing older versions of Java and adding them to your PATH just where they are most annoying.
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Even worse, it adds them at the start. And since the path is evaluated from left to right the Oracle path elements take precedence...
 
Campbell Ritchie
Sheriff
Pie
Posts: 47232
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob Prime wrote:Even worse, it adds them at the start. ...
That's what I meant by "most annoying."
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Arun raghvan wrote:PATH:
F:\oracle\ora92\bin;D:\oracle\ora92\bin;C:\Program Files\Oracle\jre\1.3.1\bin;C:\Program Files\Oracle\jre\1.1.8\bin;JAVA_HOME\bin;

JAVA_HOME
;F:\Java\jdk1.6.0_03

Change your PATH to the following:

F:\oracle\ora92\bin;D:\oracle\ora92\bin;F:\Java\jdk1.6.0_03\bin

Note: Do not use "JAVA_HOME" literally in your PATH. Windows will not understand that.
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's why you enclose it in % symbols:
I have both JAVA_HOME and ANT_HOME on my path like that, and it works like a charm.
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Pie
Posts: 15150
31
Android IntelliJ IDE Java Scala Spring
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Rob: In my experience that doesn't always work correctly, in some versions of Windows (?) it might set PATH before it sets JAVA_HOME, and then you'd have a literal "%JAVA_HOME%" in your path instead of the real path.
 
Rob Spoor
Sheriff
Pie
Posts: 20372
44
Chrome Eclipse IDE Java Windows
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I've used this on several versions, including 32-bit Windows XP SP3 and both 32-bit and 64-bit Windows Server 2003 R2 SP2, and it has worked on all so far.
 
Arun raghvan
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
So why do we use classpath?? ...i'm am able to run the program ! but some specify to use class path can i know . why?
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The classpath is what Java uses to determine where to look for classes.
 
Arun raghvan
Ranch Hand
Posts: 75
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
But i never assigned value for classpath but ...i can execute in different directory.How is that so?
 
Campbell Ritchie
Sheriff
Pie
Posts: 47232
52
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If there is no system or user classpath, the JVM looks in the current directory. It is like having a default classpath of . which would be overwritten by a system classpath.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic