Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #13608

Re: Self-executing JAR

From Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at>
Newsgroups comp.lang.java.programmer
Subject Re: Self-executing JAR
Date 2012-04-17 08:31 +0000
Organization A noiseless patient Spider
Message-ID <slrnjoqaje.kvi.avl@gamma.logic.tuwien.ac.at> (permalink)
References <tvpoo7h83ooo9dk54gghqg8v805mlrkpf3@4ax.com> <i90po791d7luqcjsm4k2h5eoa72i23g8af@4ax.com> <jmi48t$nsp$1@dont-email.me>

Show all headers | View raw


markspace <-@> wrote:
> C:\Users\Brenden\Dev\proj\hw\dist>hw.jar
>
> C:\Users\Brenden\Dev\proj\hw\dist>java -jar hw.jar
> Hello world!
>
> C:\Users\Brenden\Dev\proj\hw\dist>

I don't have a Windows-PC at hand, but I'd bet that:

< C:\Users\Brenden\Dev\proj\hw\dist>javaw -jar hw.jar
< 
< C:\Users\Brenden\Dev\proj\hw\dist>

and that "javaw.exe" is registered as the default-handler for .jar

(mind the extra "w" in the javaw command)

PS:
If the jarfile is just for your own use and you need it as a console-
app, then you could rename it to hw.blah, and register  java -jar  as
handler for .blah files. Once you start making GUI-apps, you just leave
them as hw.jar (i.e. no longer rename them to hw.blah)

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-16 14:46 -0400
  Re: Self-executing JAR Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2012-04-16 12:21 -0700
  Re: Self-executing JAR markspace <-@.> - 2012-04-16 12:22 -0700
  Re: Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-16 16:34 -0400
    Re: Self-executing JAR Lew <lewbloch@gmail.com> - 2012-04-16 14:26 -0700
      Re: Self-executing JAR "John B. Matthews" <nospam@nospam.invalid> - 2012-04-16 21:06 -0400
    Re: Self-executing JAR Knute Johnson <nospam@knutejohnson.com> - 2012-04-16 14:35 -0700
    Re: Self-executing JAR markspace <-@.> - 2012-04-16 14:51 -0700
      Re: Self-executing JAR markspace <-@.> - 2012-04-16 15:00 -0700
      Re: Self-executing JAR Andreas Leitgeb <avl@gamma.logic.tuwien.ac.at> - 2012-04-17 08:31 +0000
        Re: Self-executing JAR markspace <-@.> - 2012-04-17 07:35 -0700
    Re: Self-executing JAR Lew <lewbloch@gmail.com> - 2012-04-16 15:51 -0700
      Re: Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-17 08:56 -0400
    Re: Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-17 10:49 -0400
      Re: Self-executing JAR markspace <-@.> - 2012-04-17 07:57 -0700
        Re: Self-executing JAR Tim Slattery <Slattery_T@bls.gov> - 2012-04-18 09:06 -0400
  Re: Self-executing JAR Roedy Green <see_website@mindprod.com.invalid> - 2012-04-17 04:24 -0700

csiph-web