Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > java -version

Reply
Thread Tools

java -version

 
 
Francesco
Guest
Posts: n/a
 
      05-06-2008
Hi
How can I find the version of the java that is invoked by an applet
from browser?
Which is the difference between java -version and the version viewed
in the Java console from browser (they are not the same) ?
Thanks
Bye
 
Reply With Quote
 
 
 
 
Thomas Kellerer
Guest
Posts: n/a
 
      05-06-2008
Francesco, 06.05.2008 13:04:
> Hi
> How can I find the version of the java that is invoked by an applet
> from browser?

System.getProperty("java.version") or
System.getProperty("java.runtime.version") (a bit more detailed)

> Which is the difference between java -version and the version viewed
> in the Java console from browser (they are not the same) ?


Most probably "java -version" uses a different JDK because it is in the system path.
Check your PATH environment

Thomas
 
Reply With Quote
 
 
 
 
Thomas Fritsch
Guest
Posts: n/a
 
      05-06-2008
Francesco wrote:
> How can I find the version of the java that is invoked by an applet
> from browser?

An applet can get it by System.getProperty(....). See
<http://java.sun.com/docs/books/tutorial/deployment/applet/properties.html>.

> Which is the difference between java -version and the version viewed
> in the Java console from browser (they are not the same) ?

I guess you installed more than one Javas.
When calling "java ..." from command-line you get the one found through
your PATH environment variable.
When running an applet in a browser you get the one configured in your
"Java Control Panel".

--
Thomas
 
Reply With Quote
 
Roedy Green
Guest
Posts: n/a
 
      05-06-2008
On Tue, 6 May 2008 04:04:15 -0700 (PDT), Francesco
<(E-Mail Removed)> wrote, quoted or indirectly quoted someone who
said :

>Hi
>How can I find the version of the java that is invoked by an applet
>from browser?
>Which is the difference between java -version and the version viewed
>in the Java console from browser (they are not the same) ?


see http://mindprod.com/applet/wassup.html
--

Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
 
Reply With Quote
 
Francesco
Guest
Posts: n/a
 
      05-06-2008
On 6 Mag, 13:27, Thomas Fritsch <(E-Mail Removed)> wrote:
> Francesco wrote:
> > How can I find the version of the java that is invoked by an applet
> > from browser?

>
> An applet can get it by System.getProperty(....). See
> <http://java.sun.com/docs/books/tutorial/deployment/applet/properties....>.
>
> > Which is the difference between java -version and the version viewed
> > in the Java console from browser (they are not the same) ?

>
> I guess you installed more than one Javas.
> When calling "java ..." from command-line you get the one found through
> your PATH environment variable.
> When running an applet in a browser you get the one configured in your
> "Java Control Panel".
>
> --
> Thomas


Ok
But I cannot access to Java Control Panel...
Can I access to it from Command prompt?
 
Reply With Quote
 
Chase Preuninger
Guest
Posts: n/a
 
      05-06-2008
In IE got to tools -> Java Sun Console and when it opens it says at
the top.
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      05-07-2008
Francesco wrote:
> How can I find the version of the java that is invoked by an applet
> from browser?
> Which is the difference between java -version and the version viewed
> in the Java console from browser (they are not the same) ?


http://www.vajhoej.dk/arne/eksperten...owversion.html
will tell you.

And if you need to put it in your code, then you can see the source at:
http://www.vajhoej.dk/arne/eksperten...owversion.java !

Arne
 
Reply With Quote
 
Thomas Fritsch
Guest
Posts: n/a
 
      05-07-2008
Arne Vajh°j wrote:
> Francesco wrote:
>
>> How can I find the version of the java that is invoked by an applet
>> from browser?
>> Which is the difference between java -version and the version viewed
>> in the Java console from browser (they are not the same) ?

>
>
> http://www.vajhoej.dk/arne/eksperten...owversion.html
> will tell you.
>
> And if you need to put it in your code, then you can see the source at:
> http://www.vajhoej.dk/arne/eksperten...owversion.java !

I get "404 Not found" here.
You meant
<http://www.vajhoej.dk/arne/eksperten/showversion/ShowVersion.java>,
which works fine.

--
Thomas
 
Reply With Quote
 
Arne Vajh°j
Guest
Posts: n/a
 
      05-07-2008
Thomas Fritsch wrote:
> Arne Vajh°j wrote:
>> Francesco wrote:
>>> How can I find the version of the java that is invoked by an applet
>>> from browser?
>>> Which is the difference between java -version and the version viewed
>>> in the Java console from browser (they are not the same) ?

>>
>>
>> http://www.vajhoej.dk/arne/eksperten...owversion.html
>> will tell you.
>>
>> And if you need to put it in your code, then you can see the source at:
>> http://www.vajhoej.dk/arne/eksperten...owversion.java !

> I get "404 Not found" here.
> You meant
> <http://www.vajhoej.dk/arne/eksperten/showversion/ShowVersion.java>,
> which works fine.


Yep.

I copy pasted and changed extension.

Sorry.

Arne
 
Reply With Quote
 
Arne Vajh├Şj
Guest
Posts: n/a
 
      05-07-2008
Lew wrote:
> Thomas Fritsch wrote:
>> Arne Vajh├Şj wrote:
>>> Francesco wrote:
>>>
>>>> How can I find the version of the java that is invoked by an applet
>>>> from browser?
>>>> Which is the difference between java -version and the version viewed
>>>> in the Java console from browser (they are not the same) ?
>>>
>>>
>>> http://www.vajhoej.dk/arne/eksperten...owversion.html
>>> will tell you.
>>>
>>> And if you need to put it in your code, then you can see the source at:
>>> http://www.vajhoej.dk/arne/eksperten...owversion.java !

>> I get "404 Not found" here.
>> You meant
>> <http://www.vajhoej.dk/arne/eksperten/showversion/ShowVersion.java>,
>> which works fine.

>
> Web-page URLs aren't case sensitive. The first version does not result
> in a 404 from here.


They can be. They have to. Imagine a *nix based web server with A.html
and a.html with different content.

Arne
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Hot Requirements: 1.Sr Java Developer,2.Java Developer (Java with EJB) Isaac Java 0 01-20-2011 08:41 PM
hey i am just started java,, can anyone tell me the use ,application, why java , importance of java.. manish sahu Java 3 02-14-2008 12:00 AM
[JAVA] [EVALUATION] - The Java Failure (Sorry: The Java(tm) Failure) Ilias Lazaridis Java 0 02-01-2005 10:32 AM
JAVA VIRTUAL MUCHINE OR SUN JAVA Fernando Kohan Firefox 1 11-14-2004 02:04 AM
Job to convert Java App 1.3.1 to Java Newest of Java Michael Kintner Java 0 11-30-2003 04:42 AM



Advertisments