473,386 Members | 1,598 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Q: How to detect which JAVA VM is installed?

Hello,

I'm looking for a javascript, that can detect which java VM is installed and
what the current version is.

Can any of you give me some details?

Best regards,
Jan
Denmark

Jul 20 '05 #1
1 2290


Jan Vinten wrote:
I'm looking for a javascript, that can detect which java VM is installed and
what the current version is.


Using Liveconnect calls from JavaScript to Java you can read out Java
properties with Netscape 4, Netscape 7 and I think with Opera 7:

if (navigator.javaEnabled() && typeof java != 'undefined') {
alert(
'java.version: ' + java.lang.System.getProperty('java.version')
+ '\n'
+ 'java.vendor: ' + java.lang.System.getProperty('java.vendor'))
}

But that will start up the Java VM.

You could also look into navigator.plugins:

var pluginName = 'Java Plug-in';
for (var i = 0; i < navigator.plugins.length; i++) {
var plugin = navigator.plugins[i];
if (plugin.name == pluginName) {
alert(plugin.description);
break;
}
}

That shouldn't start up the Java VM but is obviously restricted to
browsers that use a plugin such as that from Sun to run Java applets and
that support the navigator.plugins array.

--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

21
by: BlackHawke | last post by:
My name is Nick Soutter, I own a small game development company (www.aepoxgames.net) making our first game (www.andromedaonline.net) in java. I am writing because we are having a very...
1
by: Chris | last post by:
I want to detect the version of the JVM that is being used by the browser, for both IE & Firefox (and maybe also Opera & Safari if possilbe). I have searched around the web for such a program,...
2
by: SPG | last post by:
Hi, We have an applet which is not loading on some systems. We suspect it is a security issue, but cannot be sure as of yet. Is there any way of programatically trapping the failure so we can...
157
by: Dennis | last post by:
Is there some way --using, say, DOM or javascript-- to detect the current pixel width and/or height of a relatively sized table or of one of its columns or rows. I'm going to be writing javascript...
4
by: zZ | last post by:
Hi All, I need to detect the framework installed from both VB.Net and VB6. Can someone give me an hint? Thanks for any tip. Kind regards, Zen
3
by: Raj | last post by:
Hi All, Is it possible to detect if a client software is installed on a machine using browser javascript. we are building a web/windows software and when the user logs into the web application,...
2
by: Yurij Nykon | last post by:
Hi all. How can I detect the version of Flash-Plugin installed in Internet Explorer? In Netscape i can do this with following java script navigator.plugins.description But it doesn't works...
1
by: Raj | last post by:
Hi, I want to detect a s/w installed on the browser client machine and change my asp.net application's behavior according to that. I already have the javascript to detect the s/w installed on the...
4
by: aotemp | last post by:
Does anyone know how to detect the version of Java installed? My website has an application that requires java 1.5+ to be installed, basically if the user doesn;t already have it installed I...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.