What is the best way to make a Java Application executable?

Discussion in 'Java' started by C-man, Aug 9, 2004.

  1. C-man

    C-man Guest

    What is the best way to make a Java Application executable?



    Thanks

    Cleave
    C-man, Aug 9, 2004
    #1
    1. Advertising

  2. C-man

    Michael Cox Guest

    Depends where you want to run it I should think :)
    Michael Cox, Aug 9, 2004
    #2
    1. Advertising

  3. C-man <> wrote:
    > What is the best way to make a Java Application executable?


    which platform? Windows or something else?

    --
    JustThe.net Internet & New Media Services, http://JustThe.net/
    Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) /
    PGP Key available from your friendly local key server (0xE3AE35ED)
    Apple Valley, California Nothing scares me anymore. I have three kids.
    Steven J Sobol, Aug 9, 2004
    #3
  4. Andrew Thompson, Aug 9, 2004
    #4
  5. Andrew Thompson <> wrote:
    > On Mon, 09 Aug 2004 21:26:52 GMT, C-man wrote:
    >
    >> What is the best way to make a Java Application executable?

    >
    > 'Not'
    > <http://www.physci.org/codes/javafaq.jsp#exe>


    That describes reasons not to compile Java bytecode into native code. However,
    I don't see any compelling reason not to wrap an app in a Windows or other
    executable that fires up the JVM and launches your app via JNI. The question
    is, which was C-man talking about: compiling to native code, or using an
    exe wrapper? If the former, I'd agree with your reply. If the latter, not.

    --
    JustThe.net Internet & New Media Services, http://JustThe.net/
    Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) /
    PGP Key available from your friendly local key server (0xE3AE35ED)
    Apple Valley, California Nothing scares me anymore. I have three kids.
    Steven J Sobol, Aug 10, 2004
    #5
  6. On Mon, 09 Aug 2004 21:43:44 -0500, Steven J Sobol wrote:

    > I don't see any compelling reason not to wrap an app in a Windows or other
    > executable that fires up the JVM and launches your app via JNI.


    How about these three..
    a) non-portability
    b) extra overhead
    c) lack of need (no advantages over JWS)

    --
    Andrew Thompson
    http://www.PhySci.org/ Open-source software suite
    http://www.PhySci.org/codes/ Web & IT Help
    http://www.1point1C.org/ Science & Technology
    Andrew Thompson, Aug 10, 2004
    #6
  7. C-man

    Jacob Guest

    C-man wrote:
    > What is the best way to make a Java Application executable?


    A .jar file with an appropriate manifest file *is* an
    executable, and should (in principle) run perfectly on
    any platform. The exact approach for starting the
    application may differ (on MS/Windows or Solaris you
    double click on the .jar or write its name as a command
    in a console window), and you might need to do some
    OS setup adjustments to set it up correctly.

    Remember that the Java runtime environment (JRE) must be
    available on the client machine in order for a Java
    application to run. This is the price for platform
    independency, but as an application programmer this is
    not really of your concern.
    Jacob, Aug 10, 2004
    #7
  8. Andrew Thompson <> wrote:

    >> I don't see any compelling reason not to wrap an app in a Windows or other
    >> executable that fires up the JVM and launches your app via JNI.

    >
    > How about these three..
    > a) non-portability
    > b) extra overhead
    > c) lack of need (no advantages over JWS)


    I like to use exe4j because it allows the exe to automatically set up its
    classpath, find the VM, etc., but mostly because it's nice to be able to
    search for the program in the Windows task manager, so I can see what kind
    of resources it's using, and not have to wade through a dozen javaw.exe
    processes (the task manager will show the name of the exe instead). I'd have
    the same reasons for doing something similar on a Unix box.

    I certainly wouldn't do it because it's portable.

    --
    JustThe.net Internet & New Media Services, http://JustThe.net/
    Steven J. Sobol, Geek In Charge / 888.480.4NET (4638) /
    PGP Key available from your friendly local key server (0xE3AE35ED)
    Apple Valley, California Nothing scares me anymore. I have three kids.
    Steven J Sobol, Aug 10, 2004
    #8
  9. C-man

    Victor Chew Guest

    I tend to agree. I use NativeJ to wrap some common Java apps that I use
    on a daily basis (jEdit, nntprss). It is definitely nicer than having to
    muck around with batch files and environment variables, plus I can use
    Win32 services when I need them (eg. for nntprss).

    I even got jEdit set up so that everything (including preferences and
    extensions) are stored on a USB drive. That way, I can use it across my
    home and office machines. Nice!

    Steven J Sobol wrote:

    > Andrew Thompson <> wrote:
    >
    >
    >>>I don't see any compelling reason not to wrap an app in a Windows or other
    >>>executable that fires up the JVM and launches your app via JNI.

    >>
    >>How about these three..
    >>a) non-portability
    >>b) extra overhead
    >>c) lack of need (no advantages over JWS)

    >
    >
    > I like to use exe4j because it allows the exe to automatically set up its
    > classpath, find the VM, etc., but mostly because it's nice to be able to
    > search for the program in the Windows task manager, so I can see what kind
    > of resources it's using, and not have to wade through a dozen javaw.exe
    > processes (the task manager will show the name of the exe instead). I'd have
    > the same reasons for doing something similar on a Unix box.
    >
    > I certainly wouldn't do it because it's portable.
    >
    Victor Chew, Aug 10, 2004
    #9
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Replies:
    15
    Views:
    471
    Dave Thompson
    Aug 21, 2006
  2. pratap
    Replies:
    20
    Views:
    742
    Flash Gordon
    Mar 7, 2007
  3. Jason Cavett
    Replies:
    8
    Views:
    603
    Sanjay
    May 16, 2007
  4. Replies:
    0
    Views:
    423
  5. David Ainley
    Replies:
    10
    Views:
    360
    Jörg W Mittag
    Jul 9, 2010
Loading...

Share This Page