• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

java -version

 
Paul O'Neill
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have recently installed the same jre version (1.4.2_13) of Java on two servers. I let it create the default folder C:\Program Files\Java\j2re1.4.2_13. I've changed my path environment variable on both to point to this directory. When I type java -version, one server says it's build 1.4.2_13-b06 and the other says it's build 1.4.2-b28. I expect the first one but I've no idea where this b-28 is coming from. What am I missing?
 
Rob Spoor
Sheriff
Pie
Posts: 20610
63
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When you install th JRE, it also puts the java.exe and javaw.exe files inside the Windows\System32 directory. As this directory is probably before your JRE home on the path, that one is taken.

1.4.2-b28 is a version of 1.4.2, without the _13. As the JRE installation usually overwrites these files, it seems that someone has installed an older JRE after you've installed JRE 1.4.2_13.
 
Jan van Mansum
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you add "C:\Program Files\Java\j2re1.4.2_13" to your path or "C:\Program Files\Java\j2re1.4.2_13\bin"? (It should be the latter.)

Also, did you append or prepend it to your existing path? It may be that there are other versions of java installed that are found first.

In this thread someone had a similar problem with different java versions.
[ November 02, 2007: Message edited by: Jan van Mansum ]
 
Paul O'Neill
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's my current path :

Path=C:\Program Files\Java\j2re1.4.2_13\bin;C:\WINNT\system32;C:\WINNT;C:\WINNT\
System32\Wbem;C:\Program Files\Resource Kit\;C:\NTRESKIT;C:\NTRESKIT\Perl;C:\Pro
gram Files\Common Files\Network Associates\VirusScan Engine\4.0.xx\;C:\Program F
iles\Microsoft SQL Server\80\Tools\BINN;C:\Program Files\HP OpenView\Installed P
ackages\{790C06B4-844E-11D2-972B-080009EF8C2A}\bin;C:\Program Files\HP OpenView\
Installed Packages\{790C06B4-844E-11D2-972B-080009EF8C2A}\bin\OpC
PATHEXT=.COM;.EXE;.BAT;.CMD;.VBS;.VBE;.JS;.JSE;.WSF;.WSH
 
Paul O'Neill
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Any suggestions on where to look? I see a patchjre file that refers to the b28 build but it's on all four servers. Only two of the servers have the issue.
 
Jan van Mansum
Ranch Hand
Posts: 74
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Puzzling. Well, as a "sanity check" you could search your hard drive for "java.exe". If you right-click on each version in Explorer, click Properties, select the Version tab and then select "Full Version", you can check the exact version number of the executable.

Or you could just execute

<path to particular instance>\java.exe -version

for each java.exe you find.

HTH.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic