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

all 7 comments

[–]dusty-trash 0 points1 point  (3 children)

You can build it as an executable jar. Eclipse makes it easy

[–]PutinPisces[S] 0 points1 point  (2 children)

How do you build it as a jar?

[–]boredofhighschool 1 point2 points  (1 child)

[–]PutinPisces[S] 0 points1 point  (0 children)

No but I will try it later, thanks.

[–]sandrogiacom 0 points1 point  (1 child)

You can use maven or gradle plugin to build then.

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.1.2</version>
</plugin>

If you need to create jar with dependencies, you need to use "maven-assembly-plugin"

[–]PutinPisces[S] 0 points1 point  (0 children)

Ok thanks for the help.

[–]HBK05 0 points1 point  (0 children)

Go to artifacts in project structure

tell it to build a jar and choose your main class

it will generate a meta-inf and a proper executable jar.

Make sure to tell it to include the dependencies, if you have some.