Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

First of all, here is my setup:

  • Ubuntu 10.04
  • Linux 2.6.32-32-generic #62-Ubuntu SMP Wed Apr 20 21:54:21 UTC 2011 i686 GNU/Linux
  • Firefox 4
  • Java 6

Issue: I am trying to use my linux machine to log into a java based remote office/terminal application for work. I'm pretty sure this used to work on Firefox 3/Ubuntu 9.04.

Currently, I have Firefox 4 installed and I was using the standard openJRE package that is installed with 10.04. When I would try to launch the applet, I would get an HTML window saying the applet was running but then nothing would happen.

I read these two questions:

and tried switching to the official sun java 6 packages.

I then tried using the java.com tools to check if I had a working version of the java plugin. The window that is supposed to display the version details in a java applet seems to work but Firefox paints/locks up for about 30 seconds. If I click off of the window with the applet then click back, the applet box just displays junk/the desktop underneath the firefox window.

Any thoughts/suggestions/links that would help me: a. understand what is going on? b. help resolve the issue?

I checked syslog and poked around in /var/log but none of the timestamps on the logs updated when I was having the issue.

Thanks in advance.

UPDATE #1:

I also ran the the below to check if the sun java was the only installed java and it appears that it is.

$ sudo update-java-alternatives -l
java-6-sun 63 /usr/lib/jvm/java-6-sun

UPDATE #2:

So the applet seems to work in Chromium which would lead me to believe this is a Firefox issue.

I also got the below error in the jconsole:

java.lang.ClassFormatError: Incompatible magic value 171731060 in class file hob/hltc/JHLTCap01
    at java.lang.ClassLoader.defineClass1(Native Method)
    at java.lang.ClassLoader.defineClassCond(ClassLoader.java:632)
    at java.lang.ClassLoader.defineClass(ClassLoader.java:616)
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141)
    at sun.plugin2.applet.Applet2ClassLoader.findClass(Applet2ClassLoader.java:247)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Plugin2ClassLoader.java:250)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:180)
    at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Plugin2ClassLoader.java:161)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Plugin2ClassLoader.java:675)
    at sun.plugin2.applet.Plugin2Manager.createApplet(Plugin2Manager.java:3025)
    at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Plugin2Manager.java:1498)
    at java.lang.Thread.run(Thread.java:662)
Exception: java.lang.ClassFormatError: Incompatible magic value 171731060 in class file hob/hltc/JHLTCap01

I tried clearing the cache and search for any jar files with the above in the name but again no luck.

Googling led me to this: http://stackoverflow.com/questions/2390733/incompatible-magic-value-1008813135

But not sure if that is the issue either.

share|improve this question

closed as too localized by Bruno Pereira Feb 23 '12 at 17:15

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, visit the help center.If this question can be reworded to fit the rules in the help center, please edit the question.

2 Answers 2

You might have installed java-6-sun, but still be using the open source one. To make sure the sun version is installed issue the following command.

sudo apt-get install java-6-sun

To be sure all apps use the sun java version as default issue the following:

sudo update-java-alternatives -s java-6-sun

Hope this helps you out!

share|improve this answer
    
I did a "purge" remove from synaptic for the open source jre. I also ran the below which would lead me to believe I'm using the sun version. $ sudo update-java-alternatives -l java-6-sun 63 /usr/lib/jvm/java-6-sun –  alexpotato Jun 1 '11 at 17:31
    
using the -l option on update-java-alternatives will only show you a list of installed runtimes, if you run it with -s as in my answer it would also actually "set" the java-6-sun version for use as the default. –  W. Goeman Jun 2 '11 at 10:08
    
So ran it but got a lot of "jdk alternative does not exist". Also, chromium is running with no problems and added some updates above. –  alexpotato Jun 2 '11 at 13:56

You are having this problem because firefox probably do go well with openJDK. I had similar problem with google-chrome.

First remove OpenJDK and then try following commands:

sudo add-apt-repository "deb http://archive.canonical.com/ lucid partner"
sudo apt-get update
sudo apt-get install sun-java6-jre sun-java6-plugin

it should work.

share|improve this answer
    
I already did this prior to posting my original question. The only java I have now is the sun java6 and the plug in. –  alexpotato Jun 1 '11 at 19:18

Not the answer you're looking for? Browse other questions tagged or ask your own question.