Two Laptop Bag*
The moose likes Beginning Java and the fly likes jdk 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 "jdk version" Watch "jdk version" New topic
Author

jdk version

Shafian Kisna
Ranch Hand

Joined: Oct 25, 2005
Posts: 70
Hi everyone,

Could I know how can I check which version of jdk is my system running on?
I have 1.5 and 1.4.2(previously running on my system).

Kindly assist.

Thanks & Best Regards
SK
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

java -version
will tell you which version is in the PATH.


[My Blog]
All roads lead to JavaRanch
Shafian Kisna
Ranch Hand

Joined: Oct 25, 2005
Posts: 70
i have set the version in the classpath but it dun seem to be updating.....
could i know if there is a way to check in the ms dos prompt??

thanks!
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I was referring to the PATH, not the CLASSPATH.
Open a DOS prompt, and type : java -version
Shafian Kisna
Ranch Hand

Joined: Oct 25, 2005
Posts: 70
Hi,

Thanks I got it...

Best Regards
SK
Subhajit Mitra
Greenhorn

Joined: Jun 06, 2006
Posts: 21
try this...

c:\> SET PATH=C:\<java install dir>\bin;%PATH%
c:\> java -version

put double quote "C:\<java install dir>\bin" if install dir has blank space (eg: PROGRAM FILES)
if u have multiple java, try...

c:\> SET PATH=C:\<java1.5 install dir>\bin;C:\<java1.4 install dir>\bin;%PATH%
c:\> java -version

although it will only show java1.5 version as it is first in the PATH

to check containt of PATH Environment variable use

c:\> echo %PATH%
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: jdk version
 
Similar Threads
Head First Question
Eclipse version supports 1.4
Assertion Doubt.
Running java program from another java program
do earlier versions of jboss support java 6 - help!