0

I know this question has been asked in several ways but would appreciate clarification as I don't have Linux to test and I would be sending the project to someone who will be using Linux.

Problem: Have a Netbeans Java project that has several libraries (pls see pic) and I need to zip and send whole project to someone and give them instructions on compiling and opening it under Linux.

I have read : Link1, Link2, Link3 amongst others.

enter image description here

Thanks for the help.

Community
  • 1
  • 1
Afshin Ghazi
  • 1,595
  • 1
  • 14
  • 28
  • Why don´t you create a .jar with all libraries included? – Mayuso Dec 03 '15 at 08:28
  • I´m not sure about netbeans, but I guess it should be similar to Eclipse. Right clicking on project should give you the option to "Export", select "export as executable .jar file" and select "package everything into one jar" (Text will be different, but the idea in Eclipse and Netbeans should be the same) – Mayuso Dec 03 '15 at 08:47
  • @Mayuso Just moved the jar file into the project file and included it to be distributed together. However the original question remains. – Afshin Ghazi Dec 03 '15 at 08:57
  • Sorry, I see no question there. I only see you described a problem. You said you need to zip libraries and send them to someone, I said you can add them to .jar, that solves the problem, doesn´t it? – Mayuso Dec 03 '15 at 09:00

1 Answers1

1

The 3 answers you linked are about "running" a jar. Meaning an already compiled piece of code.

This answers explains how to compile java code: javac option to compile all java files under a given directory recursively

For compiling to a jar: How do I make a JAR from a .java

Hope it helps.

Community
  • 1
  • 1
Koen De Groote
  • 111
  • 1
  • 8