jws deployment for jpct

Started by bili, February 12, 2012, 02:55:42 PM

Previous topic - Next topic

bili

Hi,

I've seen the jpct home page with demo using Java Web Start and I like to know how to do that. In particular, Im attempting to use raft's demo LoadBonesFormatSample so that player can not only view the animation but also change the texture and few other attributes of my own. I have been reading JWS on oracle doc page from last night but there is alot for me to digest and understand. Can you please outline briefly what I need to do to get JSW to work using above demo or what you did, any links would be appreciated.

Cheers.

EgonOlsen


  • Convert your resource loading so that resources can be loaded from a jar
  • Create jars for the native parts (i.e. the DLLs and the SOs and such) by simply zipping and renaming them to .jar
  • Create jars out of your classes and your resources
  • Sign all jars
  • Create a .jnlp-file that loads everything. You can use the ones for the demos as examples.
  • Upload the jnlp and the files to a server. Depending on the server, you might have to crate a .htaccess file make it return the proper mime-type for jnlp.



bili

Quote from: EgonOlsen on February 12, 2012, 08:32:51 PM

  • Convert your resource loading so that resources can be loaded from a jar
  • Create jars for the native parts (i.e. the DLLs and the SOs and such) by simply zipping and renaming them to .jar
  • Create jars out of your classes and your resources
  • Sign all jars
  • Create a .jnlp-file that loads everything. You can use the ones for the demos as examples.
  • Upload the jnlp and the files to a server. Depending on the server, you might have to crate a .htaccess file make it return the proper mime-type for jnlp.
Sorry to trouble you again. But I need few clarification:
  • Convert your resource loading so that resources can be loaded from a jar
I'm a little confused, java doc says to use classloader to load resources file like pictures but I have to files "*.bones* and "*.jpeg" that the game read from InputStream so does this mean I need to use the code below instead?
this.getClass().getResourceAsStream("b.bones");
  • Create jars for the native parts (i.e. the DLLs and the SOs and such) by simply zipping and renaming them to .jar
what are SOs and such? I have no DLLs as I'm running on Linux.
  • Create jars out of your classes and your resources
It doesn't matter if I use eclipse export feature or do it from termial right like jar cf <files>?
Lastly, I can test the jnlp file on local machine right just by running javaws *.jnlp

Thanks.

EgonOlsen

Quote from: bili on February 14, 2012, 02:41:48 AM
so does this mean I need to use the code below instead?
Yes.
Quote from: bili on February 14, 2012, 02:41:48 AM
what are SOs and such? I have no DLLs as I'm running on Linux.
But not everybody does...in lwjgl, you have folders for the different native components for each platform. I use to zip and rename them, one jar for each platform.
Quote from: bili on February 14, 2012, 02:41:48 AM
It doesn't matter if I use eclipse export feature or do it from termial right like jar cf <files>?
No, that doesn't matter. I just find it easier to zip them, but it's up to you.

bili