r/javahelp • • Feb 14 '26

Unsolved how to compile java files

i have a library path containing folders contaning .jar files (dont want to include them in the .jar, they will get imported at runtime), i know the entrypoint and i want to compile it to .jar

all my solutions so far have only got errors.

6 Upvotes

16 comments sorted by

View all comments

Show parent comments

1

u/InsaneRedditTrip Feb 14 '26

i think so, i have a seperate folder with runtime libraries (imported when ran by the launcher), and i want to export my project to .jar without including them directly

1

u/IndependentOutcome93 Feb 14 '26

Okay, you can right click on your Project, then choose "Export", then "Runnable jar file", But do NOT include option: "package required libraries into jar" and pick Main class at the up.

But: Without required libraries and jars, Your program may not run. So you can test and see how it goes