Results 1 to 11 of 11
  1. #1
    akinpam is offline Member
    Join Date
    Dec 2008
    Posts
    2
    Rep Power
    0

    Default executable files

    how can i make ny software an executable file(.exe) i'm getting tired of using .jar

  2. #2
    mtyoung is offline Senior Member
    Join Date
    Dec 2008
    Location
    Hong Kong
    Posts
    473
    Rep Power
    6

    Default

    w w w.rgagnon.com/javadetails/java-0166.html'
    seems good,
    and you can also read java.sun.com/docs/books/tutorial/deployment/jar/manifestindex.html

  3. #3
    jbender is offline Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    0

    Default Try JSmooth

    JSmooth does a very good job of wrapping jar files in an .exe (For Windows only)

    jsmooth.sourceforge.net

    John

  4. #4
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by akinpam View Post
    how can i make ny software an executable file(.exe) i'm getting tired of using .jar
    This is not a good idea, I mean deploy your application as an *.exe file. So it's only for Windows platforms. If you really want to do that, it's fine. But if you can make your application work on any platform really nice, as Java does.

    Deploying as jar is much better. mtyoung given you two resources on that. The second one is the best.

  5. #5
    Join Date
    Dec 2008
    Location
    Italy
    Posts
    79
    Rep Power
    0

    Default

    I'm also intersted because on *NIX platform is simple to execute .jar files, but on Windows it leads to some troubles, and some win users can find it difficult to set up their environment so that, when you double-click on executable jars, they get executed. Moreover you can't deploy a jar with its own icon. Win users are not used to that, they automatically associate a program with an icon, not a command...

    @akinpam
    If your target customer can use an internet connection, why don't you try Java WebStart?

  6. #6
    jbender is offline Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    0

    Default JSmooth

    JSmooth allows you to select an icon, and also specify a particular java version to run with. Many commercial applications are built with it so my recommendation still stands.

    I agree with you that the .jar extension confuses many end users.

  7. #7
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by jbender View Post
    JSmooth allows you to select an icon, and also specify a particular java version to run with.
    Seems you are much familiar with the JSmooth.

    I've look at it, and try to build a simple exe on that. But I didn't see any way to wrapper jar files. In Application tab I only see that, option to add main class.

  8. #8
    jbender is offline Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    0

    Default JSmooth wrapper

    On the application page, center section check the "Use an embedded jar" checkbox and then browse to the jar file that contains the main class specified in the Applications section at the top of the page.

    Also in the classpath text area, specify any other .jar files you need like

    lib\log4j.jar
    lib\jdom.jar


    etc

    I'm using version 0.9.9-7 of JSmooth

    John

  9. #9
    logicbug's Avatar
    logicbug is offline Member
    Join Date
    Jan 2009
    Location
    The Great White North, eh?
    Posts
    76
    Rep Power
    0

    Default

    Why not just write a batch file that sets the environment and runs the jar? I do the same with shell scripts in unix...

  10. #10
    jbender is offline Member
    Join Date
    Dec 2008
    Posts
    6
    Rep Power
    0

    Default JSmooth vs. batch file

    You can and many developers do just that. I personally think the ugly command shell popping up is not very professional looking however. You would never see a commercial application pop up a command shell like that. But if you're doing in-house tooling, it is a very easy solution.

    JSmooth also gives you dynamic binding to the jre. Unless you know where the end user installed the specific version of the jre you need for your app, you have to handle support calls instructing users how to find out what version of the jre is installed on their machine, where it's installed and walk them through editing the command file.

    John

  11. #11
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,372
    Blog Entries
    1
    Rep Power
    20

    Default

    Quote Originally Posted by logicbug View Post
    Why not just write a batch file that sets the environment and runs the jar? I do the same with shell scripts in unix...
    Always deploying and distributing the application as a single package is much fair to users. They really like that. Sending a bunch of files as a zip and ask to unzip and so on not make sense at all.

    But yes, most of the developers use batch files execution in developments. Not sufficient for the end users.

Similar Threads

  1. executable
    By smooth in forum New To Java
    Replies: 4
    Last Post: 06-14-2008, 05:12 PM
  2. Executable Java
    By eva in forum New To Java
    Replies: 3
    Last Post: 12-30-2007, 11:38 PM
  3. Executable JAR
    By bugger in forum New To Java
    Replies: 4
    Last Post: 12-05-2007, 05:41 PM
  4. Generate an executable file
    By romina in forum New To Java
    Replies: 1
    Last Post: 08-07-2007, 05:30 AM
  5. Executable Application, use JCreator
    By baltimore in forum New To Java
    Replies: 1
    Last Post: 07-31-2007, 06:03 PM

Posting Permissions

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