wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Wrong java version! Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Wrong java version!" Watch "Wrong java version!" New topic
Author

Wrong java version!

Arun raghvan
Ranch Hand

Joined: Aug 22, 2010
Posts: 75
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


[Thumbnail for path.jpg]

Jesper de Jong
Java Cowboy
Saloon Keeper

Joined: Aug 16, 2005
Posts: 14074
    
  16

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.


Java Beginners FAQ - JavaRanch SCJP FAQ - The Java Tutorial - Java SE 7 API documentation
Scala Notes - My blog about Scala
David Newton
Author
Rancher

Joined: Sep 29, 2008
Posts: 12617

(And please just copy and paste text when showing console output. Thanks!)
Arun raghvan
Ranch Hand

Joined: Aug 22, 2010
Posts: 75
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

Joined: Oct 12, 2001
Posts: 1179

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.


Regards, Rene Larsen
Dropbox Invite
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
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

Joined: Oct 27, 2005
Posts: 19649
    
  18

Even worse, it adds them at the start. And since the path is evaluated from left to right the Oracle path elements take precedence...


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
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

Joined: Aug 16, 2005
Posts: 14074
    
  16

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

Joined: Oct 27, 2005
Posts: 19649
    
  18

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

Joined: Aug 16, 2005
Posts: 14074
    
  16

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

Joined: Oct 27, 2005
Posts: 19649
    
  18

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

Joined: Aug 22, 2010
Posts: 75
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

Joined: Sep 29, 2008
Posts: 12617

The classpath is what Java uses to determine where to look for classes.
Arun raghvan
Ranch Hand

Joined: Aug 22, 2010
Posts: 75
But i never assigned value for classpath but ...i can execute in different directory.How is that so?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 37884
    
  22
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Wrong java version!
 
Similar Threads
Version of J2EE
how to know the string is number or charactor?
Error while accessing DB2 thru WSAD..yes it is the same problem. No..I cudnt solve it
Graphics
JFree Chart in iReport...help me!