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.

4
  • Why don´t you create a .jar with all libraries included? Commented Dec 3, 2015 at 8: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) Commented Dec 3, 2015 at 8:47
  • @Mayuso Just moved the jar file into the project file and included it to be distributed together. However the original question remains. Commented Dec 3, 2015 at 8: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? Commented Dec 3, 2015 at 9:00

1 Answer 1

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.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.