I'm having some problems while trying to open a web-client for a game that I play. I get this error and I don't know what to do. Help would be appreciated. If you need any more information please let me know and I will do the best I can to get it.
load: class client.class not found.
java.lang.ClassNotFoundException: client.class
at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.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)
Exception: java.lang.ClassNotFoundException: client.class
It seems you are running your web client like this:
$ java client.class
Try running this instead:
$ java client
Related
I've seen a few posts similar to this issue, but can't seem to find a resolution that works.
My program is using UCanAccess dependencies, and everything runs great using inteliJ. Once I try to run the JAR file, I get the following:
Error: A JNI error has occurred, please check your installation and try a
Exception in thread "main" java.lang.SecurityException: Invalid signature
igest for Manifest main attributes
at sun.security.util.SignatureFileVerifier.processImpl(Unknown So
at sun.security.util.SignatureFileVerifier.process(Unknown Source
at java.util.jar.JarVerifier.processEntry(Unknown Source)
at java.util.jar.JarVerifier.update(Unknown Source)
at java.util.jar.JarFile.initializeVerifier(Unknown Source)
at java.util.jar.JarFile.getInputStream(Unknown Source)
at sun.misc.URLClassPath$JarLoader$2.getInputStream(Unknown Sourc
at sun.misc.Resource.cachedInputStream(Unknown Source)
at sun.misc.Resource.getByteBuffer(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$100(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)
I know this has to do with dependencies because I have another program without dependencies that I've configured the exact same way, and this works fine.
This is a Windows 7 Machine. The JDK was already downgraded to Windows 7, which was an issue I faced with a previous project on this machine.
Here is what I can show:
My Manifest File simply states:
Manifest-Version: 1.0
Main-Class: com.company.Main
Any ideas?
I'm trying to start Lint4J (0.9.1) from the command line on a mac. And I wanted to run it on a small test class. But unfortunately I always get a null pointer exception.
I have JDK 1.8.0
My test class:
package ch.ntb.sir.testmain;
public class TestMain {}
I've downloaded the lint4j package from the official website. It's not in the same folder as the test class.
This is the command I executed:
/Users/.../lib/lint4j-0.9.1/bin/lint4j -sourcepath /Users/.../ClassToCheck/src ch.ntb.sir.testmain
I execute it from the terminal in the project folder from my test class.
What I get as output:
Exception in thread "main" java.lang.RuntimeException: java.lang.NullPointerException
at lint4j.aZ.a(Unknown Source)
at lint4j.aZ.a(Unknown Source)
at lint4j.fx.b(Unknown Source)
at lint4j.fx.b(Unknown Source)
at lint4j.fx.b(Unknown Source)
at lint4j.fx.a(Unknown Source)
at lint4j.aw.c(Unknown Source)
at lint4j.aw.e(Unknown Source)
at lint4j.ai.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.dq.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.eO.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.by.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.dP.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.dI.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at lint4j.ap.a(Unknown Source)
at lint4j.cQ.a(Unknown Source)
at com.jutils.lint4j.Lint4j.initialize(Unknown Source)
at com.jutils.lint4j.Lint4j.execute(Unknown Source)
at com.jutils.lint4j.cmdline.Main.main(Unknown Source)
Caused by: java.lang.NullPointerException
at lint4j.q.a(Unknown Source)
... 25 more
I've found nothing that helped me on this sites:
http://www.jutils.com/uguide.html
http://www.jutils.com/auditingcode.html
and also in the lint4j.pdf was nothing helpful
All tips are welcome! Thanks for your help.
I've learned, that Lint4J is a "dead" project. Last updated in 2007
Static Analysis tool recommendation for Java?
https://github.com/checkstyle/checkstyle/wiki/Java-static-code-analysis-tools
So it would be a bad idea to use it for a new project.
I'll try: FindBugs, Checkstyle, PMD,... their last update was in between 2015-2016
I have one client getting this error whilst the applet is working properly for a number of other users.
java.lang.ClassFormatError: Incompatible magic value 1010792557 in class file %className%
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
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)
java.lang.SecurityException: class "%className%"'s signer information does not match signer information of other classes in the same package
at java.lang.ClassLoader.checkCerts(Unknown Source)
at java.lang.ClassLoader.preDefineClass(Unknown Source)
at java.lang.ClassLoader.defineClassCond(Unknown Source)
at java.lang.ClassLoader.defineClass(Unknown Source)
at java.security.SecureClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.defineClass(Unknown Source)
at java.net.URLClassLoader.access$000(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
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)
I believe that the magic value represents the start of an xml tag (based on this Incompatible magic value 1010792557 when trying to run applet embedded in Facelets). The security error occurs after the magic value error and I suspect its a byproduct of the first problem.
What I can't fathom is why this is happening to one client only.
All clients are using JRE version 1.6.0_24-b07 and IE 8.0.6001.18702.
On the clients machine I have tried clearing the cache, deleting temporary internet files, and deleting temporary internet files via the java control panel. I have also tried deleting the certificate from the javacpl 'trusted certificates' list and even turning off verification from javacpl>Advanced>Security>Mixed Code.
I'm out of ideas and would love to hear any suggestions on what the problem/solution might be.
Oh, the applet is hosted in a java wicket project running on tomcat 7.0.19 via apache 2.2 (on windows server 2008).
My applet that connects JS/Java with LiveConnect worked from localhost but when transferring to server I get this error in java applet console. Do I have to do something before I transfer these files?
java.lang.ClassFormatError: Incompatible magic value 1008821359 in class file PrintJob/Print_Runner at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(Unknown Source) at java.lang.ClassLoader.defineClass(Unknown Source) at java.security.SecureClassLoader.defineClass(Unknown Source) at sun.plugin2.applet.Applet2ClassLoader.findClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass0(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source) at sun.plugin2.applet.Plugin2ClassLoader.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) Exception: java.lang.ClassFormatError: Incompatible magic value 1008821359 in class file PrintJob/Print_Runner
That means the class files didn't transfer properly. If you're using an FTP server make sure you have the binary option enabled.
I would like to insert an API java into a web page.
Even with such an easy code:
applet code =
'Ejs.Simulations._apps._examples.HVmin'
archive = 'Ejs/Simulations/_apps/_examples/HVmin/hVmin.jar',
width = 300,
height = 300 />
I get this error:
cargar: clase Ejs.Simulations._apps._examples.HVmin not found.
java.lang.ClassNotFoundException: Ejs.Simulations._apps._examples.HVmin
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.io.IOException: open HTTP connection failed:http://localhost/blanca/Ejs/Simulations/_apps/_examples/HVmin.class
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
Excepción: java.lang.ClassNotFoundException: Ejs.Simulations._apps._examples.HVmin
I don't know where to put HVmin.class, I have tryed in differents paths with the same result.
The file HVmin.class is in this path:
C:\xampp\htdocs\blanca\Ejs\Simulations\_apps\_examples\HVmin
Any help, please?
Thanks in advance
Just put that class in the .jar file with the rest of the applet.