[JAVA] Number Guessing Game with Package

Joseph·2024년 6월 25일
0
post-thumbnail

Source Code

https://github.com/leeyosebi/veryFirst

How to make the Package

First up, you need to change directory where the source exsist.

1.Compile(.class file creation)

javac NumberGuessingGame.java

2. Check if it's working

java NumberGuessingGame

3. Create TXT in the source directory

You should add a blank line

Main-Class: NumberGuessingGame
 


4. Create .jar file using all the class files

jar cfm NumberGuessingGame.jar manifest.txt *.class

5. Execute the .jar file to check it's working

java -jar NumberGuessingGame.jar

6. Create .dmg file(Installation package file)

jpackage --name NumberGuessingGame --input . --main-jar NumberGuessingGame.jar --main-class NumberGuessingGame


#. Whole Command

0개의 댓글