Results 1 to 7 of 7

Thread: java executables

  1. #1
    Senior Member
    Join Date
    Apr 2002
    Posts
    161

    java executables

    Hi all,

    Since I have gotten very effective and concise answers here at AO, I have decided to post the following:

    I am new to Java. I was wondering how do you create executable files with the java compiler? (As with C or VB you use "make"). I want to write a small app compile it with javac in Mac OS X and I want to create an executable file to be used in Mac, Win or anything else.

    Any help will be appreciated.

    Thanks in advance,

    J

  2. #2
    Elite Hacker
    Join Date
    Mar 2003
    Posts
    1,407
    You seem to want to do what java was made for, running programs on many different platforms, but you want to do it in the wrong way.

    If you compile with javac, simply use the .class file on any OS with java installed and run your program with:
    java ProgramName

    You seem to be wanting to make it into an executable, like a .exe in windows. As far as I know there is no way to make anything an executable for all systems like you seem to want. Different systems use different executable formats. Besides, I don't think you can make a native executable with the standard java sdk. I'm pretty sure you need an external app, perhaps that costs money. So as I have already said, stick with java, and use java to run your programs on all platforms with the runtime installed.

  3. #3
    Member
    Join Date
    Oct 2003
    Posts
    78
    You say you are new to Java so I was wondering if you go here:
    Java Forums - Developer Forums I find the forums very useful and you may find your answer quicker on there.


    On their main page Java Technology halfway down on the left is a whole learning section which includes tutorials. Whilst I was not able to answer your question I hope this helps.

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Posts
    161
    Hi all,

    Thanks for your feedback

    How about turning my java program into an applet therefore it can be run whithin html?

    Cheers

  5. #5
    Member
    Join Date
    Oct 2003
    Posts
    78
    The following link should be helpful


    Applets


    I also recommend downloading and using JCreator instead of javac for compiling, I would be lost without it. Screenshot attached.



  6. #6
    Junior Member
    Join Date
    Nov 2005
    Posts
    1
    Executable Jar Files

    On Microsoft Windows systems, the Java 2 Runtime Environment's installation program will register a default association for Jar files so that double-clicking a Jar file on the desktop will automatically run it with javaw -jar. Dependent extensions bundled with the application will also be loaded automatically. This feature makes the end-user runtime environment easier to use on Microsoft Windows systems.
    Nero

  7. #7
    Senior Member
    Join Date
    Jul 2002
    Posts
    339
    Click here for some good news:
    http://sourceforge.net/search/?words...AND+executable

    JSmooth creates standard Windows executable files (.exe) that smartly launch java applications. It makes java deployment much smoother and user-friendly, as it is able to find and run Java VMs by itself, or help the user get one if none are available.

    Janel is a Java native executable and launcher for Windows. Launch your Java application just like other Windows executables. Choose console or non-console application, the location of the JVM, and other properties. The process name is same as .exe name

    Applet 2 Application enables conversion of an applet into a normal Java application/Windows executable.For this application, the target user is an applet developer. Once he has completed the development of the applet, he can use this application to create an executable file.

    ...
    ...
    Peace always,
    <jdenny>
    Always listen to experts. They\'ll tell you what can\'t be done and why. Then go and do it. -- Robert Heinlein
    I\'m basically a very lazy person who likes to get credit for things other people actually do. -- Linus Torvalds


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •