how can I create executable file for the program written on Java?

前端 未结 5 903
清歌不尽
清歌不尽 2020-12-06 03:50

everyone, how can I create executable file for the program written on Java in Eclipse Helios? I mean to create small icon to be able start program only by double-clicking on

5条回答
  •  悲&欢浪女
    2020-12-06 04:25

    1. Create a 1-line metafile to specify which class the JVM should look for to start with the main(String[]) method.

    2. Run the command jar cmf [metafileName] [jarfileName] [classfiles] [img/txtDirectories]

    3. You have an executable jar file - type in "java -jar jarfileName" or, directly "jarfileName" at your prompt. On windows, you can also double click on the jar file logo/name to get it started.

    Good wishes, - M.S.

    PS: Here is the link to a more detailed tutorial: http://csdl.ics.hawaii.edu/~johnson/613f99/modules/04/jar-files.html

提交回复
热议问题