**Despite how long this looks, I know it is very simple, I just added lots of details, netbeans generated all the JAR’s, so I am just trying to get the javascript stuff (which I do not understand) to match up with the JAR’ and how this should all work.
Basically, I just want the applet to pop-up in it’s own window on the url below.
site: http://dawnofvengeance.com/testchat/ (oh, and why is there a java error box on the index page as well, why? it should only be a pop-up) I also just realized that box shows up on the other link below which currently works with the pop-up setup.
I have an applet that already works here http://dawnofvengeance.com/applications/
Also, I am using a jar from selenium and that is what one of the errors returns to me.
Here is my setup… (again, I am not sure what is exactly all going as far as specifying the JAR’s within the HTML below).
If you run the page, it says there is some sort of error with the selenium JAR.
note: the selenium jar is in this folder as well as in the lib folder, because I am not sure where it goes. I got the launch.jar, launch.html, and IGCTestApplication.jar all from the dist after doing Clean and Build, the application is setup for Web…so I must just have something wrong in the HTML
HTML pages:
index.html
Java Syntax (Toggle Plain Text)
<html> <HEAD><title>RuneScape StatApp - V0.2.0</title><SCRIPT LANGUAGE="JavaScript"><!-- Idea by: Nic Wolfe --><!-- This script and many more are available free online at --><!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Beginfunction popUp(URL) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=613,height=481,left = 499.5,top = 221');");}// End --></script> <HEAD> <h1><font color="#FFFFFF">Make sure to disable your pop-up blocker; if applet is blocked by browser, just allow pop-ups on this site then reload the page to start the applet again</font></h1> <BODY onLoad="javascript:popUp('http://www.dawnofvengeance.com/testchat/launch.html')"><body bgcolor="#000000"> <h3><font color="#FF0000">once applet shows up, you may exit this page.Thank you!-Austin</font></h3><p><p><h4><font color="#FFFFFF">Please report any bugs to Run You Camper on the IGC forum page, or just click <a href="http://www.igcgamers.com/forum/ucp.php?i=pm&mode=compose&u=18216">here</a></font></h4> <!-- Script Size: 0.73 KB --> <applet code="com.dawnofvengeance" archive="IGCChatApplication.jar"/> </html><html>
<HEAD>
<title>
RuneScape StatApp - V0.2.0
</title>
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by: Nic Wolfe -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=0,menubar=0,resizable=0,width=613,height=481,left = 499.5,top = 221');");
}
// End -->
</script>
<HEAD>
<h1><font color="#FFFFFF">Make sure to disable your pop-up blocker; if applet is blocked by browser, just allow pop-ups on this site then reload the page to start the applet again</font></h1>
<BODY onLoad="javascript<b></b>:popUp('http://www.dawnofvengeance.com/testchat/launch.html')">
<body bgcolor="#000000">
<h3><font color="#FF0000">once applet shows up, you may exit this page.
Thank you!
-Austin</font></h3>
<p><p>
<h4><font color="#FFFFFF">Please report any bugs to Run You Camper on the IGC forum page, or just click <a href="http://www.igcgamers.com/forum/ucp.php?i=pm&mode=compose&u=18216">here</a></font></h4>
<!-- Script Size: 0.73 KB -->
<applet code="com.dawnofvengeance" archive="IGCChatApplication.jar"/>
</html>
launch.html
Java Syntax (Toggle Plain Text)
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><!-- ########################## IMPORTANT NOTE ############################ --><!-- This preview HTML page will work only with JDK 6 update 10 and higher! --><!-- ###################################################################### --><html> <head> <title>Test page for launching the applet via JNLP</title> </head> <body> <h3>Test page for launching the applet via JNLP</h3> <script src="http://java.com/js/deployJava.js"></script> <script> var attributes = { code: "mypackage.RunescapeStatsApplet", archive: "IGCChatApplication.jar, lib/selenium-server-standalone-2.9.0.jar", width: 900, height: 900 }; var parameters = {jnlp_href:"launch.jnlp"}; <!-- Applet Parameters --> var version = "1.5"; <!-- Required Java Version --> deployJava.runApplet(attributes, parameters, version); </script> <!-- Or use the following applet element to launch the applet using jnlp_href --> <!-- <applet width="900" height="900"> <param name="jnlp_href" value="launch.jnlp"/> </applet> --> </body></html><!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- ########################## IMPORTANT NOTE ############################ -->
<!-- This preview HTML page will work only with JDK 6 update 10 and higher! -->
<!-- ###################################################################### -->
<html>
<head>
<title>Test page for launching the applet via JNLP</title>
</head>
<body>
<h3>Test page for launching the applet via JNLP</h3>
<script src="http://java.com/js/deployJava.js"></script>
<script>
var attributes = {
code: "mypackage.RunescapeStatsApplet",
archive: "IGCChatApplication.jar, lib/selenium-server-standalone-2.9.0.jar",
width: 900,
height: 900
};
var parameters = {jnlp_href:"launch.jnlp"}; <!-- Applet Parameters -->
var version = "1.5"; <!-- Required Java Version -->
deployJava.runApplet(attributes, parameters, version);
</script>
<!-- Or use the following applet element to launch the applet using jnlp_href -->
<!--
<applet width="900" height="900">
<param name="jnlp_href" value="launch.jnlp"/>
</applet>
-->
</body>
</html>
tester.html
Java Syntax (Toggle Plain Text)
<html><HEAD> <SCRIPT LANGUAGE="JavaScript"><!-- Idea by: Nic Wolfe --><!-- This script and many more are available free online at --><!-- The JavaScript Source!! http://javascript.internet.com --> <!-- Beginfunction popUp(URL) {day = new Date();id = day.getTime();eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=615,height=483,left = 332.5,top = 270.5');");}// End --></script></head> <BODY onLoad="javascript:popUp('http://www.dawnofvengeance.com/testchat/launch.html')"> </html><html>
<HEAD>
<SCRIPT LANGUAGE="JavaScript">
<!-- Idea by: Nic Wolfe -->
<!-- This script and many more are available free online at -->
<!-- The JavaScript Source!! http://javascript.internet.com -->
<!-- Begin
function popUp(URL) {
day = new Date();
id = day.getTime();
eval("page" + id + " = window.open(URL, '" + id + "', 'toolbar=0,scrollbars=0,location=0,statusbar=1,menubar=0,resizable=0,width=615,height=483,left = 332.5,top = 270.5');");
}
// End -->
</script>
</head>
<BODY onLoad="javascript<b></b>:popUp('http://www.dawnofvengeance.com/testchat/launch.html')">
</html>
I am sure you guys can figure out where the JAR’s go,
Again, this is all sort of a mess so I apologize, but thank you all so much!
-Austin
EDIT:
error I get
Java Plug-in 1.6.0_24 Using JRE version 1.6.0_24-b07 Java HotSpot(TM)
Client VM User home directory = C:\Users\anderaus
—————————————————- c: clear console window f: finalize objects on finalization queue g:
garbage collect h: display this help message l: dump classloader
list m: print memory usage o: trigger logging q: hide console r:
reload policy configuration s: dump system and deployment properties
t: dump thread list v: dump thread stack x: clear classloadercache 0-5: set trace level to
sun.plugin2.main.client.PluginMain: unrecognized message ID 42
exception: Unable to load resource:
wwwdawnofvengeancecom/testchat/lib/selenium-server-standalone-2.9.0.jar.
com.sun.deploy.net.FailedDownloadException: Unable to load resource:
wwwdawnofvengeancecom/testchat/lib/selenium-server-standalone-2.9.0.jar
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown
Source) at
com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown
Source) at com.sun.deploy.net.DownloadEngine.getResource(Unknown
Source) at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown
Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) Caused by:
java.io.EOFException: Unexpected end of ZLIB input stream at
java.util.zip.InflaterInputStream.fill(Unknown Source) at
java.util.zip.InflaterInputStream.read(Unknown Source) at
java.util.zip.ZipInputStream.read(Unknown Source) at
com.sun.deploy.net.HttpDownloadHelper.decompressWrite(Unknown Source)
at com.sun.deploy.net.HttpDownloadHelper.download(Unknown Source) at
com.sun.deploy.cache.Cache.downloadResourceToTempFile(Unknown Source)
at com.sun.deploy.cache.Cache.downloadResourceToCache(Unknown Source)
at com.sun.deploy.net.DownloadEngine.actionDownload(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getCacheEntry(Unknown Source)
at com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown
Source) at
com.sun.deploy.net.DownloadEngine.getResourceCacheEntry(Unknown
Source) at com.sun.deploy.net.DownloadEngine.getResource(Unknown
Source) at com.sun.javaws.LaunchDownload$DownloadTask.call(Unknown
Source) at java.util.concurrent.FutureTask$Sync.innerRun(Unknown
Source) at java.util.concurrent.FutureTask.run(Unknown Source) at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source) Exception:
com.sun.deploy.net.FailedDownloadException: Unable to load resource:
wwwdawnofvengeancecom/testchat/lib/selenium-server-standalone-2.9.0.jar
As I can see you are trying to have downloaded an external lib. That’s the JS says
I do recommend not to use external libs in this way but to have it added right into your applet jar. this path as
should be in your
… of course, to say more I need to see how your applet is really configured and how the missing lib is imported. At least try to re-configure your applet as I was saying… If there flow out some additional errors I do hope the question is to be more detailed 🙂
Good Luck