I am attempting to embed an applet on a webpage. I have exported the code as a compressed applet in IntelliJ. Now, when I try to run it, I get the following stack trace:
java.lang.IllegalArgumentException: white space not allowed
at java.net.URLPermission.normalizeHeaders(URLPermission.java:401)
at java.net.URLPermission.init(URLPermission.java:189)
at java.net.URLPermission.<init>(URLPermission.java:166)
at sun.net.www.protocol.http.HttpURLConnection.URLtoSocketPermission(HttpURLConnection.java:1031)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1424)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.checkUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.ResourceProviderImpl.isUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.DeployCacheHandler.get(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect0(HttpURLConnection.java:1048)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:987)
at sun.net.www.protocol.http.HttpURLConnection$6.run(HttpURLConnection.java:985)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:713)
at sun.net.www.protocol.http.HttpURLConnection.plainConnect(HttpURLConnection.java:984)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(AbstractDelegateHttpsURLConnection.java:177)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect0(HttpURLConnection.java:2648)
at sun.net.www.protocol.http.HttpURLConnection.access$300(HttpURLConnection.java:90)
at sun.net.www.protocol.http.HttpURLConnection$12.run(HttpURLConnection.java:2565)
at sun.net.www.protocol.http.HttpURLConnection$12.run(HttpURLConnection.java:2563)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:713)
at sun.net.www.protocol.http.HttpURLConnection.followRedirect(HttpURLConnection.java:2562)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLConnection.java:1768)
at sun.net.www.protocol.http.HttpURLConnection.access$200(HttpURLConnection.java:90)
at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1431)
at sun.net.www.protocol.http.HttpURLConnection$9.run(HttpURLConnection.java:1429)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessController.doPrivileged(AccessController.java:713)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1428)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(HttpsURLConnectionImpl.java:254)
at sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(URLJarFile.java:205)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(URLJarFile.java:71)
at sun.net.www.protocol.jar.JarFileFactory.get(JarFileFactory.java:99)
at sun.net.www.protocol.jar.JarURLConnection.connect(JarURLConnection.java:122)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$1000(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.<init>(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(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.loadClass0(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at sun.plugin2.applet.Plugin2ClassLoader.loadCode(Unknown Source)
at sun.plugin2.applet.Plugin2Manager.initAppletAdapter(Unknown Source)
at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
at java.lang.Thread.run(Thread.java:744)
Ignored exception: java.lang.IllegalArgumentException: white space not allowed
I believe the error was caused by trying to get an image with the getImage() method in the Applet class. This is the code:
try {
image = new ImageIcon(main.getImage(main.getCodeBase(), imageName + ".png"));
} catch (Exception e) {
e.printStackTrace();
}
For reference, here's the tag I'm using in the HTML:
<applet archive="https://github.com/nrubin29/FreeFall-Applets/blob/master/Noah/Noah.war?raw=true" code="FreeFallMain"></applet>
If you want to see the error for yourself, just go to http://nrubin29.github.io/FreeFall-Applets/
Thanks!
If you're using Java 8, it looks like there's an open bug around this exact behavior:
https://bugs.openjdk.java.net/browse/JDK-8042622?page=com.atlassian.jira.plugin.system.issuetabpanels:changehistory-tabpanel
In essence, the bug is that it's a core bug in Java, and nothing you can do can fix it. So you'll have to wait for Java 8u40 (if the fix actually hits their target release).
I had a similar issue (with the upgrade from java 1.7.0_67 to java 1.8.0_25) opening a page that redirects to a pdf document with code like this:
InputStream in = new URL(myUrl).openConnection().getInputStream();
I have found a possible (hopefully temporary) workaround for those who can't wait next january (or april?) for java 8u40:
try {
InputStream in = new URL(myUrl).openConnection().getInputStream();
} catch (IllegalArgumentException iae) {
in = sun.net.www.protocol.http.HttpURLConnection.openConnectionCheckRedirects(new URL(myUrl).openConnection());
}
You can obviously add log and check if the open connection is istanceof HttpURLConnection.
I'm open to suggestions if you think what I've done is very wrong (consider I've stripped the non-essential parts).
Running Windows 7 I had this issue with JRE 8u25, and also with 8u40. I rolled back to 7u71 and the uploader works fine. Hope this helps.
It looks like one of those calls (or your main call) is causing a URL to be loaded (looks like it's a jar file), then there's a redirect, and there's a space or tab in one of the response HTTP headers names. What happens if you host the applet jar/war on a local webserver rather than Github?
Related
I am running an applet from browser and am getting error:
sun/misc/ProxyGenerator
java.lang.NoClassDefFoundError: sun/misc/ProxyGenerator
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Unknown Source)
at java.lang.reflect.Proxy$ProxyClassFactory.apply(Unknown Source)
at java.lang.reflect.WeakCache$Factory.get(Unknown Source)
at java.lang.reflect.WeakCache.get(Unknown Source)
at java.lang.reflect.Proxy.getProxyClass0(Unknown Source)
at java.lang.reflect.Proxy.newProxyInstance(Unknown Source)
at sun.reflect.annotation.AnnotationParser.annotationForMap(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
at java.lang.Class.getAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationType.<init>(Unknown Source)
at sun.reflect.annotation.AnnotationType.getInstance(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotation(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations2(Unknown Source)
at sun.reflect.annotation.AnnotationParser.parseAnnotations(Unknown Source)
at java.lang.Class.initAnnotationsIfNecessary(Unknown Source)
at java.lang.Class.getAnnotation(Unknown Source)
at com.thoughtworks.xstream.mapper.AnnotationMapper$UnprocessedTypesSet.add(AnnotationMapper.java:481)
at com.thoughtworks.xstream.mapper.AnnotationMapper$UnprocessedTypesSet.add(AnnotationMapper.java:466)
at com.thoughtworks.xstream.mapper.AnnotationMapper.processAnnotations(AnnotationMapper.java:142)
at com.thoughtworks.xstream.XStream.processAnnotations(XStream.java:1576)
at com.thoughtworks.xstream.XStream.processAnnotations(XStream.java:1587)
at com.plugin.PluginReader.getOptionalColumnsPluginPOJO(PluginReader.java:242)
at com.applet.GUIValuesApplet.getOptionalColumns(GUIValuesApplet.java:177)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.Trampoline.invoke(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.plugin.javascript.JSClassLoader.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass$MethodInfo.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass$MemberBundle.invoke(Unknown Source)
at sun.plugin2.liveconnect.JavaClass.invoke0(Unknown Source)
at sun.plugin2.liveconnect.JavaClass.invoke(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$DefaultInvocationDelegate.invoke(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo.doObjectOp(Unknown Source)
at sun.plugin2.main.client.LiveConnectSupport$PerAppletInfo$LiveConnectWorker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
If I run this applet from eclipse, it runs fine. I suspect there may be issue with jre version or accessing rt.jar in jre runtime. This is not code related issue for sure as everything was working until my system got restarted (it reboots per company policy on weekend). Therefore, any setting may have been changed.
Browser used: Chrome
latest version of jre on machine: jre7
code compiled using: jre6
Kindly respond as I have been facing this issue for long time now.
UPDATE:
Just to add, I get this error when I try to read xml file to Java class using annotaions in thoughtworks xstream lib
sun.misc is a vendor specific class which should not be used in portable Java code.
Either make the code portable or switch the browser plugin to the Oracle JVM.
Looks my jre installation got corrupt. I reinstalled it and it fixed the issue.
My application was running fine until I upgraded my jre to 7u40. When my application is initializing, it's doing Logger.getLogger("ClassName"), and I'm getting the following exception.
java.lang.ExceptionInInitializerError
at java.util.logging.Logger.demandLogger(Unknown Source)
at java.util.logging.Logger.getLogger(Unknown Source)
at com.company.Application.Applet.<clinit>(Unknown Source)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javaws.Launcher.executeApplication(Unknown Source)
at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
at com.sun.javaws.Launcher.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NullPointerException
at java.util.logging.Logger.setParent(Unknown Source)
at java.util.logging.LogManager$6.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.doSetParent(Unknown Source)
at java.util.logging.LogManager.access$1100(Unknown Source)
at java.util.logging.LogManager$LogNode.walkAndSetParent(Unknown Source)
at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source)
at java.util.logging.LogManager$LoggerContext.addLocalLogger(Unknown Source)
at java.util.logging.LogManager.addLogger(Unknown Source)
at java.util.logging.LogManager$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.util.logging.LogManager.<clinit>(Unknown Source)
The exception is coming from this line:
private static Logger logger = Logger.getLogger(Applet.class.getName());
Could it be because of any sideeffects with fix http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=8017174 ?
A workaround is to open the java control center and enable logging. This is a concern since by default "Enable Logging" is unchecked. If I select "Enable Logging", the application starts fine.
This problem seems to be fixed in java7 update 45.
Try to package java.util.logging.* with your app in a JAR, and make sure it's on the classpath. That way it is always available. Also, what does your logging.properties look like?
I'm trying to debug an applet that occasionally fails with the stack trace below (on the Java Console).
It looks like it's trying to load binaries and it's getting an HTTP REDIRECT which isn't legal (perhaps because of the applet sandbox?).
Is there any way to turn on verbose class loading output (or other debugging that might be useful) on the Java Console? If this were a standard Java application (as opposed to an applet), I would put "-verbose:class" on the command line and see what I get - but I don't know how to do that with an applet.
I don't have access to the source for the applet - so I can't add any kind of instrumentation to the code itself.
java.lang.SecurityException: illegal URL redirect
at com.sun.deploy.net.HttpUtils.followRedirects(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doRequest(Unknown Source)
at com.sun.deploy.net.BasicHttpRequest.doGetRequestEX(Unknown Source)
at com.sun.deploy.net.DownloadEngine.isUpdateAvailable(Unknown Source)
at com.sun.deploy.cache.DeployCacheHandler.get(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 sun.plugin.PluginURLJarFileCallBack.downloadJAR(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack.access$000(Unknown Source)
at sun.plugin.PluginURLJarFileCallBack$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin.PluginURLJarFileCallBack.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.retrieve(Unknown Source)
at sun.net.www.protocol.jar.URLJarFile.getJarFile(Unknown Source)
at sun.net.www.protocol.jar.JarFileFactory.get(Unknown Source)
at sun.net.www.protocol.jar.JarURLConnection.connect(Unknown Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.connect(Unknown
Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFileInternal(Unknown
Source)
at sun.plugin.net.protocol.jar.CachedJarURLConnection.getJarFile(Unknown
Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.getJarFile(Unknown
Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.access$800(Unknown
Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader$1.run(Unknown
Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.ensureOpen(Unknown
Source)
at com.sun.deploy.security.DeployURLClassPath$JarLoader.(Unknown
Source)
at com.sun.deploy.security.DeployURLClassPath$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getLoader(Unknown Source)
at com.sun.deploy.security.DeployURLClassPath.getResource(Unknown Source)
at sun.plugin2.applet.Plugin2ClassLoader$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at sun.plugin2.applet.Plugin2ClassLoader.findClassHelper(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.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.SecurityException: illegal URL redirect
You can add the -verbose:class to the command line of java by going to Control Panel, Java, Java, View, then editing the 'runtime parameters'.
To make your applet get sources NOT FROM its native host you have to sign it;
Here are some helpful tutorials
Report that helps
The applet I build runs well off my localhost but when I upload it to server and look at url I recive these java applet errors: Are there extra steps I may have missed to get the applet to work when transferring 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)
Are you sure the upload was correct?
The error message " Incompatible magic value" shows an invalid class file.
Can you also check, that the class file can be retrieved from the URL without error? If the server returns an error, a similar Java error will occur. Try to retrieve the class file with curl or something similar.
I need this applet located here link text (the same in a popup is here: http://tcip.mste.illinois.edu/applet_popup.php?num=2)
I have downloaded (actually mirrored the whole site :D ) all the jars & the js files.
one of the js (tcip.js) describes which applet will be called & from which class located in a particular jar file.
So, how can I execute/run it offline? is it like that I have to include all the jar files in a netbeans project and then run it?
As am using Java and I need this applet for a Power Grid presentation in my college.
One of the lines which I was able to get in page's source was this:
edu.uiuc.TCIP.education.summer06.lessons.lesson4.Lesson4Applet
what does this mean..? is it like all the 5-6 jar files which I have download are run simultaneously.. and then one of the jar file named "lessons" or "lessons_old_naming" is having this structure
edu.uiuc.TCIP.education.summer06.lessons.lesson4.Lesson4Applet
as in this is the package structure..? and Lesson4Applet is what I want to get executed..?
How can I get it for offline viewing/execution..?
would appreciate it..if anyone from you could get it working for me..for offline (locally executed jar) viewing.
console output/error-details:
Java Plug-in 1.6.0_22
Using JRE version 1.6.0_22-b04 Java HotSpot(TM) Client VM
User home directory = C:\Users\~Ultimate~
----------------------------------------------------
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 edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet not found.
java.lang.ClassNotFoundException: edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet
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)
Caused by: java.io.FileNotFoundException: F:\USB_240910\ht\nw22\nw22\tcip.mste.illinois.edu\edu\uiuc\TCIP\education\summer06\lessons\lesson2\Lesson2Applet.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(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)
... 9 more
Exception: java.lang.ClassNotFoundException: edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet
load: class edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet not found.
java.lang.ClassNotFoundException: edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet
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)
Caused by: java.io.FileNotFoundException: F:\USB_240910\ht\nw22\nw22\tcip.mste.illinois.edu\edu\uiuc\TCIP\education\summer06\lessons\lesson2\Lesson2Applet.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(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)
... 9 more
Exception: java.lang.ClassNotFoundException: edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet
load: class edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet not found.
java.lang.ClassNotFoundException: edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet
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)
Caused by: java.io.FileNotFoundException: F:\USB_240910\ht\nw22\nw22\tcip.mste.illinois.edu\edu\uiuc\TCIP\education\summer06\lessons\lesson2\Lesson2Applet.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(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)
... 9 more
Exception: java.lang.ClassNotFoundException: edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet
load: class edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet not found.
java.lang.ClassNotFoundException: edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet
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)
Caused by: java.io.FileNotFoundException: F:\USB_240910\ht\nw22\nw22\tcip.mste.illinois.edu\edu\uiuc\TCIP\education\summer06\lessons\lesson2\Lesson2Applet.class (The system cannot find the path specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(Unknown Source)
at java.io.FileInputStream.<init>(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
at sun.net.www.protocol.file.FileURLConnection.getInputStream(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)
... 9 more
Exception: java.lang.ClassNotFoundException: edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet
Delving into the JS that launches that applet suggests the relevant applet element is:
<APPLET name='myApplet' WIDTH = 800 HEIGHT = 600
CODE='edu.uiuc.TCIP.education.summer06.lessons.lesson2.Lesson2Applet'
ARCHIVE='jfreechart-1.0.10.jar , jcommon-1.0.13.jar , jama-1.0.2.jar, lessons_old_naming.jar , psdataobjects.jar, psdisplayobjects.jar, anl_lpsolver.jar , zebLP.jar'>
</APPLET>
If you create an HTML with that applet element and a codebase of http://tcip.mste.illinois.edu/, it should work. Mind you, once the applet loaded in my FF, I got simply a 'black screen' (shrugs).
BTW - do you have permission from the makers of the applet and the site to use their applet?
BTW - I have tested this applet element and seen it work locally!
Later: Now I look at your question more carefully, I realize that I never really answered it correctly, because I missed the 'offline' specifics. My bad!
By adding the codebase attribute, I was 'cheating' by allowing the JRE to reach back to the originating site for all the resources. AFAIU those resources are:
The Jars mentioned in the archive attribute.
The images used by the applet.
This is going to be a little more tricky.
Let us assume you want the HTML to be (poorly) named OFFLINE_applet.html, and you want everything located into the powergrid directory. In that case, the structure would be..
powergrid
OFFLINE_applet.html
jfreechart-1.0.10.jar
jcommon-1.0.13.jar
jama-1.0.2.jar
lessons_old_naming.jar
psdataobjects.jar
psdisplayobjects.jar
anl_lpsolver.jar
zebLP.jar
applet_images
the images found in http://tcip.mste.illinois.edu/applet_images/
Actually, not every image in applet_images is required. This applet only uses about 20 of them AFAIR, but download all of them it and should work.
Of course, remove the 'codebase' attribute, or the JRE will still be trying to reach back to the http://tcip.mste.illinois.edu/ site for the resources!
Test it and get back to me.
Save the result of the php page as html page and open it in any browser. It the applet does not need a server connection then it will work.