Accessing java applet public variables
JvR O
jvr968 at gmail.com
Tue Feb 18 10:50:36 PST 2014
I sent values to the signed applet.
On html:
<applet
id='appletid'
codebase="/demo/"
code='appletpkg.appletclass'
archive='./sapplet.jar'
width=1 height=1>
<param name="valuename1" value="value1">
</applet>
In the applet public class:
public String[] str = new String[100];
@Override
public void init() {
nstr = this.getParameter("valuename1");
//TODO
this.str[0]= "appletstringvalue1";
}
At javascript:
var a = document.getElementById('appletid');
var jstr = a.str;
alert('jstr: '+jstr[0]);
If I use a similar script with ORACLE JRE on windows or mac the alerts
shows a string.
jstr: appletstringvalue1
But if I use similiar script on ubuntu with OPENJDK I receive.
jstr: undefined
The java.log shows the value of jstr if I print to the log in both cases.
Why Javascript is not receiving the applet values on linux or openjdk?
The conversion of the objects (Java/Applet to JS) works correctly in the
ORACLE JRE but with OPENJDK wich comes with linux (Ubuntu or Fedora, etc)
is not working, or maybe I need to access to JavaArray in a different way?
Any suggestion?
Thank You.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20140218/27f946b4/attachment.html
More information about the distro-pkg-dev
mailing list