-4

I have created a Java program, and now I want to compile it, so I can send it to others to use, etc. How do I do this in Eclipse? I've Googled it, but can't find it (O.o). Hope you can help me :/!

I created a runnable .jar, but it doesn't seem to start. I use System.out.println(), but there is 0 output. Do I have to do something else in order to output something, or can you only output something in the console when testing in Eclipse, and not when you have compiled the program?

ikhebgeenaccount
  • 353
  • 6
  • 20
  • You have to create a .jar http://stackoverflow.com/questions/423938/java-export-to-an-jar-file-in-eclipse. Don't use smiles in your question please. – Fabien Sa Dec 01 '13 at 17:02

2 Answers2

0

You probably need to create an executable Jar file - unless it is a web application. Google "eclipse create executable jar"

On Windows for System.out.println to work you might need to use java instead of javaw. Please use separate StackOverflow questions for separate questions, and check for duplicate questions before asking.

Robin Green
  • 32,079
  • 16
  • 104
  • 187
0

Eclipse do this automatically for you, if Project->Build automatically is checked,Just look for the bin folder (projectName/bin) in your workspace.

Also, you can create a runnable jar file by right clicking on your java file in eclipse and select export there. See this for more info.

Adil Shaikh
  • 44,509
  • 17
  • 89
  • 111