Question:
How do you make java class files standalone?
Sir_Peech
2010-05-17 16:45:05 UTC
Like, i made a slide puzzle game with a java applet, and i want to know how to run it without using the program i used to create it (eclipse). Is it possible to make it an .exe file? or how about an executable .jar fie? and how would you do it?
Three answers:
Valdearg
2010-05-17 16:53:40 UTC
File > Export > Runnable .jar file.



Make sure it has the "public static void main(String[] args)" method though
anonymous
2016-02-29 02:23:14 UTC
Good to hear you've got it working, but this may help clear up the confusion. You are misunderstanding what you have in the Jar archive. They Java program files, specifically Java class files, written in the Java programming language. They are not Javascript scripts.
deonejuan
2010-05-18 06:25:04 UTC
I use NetBeans and I "Build Final" in the menus. That makes a .jar with the manifest file pointing to the class with main(); In Windows XP, a double-click on the desktop runs the Desktop version of such a applet. You will have to bundle your applet as a .jar and write the html to run it in a web browser, and NetBeans does the html web page script for me.


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...