How do I create an executable java file?

Caporegime
Joined
12 Mar 2004
Posts
29,962
Location
England
In BlueJ I create a .jar file with one class called test and the following code.

Code:
public class test{
public static void main(String[] args){
System.out.println("hello world");
}
}

However when I double click on the file nothing happens? :confused:
 
Last edited:
Isn't there a way just to have it execute by double clicking on it? It doesn't look very good making a program and then telling people that they have to execute it via the command prompt. It's currently set to open with "Java Platform SE binary".
 
Last edited:
Thanks, I'll try those programs.

I would have thought the creators of java would have made it easier to create a distributable executable program.
 
Last edited:
Back
Top Bottom