Java-Gaming.org Java4K winners: [ by our judges | by the community ]         
Featured games (67)
games approved by the League of Dukes
Games in Showcase (∞)
games submitted by our members



News: Read the Java Gaming Resources, or peek at the official Java tutorials
 
    Home     Help   Search   Login   Register   
Pages: [1]
  Print  
  Offline installation with Java Webstart without any web server  (Read 3015 times)
0 Members and 2 Guests are viewing this topic.
Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« on: 2008-08-18 07:34:45 »

Hi!

The title of this topic is strange as Java Webstart is used to install applications through the web but I would love to use it to install offline application. For example, imagine that you want to give a CD with your game to someone. You would like to create an auto-run CD that launches the installation immediately when it is inserted into the CD driver. Currently, it is difficult to do this and I would like to drive it as easier as deploying an application through Java Webstart. Please vote for my RFE here:
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6737151

Best regards.

Julien Gouesse
Offline kappa
« League of Dukes »

JGO Kernel
*****

Posts: 2360
Medals: 59


★★★★★


« Reply #1 on: 2008-08-18 08:00:01 »

You could just package your application into a java installer like http://izpack.org/ its probably simpler and quicker than using jws.

Besides to use jws locally you would probably need to get the jnlp extension recognised as yet another java executable file. Older versions of java (1.4, etc) do not provide this, they barely struggle to get the .jar extension recognised, hence the reason most java installers on windows use the .exe or .bat formats and .sh on linux.
Offline cylab

JGO Kernel
*****

Posts: 1940
Medals: 27



« Reply #2 on: 2008-08-18 11:14:20 »

This article contains useful information on using JNLP for an offline installation:
http://today.java.net/pub/a/today/2008/07/10/distributing-web-start-via-cd-rom.html

Mathias - I Know What [you] Did Last Summer!
Games published by our own members! Go get 'em!
Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« Reply #3 on: 2008-08-19 04:56:23 »

This article contains useful information on using JNLP for an offline installation:
http://today.java.net/pub/a/today/2008/07/10/distributing-web-start-via-cd-rom.html
Thanks. I read this article some weeks ago but I want something easier and more cross-platform.

You could just package your application into a java installer like http://izpack.org/ its probably simpler and quicker than using jws.

Besides to use jws locally you would probably need to get the jnlp extension recognised as yet another java executable file. Older versions of java (1.4, etc) do not provide this, they barely struggle to get the .jar extension recognised, hence the reason most java installers on windows use the .exe or .bat formats and .sh on linux.
It seems fine but I like Java Webstart and it would be better to have a standard tool integrated in Java to make applications that could be installed offline.

Nobody voted for my RFE Sad

Julien Gouesse
Online Eli Delventhal
« League of Dukes »

JGO Kernel
*****

Posts: 3575
Medals: 44


Game Engineer


« Reply #4 on: 2008-08-19 14:21:39 »

I don't even know how...

See my work:
OTC Software
<br />
Currently Working On:
Secret project...
Quote from: _Riven
I edit JGO in production, because I simply don't waste time writing bugs
Offline bobjob

JGO Ninja
***

Posts: 646
Medals: 14


David Aaron Muhar


« Reply #5 on: 2008-08-19 18:24:06 »

this is what i use for offline testing after i compile and sign my packages

1  
2  
3  
4  
5  
6  
7  
8  
9  
10  
11  
12  
13  
14  
15  
16  
17  
18  
19  
20  
21  
22  
23  
24  
25  
26  
27  
28  
29  
30  
31  
32  
33  
34  
35  
36  
37  
38  
39  
40  
41  
42  
43  
44  
45  
46  
47  
<?xml version="1.0" encoding="utf-8"?>
<!-- Web Start Deployment -->
<jnlp
  spec="1.0+"
  codebase="file:."
  href="TD_OFFLINE.jnlp">
  <information>
    <title>Gauntlet Championships</title>
    <vendor>bobjob</vendor>
    <homepage href="http://users.on.net/~bobjob"/>
    <description>TD Game</description>
    <description kind="short">RTS</description>
    <!--
    <icon kind="splash" href="sign.jpg"/>
    -->
    <shortcut online="true">
      <desktop/>
      <menu submenu="Games"/>
    </shortcut>
    <offline-allowed/>
  </information>
  <security>
    <all-permissions/>
  </security>
  <resources>
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+"/>
    <jar href="TD.jar" main="true"/>
    <jar href="resources.jar"/>
    <jar href="jogg-0.0.7.jar"/>
    <jar href="jorbis-0.0.15.jar"/>
    <jar href="lwjgl_util.jar"/>
    <jar href="lwjgl.jar"/>
  </resources>
  <resources os="Windows">
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+"/>
    <nativelib href="win32.jar"/>
  </resources>
  <resources os="Linux">
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+"/>
    <nativelib href="linux.jar"/>
  </resources>
  <resources os="Mac OS X">
    <j2se href="http://java.sun.com/products/autodl/j2se" version="1.5+"/>
    <nativelib href="macosx.jar"/>
  </resources>
  <application-desc/>
</jnlp>

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

Javagaming.org with chat room
Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« Reply #6 on: 2008-08-20 02:40:26 »

I don't even know how...
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6737151

this is what i use for offline testing after i compile and sign my packages
Does it work if you have no more internet connection?

codebase="file:." seems interesting but not very cross-platform, isn't it? Please can you add your workaround into my RFE?

Julien Gouesse
Offline bobjob

JGO Ninja
***

Posts: 646
Medals: 14


David Aaron Muhar


« Reply #7 on: 2008-08-20 03:09:33 »

I thought that it would be OS independant, and subject to URL standards

http://linux.about.com/library/cmd/blcmdl7_url.htm

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

Javagaming.org with chat room
Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« Reply #8 on: 2008-08-20 04:37:06 »

I thought that it would be OS independant, and subject to URL standards

http://linux.about.com/library/cmd/blcmdl7_url.htm
Ok. Then, I need to find a way to use it on a CD.

Julien Gouesse
Offline bobjob

JGO Ninja
***

Posts: 646
Medals: 14


David Aaron Muhar


« Reply #9 on: 2008-08-20 05:21:08 »

the "file:." means working directory therefore i assume it would work off a cd.

If you plan to put it on a cd and want it to be platform independant I honestly think a .JAR file is a better idea
or maybe add an extra .bat and other relavent cmd line files for some platforms (just as backup).

but still as long as you include the class path then a .jar should be good enough. with the jnlp there is the extra head ache of having to sign the packages.

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

Javagaming.org with chat room
Games published by our own members! Go get 'em!
Offline cylab

JGO Kernel
*****

Posts: 1940
Medals: 27



« Reply #10 on: 2008-08-20 05:57:40 »

The "file:" protocol does not work for installation. You can either install a JWS app directly from the net or start it from an offline tuned jnlp, but you cannot install it from the offline jnlp, because JWS caching only works over http protocol and not via file URLs. What's even worse is that you _can_ let JWS create a desktop/startmenu icon for you, but starting the app via the icon results in a mainclass not found error...

Mathias - I Know What [you] Did Last Summer!
Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« Reply #11 on: 2008-08-21 03:03:40 »

The "file:" protocol does not work for installation. You can either install a JWS app directly from the net or start it from an offline tuned jnlp, but you cannot install it from the offline jnlp, because JWS caching only works over http protocol and not via file URLs. What's even worse is that you _can_ let JWS create a desktop/startmenu icon for you, but starting the app via the icon results in a mainclass not found error...

Then we have a good reason to vote for my RFE. It is not yet possible to write a short XML file to describe how to find the resources to install a Java application offline. What are you waiting for? Nobody has voted for my RFE.

Julien Gouesse
Offline erikd

JGO Kernel
*****

Posts: 2561
Medals: 7


Maximumisness


« Reply #12 on: 2008-08-21 14:12:49 »

Quote
What are you waiting for?

I don't see any real practical benefit for (ab?)using JNLP as some kind of cross-platform installer.
I mean, maybe it could work for some rare cases but I see the following problems that would make me not want to use it:
* JNLP is not guaranteed to start JWS at all (it would depend on java being installed, and the .jnlp extension tied to JWS)
* If the application needs a specific version of java, you'd need to download it anyway.

Besides, as I see it, JNLP was not meant for installing software (iirc, even the JNLP specs say something as much). It just seems the wrong tool for the job to me.

If I were to distribute a java game on CD, I'd create an installer for the game + a private JRE I tested with. It's not difficult to do, but makes life a lot easier for your users than having them explained that they need to start the .jnlp file somehow.

Offline gouessej

JGO Kernel
*****

Posts: 3560
Medals: 30


TUER


« Reply #13 on: 2008-08-21 15:39:23 »

If I were to distribute a java game on CD, I'd create an installer for the game + a private JRE I tested with. It's not difficult to do, but makes life a lot easier for your users than having them explained that they need to start the .jnlp file somehow.
I thought about an autorun.

Julien Gouesse
Offline erikd

JGO Kernel
*****

Posts: 2561
Medals: 7


Maximumisness


« Reply #14 on: 2008-08-21 16:02:14 »

Quote
I thought about an autorun.
Oh I see...
If you want to depend on java being already installed, and if an autorun can start java, than maybe you could make  a java based installer (or use an existing one)?

Pages: [1]
  Print  
 
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.16 | SMF © 2011, Simple Machines Valid XHTML 1.0! Valid CSS!
Page created in 0.112 seconds with 19 queries.