2

I have a java application that I created. Now I want to give it to my friend? How do I create a deploy version of this that they can run?

4 Answers 4

1

The easiest for you is to export the program as a "Runnable JAR file". Your friend then does this from the command line:

java -jar MyApp.jar

Probably the easiest way for your friend is if you take the above jar file and deploy it with WebStart. It's cross platform. Your friend simply uses their web browser to browse to the web page where the application is hosted and clicks on a link.

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

Comments

0

Create a JAR file (it's in the export menu), and send that to them. JAR files contain all the classes in a Java application, and a manifest that specifies things like which one is the main class. If the application depends on other 3rdparty libraries, you'll need to include them as well; it's possible to bundle them in the JAR file, but it's non-trivial

Comments

0

I think this is what you are looking for. Basically make it into a self-executing jar and run. It gets more complicated if you have other dependencies besides the standard API in Java.

Comments

0

Create a jar file, and put the following info in your manifest file

Manifest-Version: 1.0
Class-Path: lib.jar 
Main-Class: mypackage.MyClassWithMainMethod

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.