How to create a Java application which can be run by a click?

前端 未结 8 546
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 15:20

I would like to have a Java application which can be easily started.

So far I have managed to create a jar file but I do not see any advantages yet. Before I run my

相关标签:
8条回答
  • 2020-12-01 15:33

    For OS X check Jar Bundler:

    http://developer.apple.com/mac/library/documentation/Java/Conceptual/Jar_Bundler/Introduction/Introduction.html

    0 讨论(0)
  • 2020-12-01 15:39

    It is called WebStart,

    However, it does not perfectly fit your description. It does not provide a self-packed solution which should exists.

    PS. I personally believe executable jar is a joke, you can't control the vmargs, can't have a good icon, and you can't even know it is executable until it is being unpack and try to be execute.

    0 讨论(0)
  • 2020-12-01 15:45

    You can create an executable jar file, as described here:

    http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html

    Then users can click on it in the file browser and have the main class start, provided the OS and the user's security settings allow it.

    0 讨论(0)
  • 2020-12-01 15:49

    Here some links that may help u..

    JSmooth is a Java Executable Wrapper. It creates native Windows launchers

    http://jsmooth.sourceforge.net/
    

    Cross-platform Java executable wrapper

    http://launch4j.sourceforge.net/
    
    
    http://www.captain.at/programming/java/executable-java-application.php
    
    0 讨论(0)
  • 2020-12-01 15:51

    You have to create an executable jar, with mentioning your main class(ie a public class with main() method in it) in the jar's manifest file as the Main-Class. So when prople double click it or type: jar "your jar name" in command console then they will get it executed.

    0 讨论(0)
  • 2020-12-01 15:52

    Launch4J allows you to make a JAR launchable on many platforms.

    0 讨论(0)
提交回复
热议问题