• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

jdk version Trouble....

 
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I have a very basic problem ragrding jdk version...ya, it sound starnge cause before staring preparing for SCJp,i shd have taken care..I have posted same question in "java beginners'" forum and submitting here as well ...hoping u cld guide me..
This is what i posted -


I am preparing for SCJP.I have java installed on my pc (Win NT operating system).I never bothered to chk version until I started preparing for SCJP.(I am appearing for JAVA 2).
The real problem is, when i type java -version at dos promt, it gives the output "java version 1.1.6".
But I can see jdk1.2.2 in window explorer plus, when i go to control panel / add-remove program...I can see Java2 SDK standard Edition v1.2.2
SO I shd see jdk1.2.2 , when I type java -version,isn't it???
isn't 1.1.6 and 1.2.2 r different.I am not able to run JQPlus also..
And download from Sun is getting cancelled in between.
I need Java2 ( i guess , that is jdk 1.2.2) ..how do i rectify my problem...
Please guide me
Thanx


Thanx again
 
Ranch Hand
Posts: 346
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
from ur given data , i can tell u tht Jdk1.2.2 is already installed on ur system
if it shows " Java 2 SDK Standard Edition v1.2.2 " in control panel
all u need to do , is to find in which directory exactly it is installed
( most probably jdk1.2.2 or whtever u renamed it ) and set path and classpath accordingly
( path is to be set to bin directory , like c:\jdk\bin , classpath to c:\jdk\lib
{ replace 'jdk' wid actual dir of jdk1.2.2 on ur PC ! } )
for more on classpath : http://java.sun.com/j2se/1.3/install-windows.html
Also u already have installed jdk1.1.6 on ur PC also , thts is wht shows up version to be '1.1.6'
actually the 'java' tool of jdk1.1.6 is wht u r invoking , when u r typing 'java -version', be cause ur
path variable is set to old-jdk , jdk1.1.6 tht means
I have 3 versions of jdk installed on my PC , just need to set classpath n path whichever
version i want to use , and they works
have chilling preparation ! n good-luck !

------------------
Gagan (/^_^\)
 
swati bannore
Ranch Hand
Posts: 201
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanx gagan,
Yes, I do have both the versions of Java and worst part is,control panel does not show the option of removing older version i.e. jdk1.1.6.
And Somehow, I have solve the problem and cld bring DOS prompt to say java 1.2.2
(interresting part was - if i change my dir to jdk1.2.2 and then execute java -version, it wld still display..java "1.1.6"...)
anyways, it is solved now
 
reply
    Bookmark Topic Watch Topic
  • New Topic