#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    2
    Rep Power
    0

    Differences between Sun JVM and Microsoft JVM.


    I have a very simple applet that I am trying to make compatible with both Microsoft’s JVM and Suns JVM in Internet Explorer.
    However, when I turn on the Sun JVM it works occasionally, but frustratingly on most occasions I get the following error messages:

    In the status bar: "Applet <name> notinited"

    And when I investigate further in the console I get the following output:

    load: class <name>.class not found.
    java.lang.ClassNotFoundException: <name>.class
    at sun.applet.AppletClassLoader.findClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadClass(Unknown Source)
    at java.lang.ClassLoader.loadClass(Unknown Source)
    at sun.applet.AppletClassLoader.loadCode(Unknown Source)
    at sun.applet.AppletPanel.createApplet(Unknown Source)
    at sun.plugin.AppletViewer.createApplet(Unknown Source)
    at sun.applet.AppletPanel.runLoader(Unknown Source)
    at sun.applet.AppletPanel.run(Unknown Source)
    at java.lang.Thread.run(Unknown Source)

    Caused by: java.net.SocketException: Malformed reply from SOCKS server
    at java.net.SocksSocketImpl.readSocksReply(Unknown Source)
    at java.net.SocksSocketImpl.connect(Unknown Source)
    at java.net.Socket.connect(Unknown Source)
    at sun.net.NetworkClient.doConnect(Unknown Source)
    at sun.plugin.net.protocol.http.HttpClient.doConnect(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at sun.net.www.http.HttpClient.privilegedOpenServer(Unknown Source)
    at sun.net.www.http.HttpClient.openServer(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.net.www.http.HttpClient.<init>(Unknown Source)
    at sun.plugin.net.protocol.http.HttpClient.<init>(Unknown Source)
    at sun.plugin.net.protocol.http.HttpClient.New(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.createConnection(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.connect(Unknown Source)
    at sun.plugin.net.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
    at java.net.HttpURLConnection.getResponseCode(Unknown Source)
    at sun.applet.AppletClassLoader.getBytes(Unknown Source)
    at sun.applet.AppletClassLoader.access$100(Unknown Source)
    at sun.applet.AppletClassLoader$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)

    ... 10 more

    It appears that the applet never gets loaded. I have no idea why?
    What is the Sun JVM doing here?

    Many thanks in advance for any help.
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jan 2004
    Posts
    2
    Rep Power
    0
    After some more investigation... I have finally found the problem... I think!!!

    Suns JVM took my browsers default connection settings:

    HTTP IP PORT
    SECURE IP PORT
    FTP IP PORT
    GOPHER IP PORT
    SOCKS IP PORT

    All of these are set in my browser.

    It seems that Suns JVM orders the way it connects to the Internet.
    Basically the JVM was trying to access the Internet via the SOCKS server settings and not the HTTP.
    To fix the problem I un-ticked the "use browser settings" check box in the Java plugin proxies tab and just added the HTTP IP and PORT of our proxy server that goes out onto the Internet.

    I then tried the applet and it worked!!!

    Does anyone know why the JVM orders connections in this way?

IMN logo majestic logo threadwatch logo seochat tools logo