Java-Gaming.org    
Featured games (79)
games approved by the League of Dukes
Games in Showcase (477)
Games in Android Showcase (106)
games submitted by our members
Games in WIP (533)
games currently in development
News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  ignore  |  Print  
  *** PLEASE HELP *** Java SE 6u11 - JWS starts my game twice in parallel  (Read 11033 times)
0 Members and 1 Guest are viewing this topic.
Offline TheAnalogKid

JGO Coder


Projects: 2



« Posted 2009-01-20 02:14:19 »

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:
1  
2  
3  
4  
5  
6  
7  
<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:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
<?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:
1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
<?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!

Offline trembovetski

Senior Member




If only I knew what I'm talking about!


« Reply #1 - Posted 2009-01-20 02:25:33 »

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

Dmitri
Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #2 - Posted 2009-01-20 03:05:54 »

ok thanks. Will do.

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #3 - Posted 2009-01-20 22:03:55 »

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!

Offline trembovetski

Senior Member




If only I knew what I'm talking about!


« Reply #4 - Posted 2009-01-21 04:47:38 »

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
Offline CommanderKeith
« Reply #5 - Posted 2009-01-21 10:20:56 »

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

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #6 - Posted 2009-01-21 15:24:16 »

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

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #7 - Posted 2009-01-26 17:03:37 »

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

Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #8 - Posted 2009-01-26 18:10:56 »

- 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

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #9 - Posted 2009-01-26 18:38:57 »

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?
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?
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?
http://java.com/js/deployJava.js
http://java.sun.com/javase/6/docs/technotes/guides/jweb/deployment_advice.html#deplToolkit

Games published by our own members! Check 'em out!
Legends of Yore - The Casual Retro Roguelike
Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #10 - Posted 2009-01-26 18:54:47 »

Is she your child? She's cute by the way!
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.
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.
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

Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #11 - Posted 2009-01-26 19:00:32 »

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

Kev

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #12 - Posted 2009-01-26 19:02:50 »

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

Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #13 - Posted 2009-01-26 19:05:40 »

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

I'll double check.

Kev

Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #14 - Posted 2009-01-26 19:11:33 »

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 <application-desc main-class="buildergame.BuilderGame"/>


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

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #15 - Posted 2009-01-26 19:16:37 »

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

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #16 - Posted 2009-01-26 19:27:34 »

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.
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?

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #17 - Posted 2009-01-26 19:35:50 »

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 <application-desc main-class="buildergame.BuilderGame"/>
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:
1  
2  
3  
4  
5  
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!

Offline kevglass

JGO Kernel


Medals: 120
Projects: 23
Exp: 18 years


Coder, Trainee Pixel Artist, Game Reviewer


« Reply #18 - Posted 2009-01-26 20:05:45 »

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?

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

Kev

Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #19 - Posted 2009-01-26 20:13:41 »

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
1  
2  
#### Java Web Start Error:
#### Could not find main-class buildergame.GameBootstrap in http://freewebs.com/jeromeblouin/incredibuilder/lib/game.ja

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #20 - Posted 2009-01-26 20:31:57 »

Hey bobjob, thanks!

The freewebs servers are so busy that I've uploaded a semi release. I'm just trying to upload the new one but can't. The portal is simply not responding. I'm so upset by that since I'm paying for that!!!

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #21 - Posted 2009-01-27 15:23:39 »

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:
I've uploaded a new version which specify the main class only via the manifest but the issue still exists.  Sad I think I'll try not using extensions then.

Offline bobjob

JGO Knight


Medals: 10
Projects: 4


David Aaron Muhar


« Reply #22 - Posted 2009-01-27 18:54:04 »

why not try removing the manifest. And only use the script to call the main class. That ways it should work with all versions of Java.

My Projects
Games, Webcam chat, Video screencast, PDF tools.

Javagaming.org with chat room
Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #23 - Posted 2009-01-27 19:08:33 »

I doubt I will fix the issue. Do you have a reasoning to try that?

Offline gouessej
« Reply #24 - Posted 2009-02-02 12:34:30 »

why not try removing the manifest. And only use the script to call the main class. That ways it should work with all versions of Java.
No!!! Don't do it! When I did it, my game cannot be launched sometimes under Vista. Rather put the real correct main class name both in the manifest and in the JNLP file.

The freewebs servers are so busy that I've uploaded a semi release. I'm just trying to upload the new one but can't. The portal is simply not responding. I'm so upset by that since I'm paying for that!!!
Don't pay anymore, go to Tuxfamily, it is free, fast, quite reliable (more than freewebs), you have a big space (100 MB for Web, 1 GB for download space, more if you want), FTP, CVS, SVN, GIT, MySQL databases, email accounts...

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #25 - Posted 2009-02-02 15:30:25 »

Quote
No!!! Don't do it! When I did it, my game cannot be launched sometimes under Vista. Rather put the real correct main class name both in the manifest and in the JNLP file.
That's an even stronger reason not to do it. Thanks for the warning.

Quote
Don't pay anymore, go to Tuxfamily, it is free, fast, quite reliable (more than freewebs), you have a big space (100 MB for Web, 1 GB for download space, more if you want), FTP, CVS, SVN, GIT, MySQL databases, email accounts...
Fortunately the performance was significantly improved recently. And the things I like with freewebs are the tools provided. About side building, I have to do only minimal HTML coding. I don't want to spend a lot of time with HTML and DHTML. There are also other tools and widgets to manage your site content without coding. In all, I save a lot of time. Do you have such features with Tuxfamily? Thanks for the info by the way!

Offline gouessej
« Reply #26 - Posted 2009-02-02 16:16:49 »

That's an even stronger reason not to do it. Thanks for the warning.
You're welcome. I would be sad if you wasted your work because of a bug under Vista whereas your game is innovative.

Fortunately the performance was significantly improved recently. And the things I like with freewebs are the tools provided. About side building, I have to do only minimal HTML coding. I don't want to spend a lot of time with HTML and DHTML. There are also other tools and widgets to manage your site content without coding. In all, I save a lot of time. Do you have such features with Tuxfamily? Thanks for the info by the way!
No there aren't but you can find them somewhere else without paying, you can get free templates, a WYSIWYG HTML editor like NVU (it is not the current name).

Offline TheAnalogKid

JGO Coder


Projects: 2



« Reply #27 - Posted 2009-02-02 16:26:26 »

Humm, I'll definitely consider it then.  Smiley

Pages: [1]
  ignore  |  Print  
 
 
You cannot reply to this message, because it is very, very old.

 

Add your game by posting it in the WIP section,
or publish it in Showcase.

The first screenshot will be displayed as a thumbnail.

pw (26 views)
2014-07-24 01:59:36

Riven (25 views)
2014-07-23 21:16:32

Riven (19 views)
2014-07-23 21:07:15

Riven (22 views)
2014-07-23 20:56:16

ctomni231 (51 views)
2014-07-18 06:55:21

Zero Volt (46 views)
2014-07-17 23:47:54

danieldean (37 views)
2014-07-17 23:41:23

MustardPeter (40 views)
2014-07-16 23:30:00

Cero (56 views)
2014-07-16 00:42:17

Riven (55 views)
2014-07-14 18:02:53
HotSpot Options
by dleskov
2014-07-08 03:59:08

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:58:24

Java and Game Development Tutorials
by SwordsMiner
2014-06-14 00:47:22

How do I start Java Game Development?
by ra4king
2014-05-17 11:13:37

HotSpot Options
by Roquen
2014-05-15 09:59:54

HotSpot Options
by Roquen
2014-05-06 15:03:10

Escape Analysis
by Roquen
2014-04-29 22:16:43

Experimental Toys
by Roquen
2014-04-28 13:24:22
java-gaming.org is not responsible for the content posted by its members, including references to external websites, and other references that may or may not have a relation with our primarily gaming and game production oriented community. inquiries and complaints can be sent via email to the info‑account of the company managing the website of java‑gaming.org
Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines | Managed by Enhanced Four Valid XHTML 1.0! Valid CSS!