Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8664873
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T17:20:41+00:00 2026-06-12T17:20:41+00:00

I wanted to get the Java Vendor and Version info. Recently i installed java

  • 0

I wanted to get the Java Vendor and Version info.

Recently i installed java 1.7.0.7 in mac mountain lion and document.MyApplet.getJavaVendor() Throws exception (type error ‘undefined’ is not a function) when i run my below HTML file as mentioned below in safari 6.

But the same works fine with java 1.6.0.35.

Till the applet is not loaded it will throw the exception as mentioned above but once the applet is loaded it should get the info as expected.

Additional Info: I even tried to do the same with Firefox, there its working absolutely fine with both the JRE’s.

Applet HTML code:

<applet name="MyApplet" codebase = "./code/" archive="MyApplet.jar" code="MyApplet.class" width="1" height="1" style="border-width:0;" MAYSCRIPT=true>
    <PARAM NAME="type" VALUE="application/x-java-applet;version=1.4"/>
    <PARAM NAME="cache_option" VALUE="plugin"/>
    <PARAM NAME="cache_archive" VALUE="MyApplet.jar"/>
    <PARAM NAME="cache_version" VALUE="5.6.3.1"/>
    <PARAM NAME="scriptable" VALUE="true"/>
    <PARAM name="codebase_lookup" value="false"/>
</applet>

Java script code:

function verifyJRE() {

    try {
        var tmpVendor = document.MyApplet.getJavaVendor();
        var tmpVersion = document.MyApplet.getJavaVersion();

        var strJavaVendor = new String( tmpVendor);
        var strJavaVersion = new String( tmpVersion);

        if ( (strJavaVendor.indexOf("Apple") != -1) || (strJavaVendor.indexOf("Sun") != -1) || (strJavaVendor.indexOf("Oracle") != -1)) {
             // Do something;
        } else {
             // Do Something;                   }
    } catch (e) {
        iCount++;
        if (iCount < 10)
             // waiting for Applet to Load;
             setTimeout('verifyJRE()', 200);
        else {
             // logout from application;
    }
}

Applet Code:

import java.applet.Applet;
import java.io.PrintStream;


public class MyApplet extends java.applet.Applet {

    private String strJavaVendor;
    private String strJavaVersion;

    public MyApplet() {
    }    

    public void init() {
        strJavaVendor = System.getProperty("java.vendor");
        strJavaVersion = System.getProperty("java.version");
    }

    public String getJavaVendor() {
        System.out.println(new StringBuilder("Java Vendor is: ").append(strJavaVendor).toString());
        return strJavaVendor;
    }

    public String getJavaVersion() {
        System.out.println(new StringBuilder("Java Version is: ").append(strJavaVersion).toString());
        return strJavaVersion;
    }
}

Could someone help me with this issue?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T17:20:43+00:00Added an answer on June 12, 2026 at 5:20 pm

    Issue got Resolved with Apple OSX 10.8.2 and Safari 6.0.1 Update

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I wanted to get Java running at 1.6xxx - I changed the JAVA_HOME variable
Am a java programmer and wanted to get started with Websphere Application server. Can
I wanted to get the keyCode on keydown event in ckeditor. My code looks
I wanted to get the words from a cell. For example, cell A2 has
I wanted to get some feedback on your thoughts of storing entire objects into
When I wanted to get Android source code, I knew that I have to
If i wanted to get message for ViewData from resource file, depending on the
I just wanted to get the general consensus on which is a better mode
I am wanted to get the id's of all the divs on my page
I'm new to objective C and I just wanted to get a general clarification

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.