How do I make a .jar file?
Hello,
I want to learn java, and I got a book for it. Now, the book doesn't cover how to make a .jar file (i think), so how do i make one?
16 Replies
⌛
This post has been reserved for your question.
Hey @MrTomiCZ! Please useTIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here./close
or theClose Post
button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically marked as dormant after 300 minutes of inactivity.
Are you using a build tool? Are you using an IDE? What do you want to create a JAR file for?
no, no, System.out.println("Hello, World");
im just starting
only thing i know is jshell
Then why do you want to create a JAR file?
so i have an exec utalbe
executable*
If you are just writing hello worldapplication, you probably don't want to deal with JAR files right now. But the first step is putting your code in a
.java
file
and then you can execute it with java YourJavaFile.java
so i just put the raw code there?
or how
You'd create a main class and put your code there
But if the book you are using starts with jshell, it should be included at some point there
like this
This message has been formatted automatically. You can disable this using
/preferences
.right
if your file is called
test.java
, almostit is
the method needs to be called
main
, not Main
yeey
it works
and i got argumentsss yeey
thanks
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.
Post Closed
This post has been closed by <@818109259048157226>.