> Re: How to inform web site visitor that Sun Java is required?
>
[quoted text clipped - 15 lines]
> Regards,
> Brcobrem
There is no HTML you could write, but there is some JavaScript:
function checkSunJava() {
if (java.lang.System.getProperty("java.vendor").indexOf("Sun") != 0)
alert('This page requires Sun Java.');
}
Alternatively, if your requirement is merely that the person needs Java,
this should (untested) work:
<applet ...> <!-- Or object or whatever -->
This page requires Java to work properly.
</applet>
Lew - 21 Jun 2007 17:25 GMT
Brcobrem wrote:
>> I am by no means an expert html coder, but I can do enough to get small
>> jobs done. That said, I have a number of relatively simple web sites
[quoted text clipped - 3 lines]
>> provide some kind of visual indication (perhaps a pop-up box) as
>> how/where to get Sun Java?
> There is no HTML you could write, but there is some JavaScript:
>
[quoted text clipped - 9 lines]
> This page requires Java to work properly.
> </applet>
Alternatively you could use Java Web Start (JWS) if your design admits of that.
<http://java.sun.com/javase/6/docs/technotes/tools/#javaws>
It gives you very good control over what Java versions you might require of
the user, and how to prompt them for it.
Sun's advice parallels Joshua's regarding the use of Javascript, or even
VBScript. There seem to be ways to configure the JNLP to control the Java
versioning also.
There's a tip on
<http://java.sun.com/javase/6/docs/technotes/guides/javaws/developersguide/launch
.html#creating>
on how to automagically download a Java for the MS Windows user.
I don't know if JWS is going to suit your needs.

Signature
Lew
--
Lew
Brcobrem - 25 Jun 2007 16:27 GMT
> On Jun 21, 12:25 pm, Lew <l...@lewscanon.nospam> wrote: . . .
Thank you too Lew for the good pointers here.
Regards,
Brcobrem
Andrew Thompson - 22 Jun 2007 10:27 GMT
...
>There is no HTML you could write, ..
'Sure there is'. Or rather, there is some HTML with a
redirect meta tag (to "nojava.html"), set for a number
of seconds, combined with a small Java applet that
calls showDocument("sunjava.html"); after the
appropriate checks (like shown in the JS below -
but done in the applet).
> ..but there is some JavaScript:
>
[quoted text clipped - 9 lines]
>This page requires Java to work properly.
></applet>
Unfortunately not. The 'no java' section of the applet
element is only intended for browsers that have never
seen or heard of the <applet> element. There are
other browsers that had Java installed at some stage,
but it is now *disabled* thru browser config. settings.
But that is not the half of it..
I have applet elements that include *both* the alt
attribute and the 'no java' section. There are
browsers (or at least, installations of IE) that
will display the result as a 'big grey square' on
the web page. I expect it is because of some over
zealous combination of security settings (e.g.
disabled in IE's config., as well as running Norton
on 'maximum paranoia' settings) but never got to
investigate in detail.
Lew also made some good points about web start.
Ultimately though, I am not convinced this applet
requires 'Sun' Java. Why did you say that? Does
it use Swing? What is the minimum Java version
it can run in?

Signature
Andrew Thompson
http://www.athompson.info/andrew/
Brcobrem - 25 Jun 2007 16:25 GMT
> > Re: How to inform web site visitor that Sun Java is required?
>
[quoted text clipped - 32 lines]
>
> - Show quoted text -
Hi Joshua,
Here's what I have on a web site below a section that begins with
<script type="text/javascript">
<noscript>
<p>JavaScript is required to view this email address
</p></noscript>
Now what that is causing in IE7 ( Internet Explorer v7 )is that when a
user enters that page, they get a "Internet Explorer" titled warning
box that says, "The page you are viewing uses Java. More information
on Java support is available from the Microsoft website." There is a
check box that says, "Do not show this message again." There is also a
"More Info" button that takes you to http://www.microsoft.com/windows/ie/ie6/getosver/javaxp.mspx
On that "No Java Installed" page there is a link to http://www.microsoft.com/java
. If you look at that page, I think you would agree that is would be
very (intentionally ?)confusing for the average user to figure out
what to do.
Now I finnaly understand what the .NET initiative is all about:
Microsoft vs Sun .
Regards,
Brcobrem
Roedy Green - 29 Jun 2007 14:03 GMT
On Thu, 21 Jun 2007 16:07:28 GMT, Joshua Cranmer
<Pidgeot18@verizon.net> wrote, quoted or indirectly quoted someone who
said :
>function checkSunJava() {
> if (java.lang.System.getProperty("java.vendor").indexOf("Sun") != 0)
> alert('This page requires Sun Java.');
>}
You want a bit more than that -- the minimal version.
You probably don't really want to insist on Sun Java, just a certain
version of Java.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
Roedy Green - 29 Jun 2007 14:04 GMT
On Thu, 21 Jun 2007 16:07:28 GMT, Joshua Cranmer
<Pidgeot18@verizon.net> wrote, quoted or indirectly quoted someone who
said :
><applet ...> <!-- Or object or whatever -->
>This page requires Java to work properly.
></applet>
This almost never works. The usual culprit is an ancient version of
MS Java. Or a version of Java which the browser seems to think in
present but which will not launch.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
>Re: How to inform web site visitor that Sun Java is required?
see how I do it at the various applets in
http://mindprod.com/applets/amanuenses.html
I don't use JavaScript except for JAWS.
Each app checks the Java version first thing.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com