LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Seriously! Why wont Java work!? (https://www.linuxquestions.org/questions/linux-newbie-8/seriously-why-wont-java-work-858241/)

flipjarg 01-24-2011 12:03 AM

Seriously! Why wont Java work!?
 
So far I have tried installing sun-java6-jre, sun-java6-plugin and default-java. I am running Debian Squeeze. My browser is Chrome and I have also tested in IceWeasel.

The closest I have come to having Java work properly is when I get an error code rather then the "plugin not installed" message.

Code:

# java -version
java version "1.6.0_22"
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) Client VM (build 17.1-b03, mixed mode, sharing)

Here is what I get at every site running java, when I click on the Java applet.
Code:

Java Plug-in 1.6.0_22
Using JRE version 1.6.0_22-b04 Java HotSpot(TM) Client VM
User home directory = /home/acrocycle
----------------------------------------------------
c:  clear console window
f:  finalize objects on finalization queue
g:  garbage collect
h:  display this help message
l:  dump classloader list
m:  print memory usage
o:  trigger logging
q:  hide console
r:  reload policy configuration
s:  dump system and deployment properties
t:  dump thread list
v:  dump thread stack
x:  clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------


load: class CheckersApplet.class not found.
java.lang.ClassNotFoundException: CheckersApplet.class
        at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:230)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:249)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:179)
        at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:160)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
        at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:686)
        at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:2990)
        at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1481)
        at java.lang.Thread.run(Thread.java:662)
Caused by: java.net.ConnectException: Network is unreachable
        at java.net.PlainSocketImpl.socketConnect(Native Method)
        at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
        at java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
        at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
        at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:366)
        at java.net.Socket.connect(Socket.java:529)
        at sun.net.NetworkClient.doConnect(NetworkClient.java:161)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:394)
        at sun.net.www.http.HttpClient.openServer(HttpClient.java:529)
        at sun.net.www.http.HttpClient.<init>(HttpClient.java:233)
        at sun.net.www.http.HttpClient.New(HttpClient.java:306)
        at sun.net.www.http.HttpClient.New(HttpClient.java:323)
        at sun.net.www.protocol.http.HttpURLConnection.getNewHttpClient(HttpURLConnection.java:975)
        at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:916)
        at sun.net.www.protocol.http.HttpURLConnection.connect(HttpURLConnection.java:841)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1177)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:379)
        at sun.plugin2.applet.Applet2ClassLoader.getBytes(Applet2ClassLoader.java:593)
        at sun.plugin2.applet.Applet2ClassLoader.access$000(Applet2ClassLoader.java:52)
        at sun.plugin2.applet.Applet2ClassLoader$1.run(Applet2ClassLoader.java:203)
        at java.security.AccessController.doPrivileged(Native Method)
        at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:200)
        ... 8 more
Exception: java.lang.ClassNotFoundException: CheckersApplet.class


ericson007 01-24-2011 12:20 AM

I am not a java expert as normally I do not really use it. Don't even have it installed on my debian box, however it appears that there is a missing library. CheckersApplet.class Maybe try searching on your pc somewhere to see if you can locate it by any means.

It futher seems that the missing library causes the following error java.net.ConnectException: Network is unreachable. If you manage to get the checkers applet going, it should solve the problem.

Good luck

flipjarg 01-24-2011 12:33 AM

Quote:

Originally Posted by ericson007 (Post 4235609)
I am not a java expert as normally I do not really use it. Don't even have it installed on my debian box, however it appears that there is a missing library. CheckersApplet.class Maybe try searching on your pc somewhere to see if you can locate it by any means.

It futher seems that the missing library causes the following error java.net.ConnectException: Network is unreachable. If you manage to get the checkers applet going, it should solve the problem.

Good luck

CheckersApplet.class is a class (or maybe the applet) in the applet I am trying to run. I get the same message for every applet I try to run but that is the only thing that changes... but I found a fix!

With sun-java6-jre and sun-java6-plugin installed I did the following.
Quote:

Open file /etc/sysctl.d/bindv6only.conf and set net.ipv6.bindv6only=0
and after that do : invoke-rc.d procps restart
I found the fix here: http://www.justlinux.com/forum/showthread.php?t=152926

ericson007 01-24-2011 12:37 AM

I see, so it seems to be more of a protocol issue where it tried using new IPV6 and thereby setting it to false revert to IPV4 only... interesting

flipjarg 01-24-2011 12:55 PM

Quote:

Originally Posted by ericson007 (Post 4235621)
I see, so it seems to be more of a protocol issue where it tried using new IPV6 and thereby setting it to false revert to IPV4 only... interesting

Yeah... its odd.


All times are GMT -5. The time now is 03:26 PM.