Forum Stats

  • 3,816,037 Users
  • 2,259,133 Discussions
  • 7,893,366 Comments

Discussions

Efficient way of distributing java application

843807
843807 Member Posts: 46,582
edited Feb 21, 2003 10:42PM in Java Desktop Applications
Hi,
I have a java application that I can startup using the command

java appName

Now I want to be able to distribute this application. I have a few questions for that:

1)
How can I check if Java Runtime Environment is already installed or not? If it is I want to skip step 2. I cannot do this from java for sure because I am not sure if JRE is available or not.

2)
Assuming that the client PC does not have java installed on it, how can I automate the installation of Java Runtime Environment and after that install the java application.

3)
Also is there anyway I can go around without having to type the following to start my app?
c:\>java appName


Thanks
-Chirag
«1

Comments

  • 843807
    843807 Member Posts: 46,582
    3)
    Also is there anyway I can go around without having to
    type the following to start my app?
    c:\>java appName
    Make an executable Jar File, assuming you are in a Windows environment.

  • 843807
    843807 Member Posts: 46,582
    Wouldn't I still have to type --

    C:\>java -jar fileName.jar

    ??
  • 843807
    843807 Member Posts: 46,582
    No, you can doubleclick the .jar file and it is run by java virtual machine. Installing a java runtime (or sdk) will associate .jar extension to virtual machine. This is a windows-only feature however.
  • 843807
    843807 Member Posts: 46,582
    Not true! Executable JARs work on Solaris as well. I think they might also work on Mac OS X. And all systems can simply do "java -jar myjar.jar" instead of the evil "java -cp myjar.jar com.mydomain.myprog.MyProgram".
  • 843807
    843807 Member Posts: 46,582
    I personally like building applications like Eclipse. I have my own plugin engine I am developing, and prefer to develop plugins. It is nice because auto-updating of plugins can easily keep people up to date with the latest plugins, plus it makes your application highly extensible (if you publish your APIs), so that others can add new features to it, making it more robust. My engine is pretty small, only 20K with xml parser. When it is finished it will probably be around 50K or so. I am aiming for it to be a generic engine so that it could be used in small devices, wireless stuff, etc allowing for a solid extensible architecture to build software upon for any device.
  • 843807
    843807 Member Posts: 46,582
    Hi buckman1,

    would you please post a link to more information about the software you mentioned (i.e. Eclipse)?

    Another simple answer for the problems of the original poster is JNLP and Sun's Java Web Start.

    Best regards,
    Martin
  • 843807
    843807 Member Posts: 46,582
    Really happy to see other Eclipse fans :)
    Here's where you should go to http://www.eclipse.org
    and also to http://eclipsewiki.swiki.net/1 for more "user-friendly" help!
    Oh and also to http://eclipse-plugins.2y.net/eclipse/index.jsp for finding the plugin you need or contributing one :)
  • 843807
    843807 Member Posts: 46,582
    Hi,
    I have a java application that I can startup using the
    command

    java appName

    Now I want to be able to distribute this application.
    I have a few questions for that:

    1)
    How can I check if Java Runtime Environment is already
    installed or not? If it is I want to skip step 2. I
    cannot do this from java for sure because I am not
    sure if JRE is available or not.
    There was a similar post at
    http://forum.java.sun.com/thread.jsp?forum=422&thread=343622&tstart=0&trange=100
  • 843807
    843807 Member Posts: 46,582
    Hi,
    I have a java application that I can startup using the
    command

    java appName

    Now I want to be able to distribute this application.
    I have a few questions for that:

    2)
    Assuming that the client PC does not have java
    installed on it, how can I automate the installation
    of Java Runtime Environment and after that install the
    java application.
    Please refer to reply#3 of a similar post at
    http://forum.java.sun.com/thread.jsp?forum=422&thread=319499&tstart=0&trange=100


    Hope this helps.
    Regards,
    Nirmalya
  • 843807
    843807 Member Posts: 46,582
    I personally don't like WebStart/JNLP. I think it is a valid attempt but not nearly as controllable on a per application level for my tastes, hence why I like Eclipse and such applications. I can't explain why in a good way, I just don't like other "unchangeable" frameworks controlling how my code is delivered. Kind of contradictive since I am developing a generic plugin engine similar to eclipse for others to use. :)

    www.eclipse.org
    This is probably the fastest growing IDE right now, with IBM being the major developer behind it, but many large vendors (Rational, Oracle, Borland, and so forth) adding support for it. It is pretty full featured, free and fairly simple to add plugins to.
This discussion has been closed.