473,387 Members | 1,535 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,387 software developers and data experts.

Determen Java evalibility and version.

Hi.
can anyone help me with how to find if JAVA is evalible and if yes,
of what version?
Thanks
Dani
Jul 23 '05 #1
4 1942
Dani Shapira wrote:
Hi.
can anyone help me with how to find if JAVA is evalible and if yes, of
what version?


comp.lang.java is over there ============>

Java != Javascript

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #2
Randy Webb wrote:
Dani Shapira wrote:
Hi.
can anyone help me with how to find if JAVA is evalible and if yes,
of what version?

comp.lang.java is over there ============>

Java != Javascript

I know that Java and Javascript is not the same!!!!
The quetion is: How can I, in JavaScript, find out if Java is avaliable
for this browser to run applet og later page.
Jul 23 '05 #3


Dani Shapira wrote:

Dani Shapira wrote:
can anyone help me with how to find if JAVA is evalible and if yes,
of what version?
The quetion is: How can I, in JavaScript, find out if Java is avaliable
for this browser to run applet og later page.


Most browsers should support
if (navigator.javaEnabled()) {
...
}
Testing the Java version is probably better done then in a Java applet
itself, only a few browsers (Mozilla, Opera) support LiveConnect
JavaScript->Java direct access e.g.
if (navigator.javaEnabled() && typeof java != 'undefined') {
alert(java.lang.System.getProperty('java.version') );
}

As long as browsers are using the Sun Java plugin you can also look into
the navigator.mimeTypes e.g.

var mimeType = navigator.mimeTypes ?
navigator.mimeTypes['application/x-java-applet'] : null;
if (mimeType) {
var plugin = mimeType.enabledPlugin;
if (plugin) {
alert(plugin.description);
}
}
for me here on Windows that shows
Java Plug-in 1.5.0_01 for Netscape Navigator (DLL Helper)
so you could try to extract the version from that string.

But IE/Win doesn't support navigator.mimeTypes for such stuff.
--

Martin Honnen
http://JavaScript.FAQTs.com/
Jul 23 '05 #4
Dani Shapira wrote:
Randy Webb wrote:
Dani Shapira wrote:
Hi.
can anyone help me with how to find if JAVA is evalible and if yes,
of what version?


comp.lang.java is over there ============>

Java != Javascript

I know that Java and Javascript is not the same!!!!
The quetion is: How can I, in JavaScript, find out if Java is avaliable
for this browser to run applet og later page.


In short, you can't reliably. There are too many other factors that
affect it, as Martin pointed out. It also fails if scripting is disabled
or not present. And these very reasons are why I directed you to a Java
Newsgroup. The Java gurus are better prepared to tell you how, in Java,
determine what you are wanting to know.

comp.lang.java

--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Jul 23 '05 #5

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

Similar topics

73
by: RobertMaas | last post by:
After many years of using LISP, I'm taking a class in Java and finding the two roughly comparable in some ways and very different in other ways. Each has a decent size library of useful utilities...
2
by: Dave Brueck | last post by:
Below is some information I collected from a *small* project in which I wrote a Python version of a Java application. I share this info only as a data point (rather than trying to say this data...
0
by: Markus Wollny | last post by:
Hello! When I try to run ./configure --with-java, it complains that ant doesn't work. However ant is installed, as is the latest Java SDK 1.4.2 from sun, PATH and JAVA_HOME are set correctly; ...
5
by: Hassan Naqvi | last post by:
Hi, Basically, I am Java developer. In past I have played with Oracle using Java (JDBC). But this is the time to play with IBM DB2 using Java (JDBC). So kindly help this DB2 newbie. I have a...
2
by: Michael | last post by:
Running DB2 v7 UDB ("DB2 v7.1.0.93", "n031208" and "WR21333") on Windows XP, I am unable to find out why the "Build for Debug" option within Stored Procedure Builder is not enabled on Java stored...
1
by: David Van D | last post by:
Hi there, A few weeks until I begin my journey towards a degree in Computer Science at Canterbury University in New Zealand, Anyway the course tutors are going to be teaching us JAVA wth bluej...
2
by: Jobs | last post by:
Download the JAVA , .NET and SQL Server interview with answers Download the JAVA , .NET and SQL Server interview sheet and rate yourself. This will help you judge yourself are you really worth of...
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: 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
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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.