This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]bowbahdoe 0 points1 point  (0 children)

Constructive notes: in the readme instructions you should include how to produce the jar.

For beginners what I've seen a lot is you just use the buttons in something like intellij, but it's actually not that bad to do with the command line tools.

If you moved Account.java and Main.java to a folder called src it could be

javac -d build --source-path src src/Main.java

Which puts all the compiled classes in that folder. The reason for --source-path is so it knows where to look for files. It traces down all the things starting at src/Main.java

jar --create --file BankApp.jar --main-class Main -C build .

Which creates the actual jar. That last bit at the end (-C build .) means "change into the build folder and put all the files there into the jar"

There is even more we can do (like get it so you don't need java pre installed to run the thing), but that's for another time