Support for per-applet Package keywords was removed for 7u21. A sample in the Java Tutorials used this (http://docs.oracle.com/javase/tutorial/deployment/applet/examples/dist/applet_InvokingAppletMethodsFromJavaScript/AppletPage.html) and must be updated to work without the Package keyword:
Basically wherever <applet>.Packages was used will have to be replaced with an actual method or field in the applet that provides access to whatever class or method that JavaScript was trying to use.
So these:
// "Packages" keyword; check Java console log
// for this message
mathApplet.Packages.java.lang.System.out.
println("Testing printing to System.out");
// Set static field using "Packages" keyword;
// static methods may be similarly invoked
mathApplet.Packages.jstojava.DateHelper.label =
"Today\'s date is: ";
// Create an instance of a class and invoke
// method using "Packages" keyword
var dateHelper =
new mathApplet.Packages.jstojava.DateHelper();
var dateStr = dateHelper.getDate();
would need to change to something like:
// check Java console log for this message
mathApplet.printOut("Testing printing to System.out"); // or just removed really
// Set applet field
// methods may be similarly invoked
mathApplet.dateHelperLabel = "Today\'s date is: ";
// Create an instance of a class and invoke
// method using "Packages" keyword
var dateHelper = mathApplet.getDateHelper();
var dateStr = dateHelper.getDate();
then the corresponding fields and methods added to the applet itself.
Basically wherever <applet>.Packages was used will have to be replaced with an actual method or field in the applet that provides access to whatever class or method that JavaScript was trying to use.
So these:
// "Packages" keyword; check Java console log
// for this message
mathApplet.Packages.java.lang.System.out.
println("Testing printing to System.out");
// Set static field using "Packages" keyword;
// static methods may be similarly invoked
mathApplet.Packages.jstojava.DateHelper.label =
"Today\'s date is: ";
// Create an instance of a class and invoke
// method using "Packages" keyword
var dateHelper =
new mathApplet.Packages.jstojava.DateHelper();
var dateStr = dateHelper.getDate();
would need to change to something like:
// check Java console log for this message
mathApplet.printOut("Testing printing to System.out"); // or just removed really
// Set applet field
// methods may be similarly invoked
mathApplet.dateHelperLabel = "Today\'s date is: ";
// Create an instance of a class and invoke
// method using "Packages" keyword
var dateHelper = mathApplet.getDateHelper();
var dateStr = dateHelper.getDate();
then the corresponding fields and methods added to the applet itself.