7 comments
Comment actions Permalink

one way is to stop at a break point and then right click and select evaluate expression.
then type

System.getProperty("java.runtime.name") //will be something like "Java(TM) 2 Runtime Environment, Standard Edition"

System.getProperty("java.vm.version") //will be something like 1.4.1-b21


btw this is how i figured this out (just so I teach you how to fish :)

Properties p = System.getProperties();
Iterator i = p.keySet().iterator();
while(i.hasNext()){
String nxt = i.next().toString();
System.err.println("key is " + nxt + " and value is " + p.getProperty(nxt));
}

0
Comment actions Permalink

Thanks.

I wonder why do I see the Java version when I run (triangle icon) but not
when I debug (beetle icon)?

Amnon

"charles decroes" <spam@decroes.com> wrote in message
news:14073278.1057593697511.JavaMail.itn@is.intellij.net...

one way is to stop at a break point and then right click and select

evaluate expression.

then type

>

System.getProperty("java.runtime.name") //will be something like

"Java(TM) 2 Runtime Environment, Standard Edition"
>

System.getProperty("java.vm.version") //will be something like 1.4.1-b21

>
>

btw this is how i figured this out (just so I teach you how to fish :)

>

Properties p = System.getProperties();
Iterator i = p.keySet().iterator();
while(i.hasNext()){
String nxt = i.next().toString();
System.err.println("key is " + nxt + " and value is " +

p.getProperty(nxt));

}

>
>


0
Comment actions Permalink

i get the same results on both if i do

System.err.println(System.getProperty("java.runtime.name"));
System.err.println(System.getProperty("java.vm.version"));


I am running an applet which kicks off the standard jdk. Are you debugging an applet, application or web component?

0
Comment actions Permalink


command line option


shows the version when the JVM starts.

0
Comment actions Permalink

charles decroes wrote:

btw this is how i figured this out (just so I teach you how to fish :)

Properties p = System.getProperties();
Iterator i = p.keySet().iterator();
while(i.hasNext()){
String nxt = i.next().toString();
System.err.println("key is " + nxt + " and value is " + p.getProperty(nxt));
}


I think an easier way to fish is:
System.getProperties().list(system.out);

Or press ctrl-q on the "getProperties()" part for a list of system
properties.

Bas

0
Comment actions Permalink

As always there is more than one solution to any given problem. i like your way better

0
Comment actions Permalink

This is the cleanest and easiest way.

Thanks!

"Peter Sch?fer" <peter.schaefer@healy-hudson.com> wrote in message
news:20229019.1057652671992.JavaMail.javamailuser@localhost...
>

command line option

>


>

shows the version when the JVM starts.



0

Please sign in to leave a comment.