How to determe JRE build using Java?  
Author Message
Mickey Segal





PostPosted: 2006-1-26 0:44:00 Top

java-programmer, How to determe JRE build using Java? Is there a way to determine the Java build from within Java?

I can do so from the Windows command line using:
java -version
For the latest Sun JRE build I get:
build 1.6.0-rc-b68

However, using "java.version" inside a Java program all I get it:
1.6.0-rc

Is there some way to get the full information from inside Java?


 
Chris Uppal





PostPosted: 2006-1-26 1:22:00 Top

java-programmer >> How to determe JRE build using Java? Mickey Segal wrote:

> Is there a way to determine the Java build from within Java?

I don't know how universal it is, but on my 1.5.0.x machines the standard
system property "java.vm.version" is the same as that printed by:
java -fullversion

-- chris


 
Mickey Segal





PostPosted: 2006-1-26 1:28:00 Top

java-programmer >> How to determe JRE build using Java? "Chris Uppal" <email***@***.com> wrote in message
news:43d7b33c$0$87294$email***@***.com...
> I don't know how universal it is, but on my 1.5.0.x machines the standard
> system property "java.vm.version" is the same as that printed by:
> java -fullversion

Thanks. That works. It was not on the list I have of System properties,
but all I need is for it to work on my computers.


 
 
Chris Uppal





PostPosted: 2006-1-26 2:01:00 Top

java-programmer >> How to determe JRE build using Java? Mickey Segal wrote:

> It was not on the list I have of System properties,

You can find an updated list at:

http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties()

(if the URL doesn't break...) Not that the documentation /says/ very much, but
it is there ;-)

-- chris



 
 
Roedy Green





PostPosted: 2006-1-26 4:11:00 Top

java-programmer >> How to determe JRE build using Java? On Wed, 25 Jan 2006 11:44:16 -0500, "Mickey Segal"
<email***@***.com> wrote, quoted or indirectly quoted someone
who said :

>
>I can do so from the Windows command line using:
>java -version
>For the latest Sun JRE build I get:
>build 1.6.0-rc-b68
>
>However, using "java.version" inside a Java program all I get it:
>1.6.0-rc
>
>Is there some way to get the full information from inside Java?

I think you want the property java.vm.version.

see http://mindprod.com/applets/wassup.html

to browse what's available.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
 
Roedy Green





PostPosted: 2006-1-26 4:15:00 Top

java-programmer >> How to determe JRE build using Java? On Wed, 25 Jan 2006 18:00:58 -0000, "Chris Uppal"
<email***@***.com> wrote, quoted or indirectly
quoted someone who said :

>> It was not on the list I have of System properties,
>
>You can find an updated list at:
>
>http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties()
>

see http://mindprod.com/jgloss/properties.html
for an extended list of properties.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
 
Mickey Segal





PostPosted: 2006-1-26 4:57:00 Top

java-programmer >> How to determe JRE build using Java? "Roedy Green" <email***@***.com> wrote in
message news:email***@***.com...
> see http://mindprod.com/jgloss/properties.html
> for an extended list of properties.

I should have looked there to start with. Thanks. BTW, several of the
applets on that page fail with 1.6.0-rc-b68.


 
 
Roedy Green





PostPosted: 2006-1-26 8:54:00 Top

java-programmer >> How to determe JRE build using Java? On Wed, 25 Jan 2006 15:56:39 -0500, "Mickey Segal"
<email***@***.com> wrote, quoted or indirectly quoted someone
who said :

>Thanks. BTW, several of the
>applets on that page fail with 1.6.0-rc-b68.
oh dear. What does the console say.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
 
 
Mickey Segal





PostPosted: 2006-1-26 9:37:00 Top

java-programmer >> How to determe JRE build using Java? "Roedy Green" <email***@***.com> wrote in
message news:email***@***.com...
> oh dear. What does the console say.

The messages seem to focus on problems finding files. I emailed the full
output to your feedback email address.


 
 
Roedy Green





PostPosted: 2006-1-26 13:05:00 Top

java-programmer >> How to determe JRE build using Java? On Wed, 25 Jan 2006 20:37:27 -0500, "Mickey Segal"
<email***@***.com> wrote, quoted or indirectly quoted someone
who said :

>The messages seem to focus on problems finding files. I emailed the full
>output to your feedback email address.

What appears to be happening is URL.getConnection is failing to find a
file and return with null without raising an IOException. I am in the
process of posting a version that checks for that and raises the
exception. However that does not explain why you can't see the files.
From the log you sent, you can see some, but not others. I checked
with ftp. They are there. I can see them from here. I gather something
interferes between you and mindprod.com

It would be interesting to see if this has to do with your connection
or with JRE 1.6.

Has any one else noticed the JDisplay colourised
java/bat/html/sql/ini... listings failing with null pointer exceptions
at mindprod.com?

--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.