Creating a jar file to be run on any other machine

前端 未结 3 1644
日久生厌
日久生厌 2021-01-26 00:30

I have to create a jar file wherein i need to add external jar files in the classpath, properties files, in such away as to run it on any other machine.

3条回答
  •  广开言路
    2021-01-26 01:22

    You can make the jar in almost any IDE. I agree with Michael SchmeiBer, be a bit more specific please.

    I use eclipse as my IDE (because you can both use it in windows and Ubuntu Linux) to make a jar (you can define the startup class in the jar).

    I use different methods for starting up of different machines.

    I use nsis to create a nice windows executable (.exe) You can include your own icon.

    In nsis script you actually use the same command you would use in a batch command. nsis has some nice features, like search for a java jre.

    For Linux and Mac I use a .sh file with this command.

提交回复
热议问题