Hi all,
I have noticed a strange and different behaviour between the Notes client’s JVM and the Sun Java plusgin 1.4.2.
When executing the simple code below as an applet in the Notes client, the second popup returns “null” instead" of the URL I’d like to get. The same applet accessed from a web browser (and the Sun Java plugin 1.4.2) returns a correct URL.
Here is the class:
package mypackage;
import java.net.URL;
import javax.swing.JApplet;
public class Main extends JApplet {
public void init() {
URL url = null;
try {
javax.swing.JOptionPane.showMessageDialog(null, "Getting URL for '/mypackage/Main.class'");
url = mypackage.Main.class.getResource("/mypackage/Main.class");
javax.swing.JOptionPane.showMessageDialog(null, "URL for '/mypackage/Main.class':\n" + url);
} catch (Exception e) {
javax.swing.JOptionPane.showMessageDialog(null, "exception = "+ e);
}
}
public void start(){}
public void stop(){}
public void destroy(){}
}
What is so different in the IBM’s JVM regarding to Sun’s one?
Is there a workaround for this?
Thanks
Phil