You need to sign in to do that
Don't have an account?
John L.
Hosting a (very simple) Java applet on a salesforce.com web-page
I am attempting to host a Java applet as a Static Resource using Java 1.8.0_11. The Java code could not be simpler:
import javax.swing.JApplet;
class HelloWorld extends JApplet {
public void init() {
System.out.println("HelloWorld.init()");
}
public void start() {
System.out.println("HelloWorld.start()");
}
public void stop() {
System.out.println("HelloWorld.stop()");
}
public void destroy() {
System.out.println("HelloWorld.destroy()");
}
}
The manifest file is:
Manifest-Version: 1.0
Application-Name: HelloWorld
Main-Class: HelloWorld
Application-Library-Allowable-Codebase: https://csseht.na5.visual.force.com/resource/1421524096000/
Codebase: https://csseht.na5.visual.force.com/resource/1421524096000/
Permissions: all-permissions
Sealed: true
The error that occurs is:
RuntimeException: java.lang.reflect.InvocationTargetException
and I suspect a "chicken-and-egg" type scenario. I am unable to specify the correct path in the manifest file, as the Static Resource name/URL location is assigned when the Static Resource is uploaded and saved. (a timestamp-based algorithm of some sort, I suspect).
Thanks in advance for any help you may be able to provide
import javax.swing.JApplet;
class HelloWorld extends JApplet {
public void init() {
System.out.println("HelloWorld.init()");
}
public void start() {
System.out.println("HelloWorld.start()");
}
public void stop() {
System.out.println("HelloWorld.stop()");
}
public void destroy() {
System.out.println("HelloWorld.destroy()");
}
}
The manifest file is:
Manifest-Version: 1.0
Application-Name: HelloWorld
Main-Class: HelloWorld
Application-Library-Allowable-Codebase: https://csseht.na5.visual.force.com/resource/1421524096000/
Codebase: https://csseht.na5.visual.force.com/resource/1421524096000/
Permissions: all-permissions
Sealed: true
The error that occurs is:
RuntimeException: java.lang.reflect.InvocationTargetException
and I suspect a "chicken-and-egg" type scenario. I am unable to specify the correct path in the manifest file, as the Static Resource name/URL location is assigned when the Static Resource is uploaded and saved. (a timestamp-based algorithm of some sort, I suspect).
Thanks in advance for any help you may be able to provide
Your applet tag's src attribute can look like this:
if you use the URLFOR visualforce will write the proper path to the file server side before delivering the page. Thus eliminating chicken/egg situations.
Perhaps you could provide an authoritative reference for the correct syntax.
This USED TO work with the syntax I'm using, and it wasn't using the src attribute.
The manifest additions with the latest version of Java seem to suggest a design conflict.
My experience suggests that salesforce.com's half of the Java loader changed without any appropriate user notification. However, I must admit I am deficient in reviewing ALL of the REAMS of FREQUENTLY released documentation and information.