.class -> .exe?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Colin McSwiggen

    .class -> .exe?

    Lately I've been annoyed by having to run my Java programs from either
    the IDE or the command line. Is there a way to make a Java program
    executable that doesn't involve using a script in C++ (or some other
    language) to run it with a System Call?
  • chris

    #2
    Re: .class -> .exe?

    Colin McSwiggen wrote:
    [color=blue]
    > Lately I've been annoyed by having to run my Java programs from either
    > the IDE or the command line. Is there a way to make a Java program
    > executable that doesn't involve using a script in C++ (or some other
    > language) to run it with a System Call?[/color]

    You don't say what OS, but generally speaking the easiest way is to make
    your Java app into an executable jar file. Then the command to run it is
    just 'java -jar myapp.jar': every GUI desktop I've worked with (starting
    with Atari GEM) has had an easy way to set up an association that will run
    this command when the icon is "opened" / double-clicked.

    --
    Chris Gray chris@kiffer.eu net.be

    Comment

    • Kristian Bisgaard Lassen

      #3
      Re: .class -> .exe?

      Hi Colin,

      Check out the page
      http://www.geocities.com/SiliconVall...686/jcomp.html and
      especially the section
      http://www.geocities.com/SiliconVall...nativeproducts for some inspiration on what you can do to solve your problem.
      Another resource is this http://gcc.gnu.org/java/ which is a project for translating Java source code to native code.

      Best regards
      Kristian

      On Tue, 11 Nov 2003 12:56:41 -0800, Colin McSwiggen wrote:
      [color=blue]
      > Lately I've been annoyed by having to run my Java programs from either
      > the IDE or the command line. Is there a way to make a Java program
      > executable that doesn't involve using a script in C++ (or some other
      > language) to run it with a System Call?[/color]

      Comment

      • joe zobkiw

        #4
        Re: .class -> .exe?

        cswigg@myway.co m (Colin McSwiggen) wrote in message news:<fb8647b8. 0311111256.27bd 9651@posting.go ogle.com>...[color=blue]
        > Lately I've been annoyed by having to run my Java programs from either
        > the IDE or the command line. Is there a way to make a Java program
        > executable that doesn't involve using a script in C++ (or some other
        > language) to run it with a System Call?[/color]

        Even though the odds are that you are not using a Macintosh: Mac OS X
        allows jar files to be double-clicked in the Finder. Also, a program
        called Jar Bundler comes with the Xcode developer tools to "package"
        your jar file(s) in a more "applicatio n-like" manner.


        Comment

        • Amey Samant

          #5
          Re: .class -&gt; .exe?

          cswigg@myway.co m (Colin McSwiggen) wrote in message news:<fb8647b8. 0311111256.27bd 9651@posting.go ogle.com>...[color=blue]
          > Lately I've been annoyed by having to run my Java programs from either
          > the IDE or the command line. Is there a way to make a Java program
          > executable that doesn't involve using a script in C++ (or some other
          > language) to run it with a System Call?[/color]

          hi
          i was also irritated by invoking java frm cmd prompt or IDE tools.
          i found a solution which is a small program in c (i wrote by myself
          with the help of some online tutorial ... i dun rem clearly but i
          guess from some reference on roedy green's site)
          with this, you can double click your .class files to run them like
          normal .exe files ....
          its for WIN* users
          features[color=blue]
          > support for command line options, parameters
          > if the class has main method , you can run it by double clicking it
          > it uses windows association features to associate .class with this program
          > no need to convert .class into native code[/color]

          all you need to do is double click any .class file it will ask for
          program to associate with ... locate this program henceforth you dont
          have to invoke java from command prompt
          if you need it, i shall mail it to you ....
          or you can search for tut n write it yourself ...its damnnn easy

          regards
          amey

          Comment

          Working...