Link to home
Start Free TrialLog in
Avatar of PuneetKSaxena
PuneetKSaxena

asked on

Java Applet certificate jdk14. and jdk1.6 issue issue

Hi,

I've a application running on my browser.
For downloading file, it need a certificate and when we download certificate it allow me to download the file.

When i run it with jdk1.4, the applet opens and certificate also opens and it allows me to register the certificate,
But in jdk1.6, applet does not open , so i'm not able to register this certificate in my browser and so i'm not able to download the file.

How can the certificate applet open in both the versions of java???

Thanks and Regards
Puneet
Avatar of Mick Barry
Mick Barry
Flag of Australia image

how are you signing your jar?

Avatar of PuneetKSaxena
PuneetKSaxena

ASKER

signing your jar means???

I'm getting a error on java console:
load: class Query.class not found.
java.lang.ClassNotFoundException: Query.class
                at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(Unknown Source)
                at java.lang.ClassLoader.loadClass(Unknown Source)
                at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
                at sun.plugin2.applet.Plugin2Manager.createApplet(Unknown Source)
                at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
                at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketException: Network is unreachable: connect
                at java.net.PlainSocketImpl.socketConnect(Native Method)
                at java.net.PlainSocketImpl.doConnect(Unknown Source)
                at java.net.PlainSocketImpl.connectToAddress(Unknown Source)
                at java.net.PlainSocketImpl.connect(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.net.www.http.HttpClient.openServer(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.New(Unknown Source)
                at sun.net.www.http.HttpClient.New(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection.plainConnect(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection.connect(Unknown Source)
                at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
                at java.net.HttpURLConnection.getResponseCode(Unknown Source)
                at sun.plugin2.applet.Applet2ClassLoader.getBytes(Unknown Source)
                at sun.plugin2.applet.Applet2ClassLoader.access$000(Unknown Source)
                at sun.plugin2.applet.Applet2ClassLoader$1.run(Unknown Source)
                at java.security.AccessController.doPrivileged(Native Method)
                ... 7 more
Exception: java.lang.ClassNotFoundException: Query.class
it cannot get a connection to the server to download your class
do you need to use a proxy to get a connection to server?

how are you loading the html page?


but why its working with one version of java and not with other???

In one machine with same proxy setting its working fine with jdk1.4 and in other machine with jdk1.6 its not working.

Its a html page and its loaded as all other pages loads.
Its probably more an issue with the machine rather than the java version.
Is there a firewall, it may be blocking class files

what browser are you using? ie6,7? firefox, or even safari,opera?
From source of html page, is that using applet tag or object tag?
The applet element was deprecated in HTML 4.01.
The applet element is not supported in HTML 5.
http://www.w3schools.com/tags/html5_applet.asp
object tag
http://www.w3schools.com/TAGS/tag_object.asp
if that applet was developed by later version than jdk1.4, It needs to using object tag on firefox 3
is that your problem source?
The applet tag is deprecated but works fine for me in Firefox 3.

On the problem machine, determine the url of the applet class file and try to download it directly via the browser. Better still, try to download it with wget. If you can't download it, then you're not going to see an applet. Network problems would likely be at the root of that
ASKER CERTIFIED SOLUTION
Avatar of Kin Fat SZE
Kin Fat SZE
Flag of Hong Kong image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial