14

I wish to give some demo copies of a Java application on a DVD to a client. Does it make sense to have a preinstalled JRE and Java application on a DVD so that they can just click and run it?

Also, if anyone has done this what are your views on this?

yazz.com
  • 57,320
  • 66
  • 234
  • 385
  • 4
    Are you targeting a specific OS? – Jeremy Mar 16 '11 at 13:01
  • 3
    If the users have an internet connection, and the apps. have a GUI and you can deliver them off a site, I would recommend deployJava.js to ensure a suitable minimum JRE, & Java Web Start to download/install & launch the demos. – Andrew Thompson Mar 16 '11 at 13:10
  • It mainly has to work on Windows and Mac OSX – yazz.com Mar 16 '11 at 14:59
  • Hi Zubair, would you consider awarding your bounty? – Dunaril Mar 28 '11 at 09:31
  • Yes, I have awarded it. Did you get the points? – yazz.com Mar 28 '11 at 10:41
  • No, I did not. You need to award manually your bounty by clicking on the +100 blue button below the vote count of the answer you have chosen. It is too late now, half the bounty was awarded to Banang's answer :) – Dunaril Mar 28 '11 at 11:26

5 Answers5

14

I would suggest you skip the DVD and go for a flash drive instead. This way you can use portable Java and run your app from the flash drive without having to install anything on your client's computer. With the low costs of flash drives these days you should easily earn back what you spend in money in convenience and time.

Here is a tutorial that shows you how to set this up.

Mia Clarke
  • 8,134
  • 3
  • 49
  • 62
  • 1
    @asgs Glad I could help. Personally, I am always really happy to receive a free flash drive (even if it's small I can always find a use for it after I've used what was originally on it), so from that point of view I can also recommend going this way. Your customers will like it, cause everyone likes freebies! – Mia Clarke Mar 21 '11 at 10:58
  • 0.5 EUR for DVD vs. 8-10 EUR for flash stick – Daniel Voina Mar 23 '11 at 15:54
  • @Daniel Voina, actually, if you buy them in bulk (which is probably what will happen), you can go as low as 3-4 euro a pop for them. Of course it'll always be more expensive, but the added cost will still be reasonably low, and tax-deductable. – Mia Clarke Mar 23 '11 at 17:04
  • 1
    @Daniel: depending on what are you selling, it's a minor expense. Some sales lunch cost few times more than buying a box full of flash drives and gift them all. – Tomas Narros Mar 24 '11 at 14:40
  • 1
    Being non-mechanical a LiveUSB is so much better then LiveCD/DVD for distributing ready to run software or systems. You'd be surprised how often a slightly malfunctioning CD/DVD drive will ruin a demo or a first try. Is it worth a few $5 drives not to lose a job, contract, or big sale? Sure it is. – Paul Mar 27 '11 at 18:38
9

Indeed you can simply put a JRE into a directory of the DVD.

Then you start the application with a .bat file that runs a command such as :

jre\bin\java.exe -jar Main.jar 

(If your jar and the jre folder are in the same directory)

Be careful about one thing : you can't know in advance what the DVD's drive letter will be, so in your .bat file you must give relative paths to the JRE and to your jar (or starting class).

Dunaril
  • 2,757
  • 5
  • 31
  • 53
  • Thanks for the answer , I tried the same but the performance very poor when the jar and jre is in optical disk, it takes 1 min to launch. When I copied jre to hard disk then it ran fast, anyway to detect where is jre copied using batch file ? – Neil Nov 13 '12 at 17:57
4

If you are dealing with a one or two people then just throw a JRE on the DVD and explain how to install it or even just include a link to the page where they can install Java themselves. In the past when dealing with a large set of recipients that needed to install a JRE and run an application, I have used tools like InstallAnywhere, to create a simple setup to walk the user through a wizard for setup.

jzd
  • 23,473
  • 9
  • 54
  • 76
  • 1
    I want to run the java app without installing anything to their local hard drive – yazz.com Mar 16 '11 at 15:00
  • 1
    Zubair, how are expecting your java apps to run without installing a JRE when it's not there already? Also, i've never heard of a pre-installed JRE on a DVD (i.e. JRE in an installed format without manual installation). – asgs Mar 21 '11 at 10:22
  • 1
    Sun/Oracle do not allow the JDK to be redistributed, but they allow the JRE to be redistributed with software. The JRE can be run without installing it, only having the JRE files unzipped will allow the JRE to run – yazz.com Mar 21 '11 at 14:47
  • @Zubair did you find a way for this ? I have exactly the same requirement but its damn slow from DVD , anyway to copy jre in local computer ? – Neil Nov 13 '12 at 17:59
2

I've in the past copied a windows JRE directory to a USB flash drive, and run a java app off that.

Stephen Denne
  • 36,219
  • 10
  • 45
  • 60
2

If:

  1. The users have an internet connection
  2. The demos. have a GUI
  3. You can deliver them off a site

..I would recommend using deployJava.js to ensure a suitable minimum JRE, & Java Web Start to download/install & launch the demos.

JWS has a number of advantages in this situation:

  • Server hits for the resources will reveal what proportion of the people to whom the demo. was delivered, are actually trying it.
  • JWS offers 'lazy downloads' so that if a potential user is only interested in one small section of a large application, they do not have to download the entire binary.
  • If the user turns a demo. into a registered version, (at least parts of) the app. will be already installed.
  • But in the event that it is a constantly changing app., JWS will automatically update any new parts of the app.
  • All this is part of the 'one click' installation experience for JWS. It is more tricky for a developer to set up, but once done well, is a breeze for the end-user.

You might include an HTML page on the CD (DVD would be a waste for a single HTML, a couple of images & some CSS based style sheets) that links to the demos. But since the hardest thing about getting a user to try a demo. is getting them to put the disk in the drive, I would side-step the disk entirely & send the 'Here are some free demos.' HTML to the user as email.


This was included as a comment a couple of days ago. Since the thread was resurrected, I decided to include it as an answer & expand on it.

Community
  • 1
  • 1
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433