![]() |
|
|||||||
| Development Help Help for building applications or diagnosing problems with WWJ |
![]() |
|
|
Thread Tools | Display Modes |
|
|
#1 |
|
WWJ Consultant
Join Date: Jun 2005
Location: Saint-Paul de Vence, Alpes Maritimes, France
Posts: 3,412
![]() |
We just updated the WWJ applet package for the new java plugin support available since Java 6_10 which improved robustness solves a number of issues. Please find the updated applet package documentation here.
The following code samples allow you to use the new Java plugin whenever it is available on the client browser and to fall back on the JNLPAppletLauncher otherwise. HTML applet declaration for backward compatibility with 'old' plugin using the JNLPAppletLauncher: Code:
<applet code="org.jdesktop.applet.util.JNLPAppletLauncher"
width=600
height=400
archive="http://download.java.net/media/applet-launcher/applet-launcher.jar,
http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jar,
http://download.java.net/media/gluegen/webstart/gluegen-rt.jar,
http://my.web.server.com/WWJApplet/worldwind.jar">
http://my.web.server.com/WWJApplet/myapplet.jar">
<param name="jnlp_href" value="WWJApplet.jnlp"> <!-- Picked up by new plugin -->
<param name="codebase_lookup" value="false">
<param name="subapplet.classname" value="gov.nasa.worldwind.examples.applet.WWJApplet">
<param name="subapplet.displayname" value="World Wind Applet">
<param name="noddraw.check" value="true">
<param name="progressbar" value="true">
<param name="jnlpNumExtensions" value="1">
<param name="jnlpExtension1"
value="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp">
</applet>
Code:
<?xml version="1.0" encoding="UTF-8"?>
<jnlp href="WWJApplet.jnlp">
<information>
<title>World Wind Java Applet Demo</title>
<vendor>NASA</vendor>
<homepage href="http://worldwind.arc.nasa.gov"/>
<description>World Wind Java Applet Demo</description>
<description kind="short">World Wind Java Applet Demo</description>
<offline-allowed/>
</information>
<security>
<all-permissions/>
</security>
<resources os="Windows">
<property name="sun.java2d.noddraw" value="true"/>
</resources>
<resources>
<j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+" initial-heap-size="512m"
max-heap-size="512m"/>
<property name="sun.java2d.noddraw" value="true"/>
<jar href="WWJApplet.jar" main="true"/>
<jar href="worldwind.jar"/>
<extension name="jogl"
href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp"/>
</resources>
<!-- Width and heigth are overwritten by the surrounding web page -->
<applet-desc
name="WWJ Applet"
main-class="gov.nasa.worldwind.examples.applet.WWJApplet"
width="800" height="600">
<param name="separate_jvm" value="true" />
</applet-desc>
</jnlp>
As of January 2009 the Next Generation Plugin works with Internet Explorer 6 and 7 on Windows XP or Vista, Firefox 3 on Windows, Solaris and Linux. You can read the new plugin release notes at Release Notes for the Next Generation Java Plug-In Technology. When using javascript to java communication it is recommended to use the following javascript code to access the applet: Code:
var theApplet = null;
function getWWJApplet()
{
if (theApplet == null) {
theApplet = document.getElementById('wwjApplet');
}
// See if we're using the old Java Plug-In and the JNLPAppletLauncher
try {
theApplet = theApplet.getSubApplet();
} catch (e) {
// Using new-style applet -- ignore
}
return theApplet;
}
// Call someAppletMethod() via the getWWJApplet() method
getWWJApplet().someAppletMethod();
|
|
|
|
|
|
#2 |
|
Junior Member
Join Date: Dec 2009
Posts: 2
![]() |
As a Newbie, I am always searching online for stuff that can help me. Thank you for your help.
__________________
LMT |
|
|
|
|
|
#3 |
|
Guest
Posts: n/a
|
Greetings:
I have tried several Applet examples and keep getting this persistent problem, even with the next generation launcher: The examples fail to run due to signing problems! Either I get failures due to "different jar files in the JNLP being signed with different certs", or in some cases the DLLs have signatures that can't be verified. Could someone put in a description of how these problems can be resolved??? Thank you. |
|
|
|
#4 | |
|
Junior Member
Join Date: Mar 2011
Location: UK
Posts: 27
![]() |
Quote:
The important thing to note is that all jars used by the applet must be signed with the same certificate, as indicated in the error message. |
|
|
|
|
|
|
#5 |
|
Junior Member
Join Date: Jun 2011
Posts: 1
![]() |
Helpful applet info - thank you Patmurris.
|
|
|
|
|
|
#6 |
|
Junior Member
Join Date: Dec 2009
Posts: 23
![]() |
How can I deploy the worldwind.xml and worldwind.layers.xml out of worldwind.jar.
|
|
|
|
![]() |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|