*** PLEASE HELP *** Java SE 6u11 - JWS starts my game twice in parallel

Hi,

I’ve ported my game to Java SE 6u11 concerning the deployment aspect. I use the deployment toolkit (deployJava.js). Pretty cool and useful feature! The issue with it is that it starts my game twice. Note that the issue happens only when Java isn’t installed and Java 6 gets installed in the process. I’ve used JWS for many years and never experienced this issue before. Here is the javascript code I use:


<script src="http://freewebs.com/jeromeblouin/deployJava.js"></script>
<script>
    var urlEn = "http://freewebs.com/jeromeblouin/incredibuilder/game.jnlp";
    deployJava.launchButtonPNG = "http://www.freewebs.com/jeromeblouin/playIncredibuilder-en.png";
    deployJava.setInstallerType('kernel');
    deployJava.createWebStartLaunchButton(urlEn, '1.4.2');
</script>

I host deployJava.js because I needed to have another copy that I modified to start the same game in French and I wanted to encapsulate the deployJava var so I renamed it deployJavaFr in the modified js file.

Here are my web start files:
game_main.jnlp:


<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://freewebs.com/jeromeblouin/incredibuilder" href="game_main.jnlp">
	<information>
		<title>Incredibuilder Extensions</title>
		<vendor>Jerome Blouin</vendor>
		<description>jar ressources</description>
	</information>
	<security>
		<all-permissions/>
	</security>
	<resources>
		<jar href="lib/sui.jar"/>
		<jar href="lib/commons-lang-2.3.jar"/>
		<extension href="http://slick.cokeandcode.com/demos/slick.jnlp" version="b237"/>
	</resources>
	<component-desc />
</jnlp>

game.jnlp:


<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://freewebs.com/jeromeblouin/incredibuilder" href="game.jnlp">
	<information>
		<title>Incredibuilder! (c)</title>
		<vendor>Jerome Blouin - http://freewebs.com/jeromeblouin</vendor>
		<homepage href="http://freewebs.com/jeromeblouin"/>
		<description>2D Action Puzzle Game</description>
		<offline-allowed />
		<shortcut>
			<desktop />
		</shortcut>
	</information>
	<security>
		<all-permissions/>
	</security>
	<resources>
	    <j2se version="1.4.2+"/>
		<jar href="lib/game.jar"/>
		<extension href="game_main.jnlp" />
		<property name="lang" value="en" />
	</resources>
	<application-desc main-class="buildergame.BuilderGame"/>
</jnlp>

Try the game to see the issue at http://www.freewebs.com/jeromeblouin/
You’ll need to uninstall all JREs that are 1.4.2 and higher.

Thanks!

You might want to ask this on this forum: http://forums.java.net/jive/forum.jspa?forumID=25

Dmitri

ok thanks. Will do.

trembovetski,

I posted my issue on this forum but it seems nobody is investigating it. Could you tell a word to the concerned people who developed the JSE 6u10 deployment tools please?

Thanks!

I didn’t mean to imply that someone would jump on it right away, but there’s a better chance of it being answered there than here since people working on deployment toolkit are reading that forum, and not this one.

Dmitri

Does the double-start happen when the deployJavaFr (the french version of deployJava) is completely excluded and there’s only one deployJava file?

I’ve created a new web page that contains only one JWS button with the unmodified deployJava.js and I still reproduce the issue.

OK, the java.net and sun forums didn’t provide any help to me so far since nobody ever replied. Now I’m questioning the usefulness of those forums? How can I get support from Sun or experienced developers?

Thanks

  • Did you try using a single JNLP, i.e. not using an extension that references another extension?
  • Does it work if you access just the JNLP direct rather than through the button?\
  • Could you post the link to the unmodified deployJava.js?

Kev

Is she your child? She’s cute by the way!

[quote]- Did you try using a single JNLP, i.e. not using an extension that references another extension?
[/quote]
I tried by merging my 2 jnlps but I still had the slick extension. But do I want to distribute myself Slick? Maybe, if I’m forced to.

[quote]- Does it work if you access just the JNLP direct rather than through the button?
[/quote]
Well, I have no other choice to go with the button because it’s generated with a JS call and that call has a lot of code I don’t want to support myself. If I use the direct jnlp then it’ll defeat the purpose of having Java gets installed automatically installed in any browser.

[quote]- Could you post the link to the unmodified deployJava.js?
[/quote]
http://java.com/js/deployJava.js
http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit

Yep, thats my little girl. Thanks.

If you merge into a single JNLP that just references a single extension (Slick in this case) it might work. I’m only thinking whether it’s something to do with an oddity where one extension references another - some sort of chaining issue. Also with the direct JNLP I was really just wondering from a diagnosis point of view. If it works with the JNLP directly then the problem is in the deployJava.js, if not then it’s in the JNLP file.

Kev

Interestingly, I don’t see the issue here either.

Kev

Are you saying that you don’t repro the issue? Have you uninstalled all you JREs first?

On the box I’m testing on I only have a 1.4.2 afaik.

I’ll double check.

Kev

this isnt really thought through, but just a stab. Could there be a problem in the manifest file?
Maybe its calling the manifest, and the line

Other than that I havnt got much, hopefully you fix it.

Retried, apparantly I had 1.5 installed aswell. I’ve disabled that and now only have 1.4.2_19 enabled. Running it now tells me that I don’t have a compatible JVM - that “1.4.2+” is required.

Kev

[quote]Retried, apparantly I had 1.5 installed aswell. I’ve disabled that and now only have 1.4.2_19 enabled. Running it now tells me that I don’t have a compatible JVM - that “1.4.2+” is required.
[/quote]
OK, now it sees that you don’t have the minimum VM but it should start installing 1.6u11 for you automatically. Does it? And now do you repro the issue?

[quote]this isnt really thought through, but just a stab. Could there be a problem in the manifest file?
Maybe its calling the manifest, and the line
[/quote]
Hmmm, let see. So your hypothesis is that my app has 2 ways of telling what’s the main class? That’s actually the case:

Manifest-Version: 1.0
Ant-Version: Apache Ant 1.6.5
Created-By: 11.0-b16 (Sun Microsystems Inc.)
Main-Class: buildergame.GameBootstrap
...

I’ll try by removing the application-desc then. Thank!

Nope, just fails, saying it can’t download the required JVM automatically.

Kev

Im on windows XP Java Web Start 1.6.0_11
It only ran the program once.

Mannnnnnnn this menu loooks soooo cool. smooth and visually stimulating.

edit:
now I get

#### Java Web Start Error:
#### Could not find main-class buildergame.GameBootstrap in http://freewebs.com/jeromeblouin/incredibuilder/lib/game.ja