
-----------------------------------
Spartan_117
Wed Aug 10, 2005 1:59 pm

javac in cmd; the only way???
-----------------------------------
Is there a way to execute a class file without using java in the command prompt?  Like an .exe file?

-----------------------------------
wtd
Wed Aug 10, 2005 2:06 pm


-----------------------------------
You don't use javac to execute a class file.  :)

-----------------------------------
Spartan_117
Wed Aug 10, 2005 4:54 pm


-----------------------------------
lol, my mistake.

You know what i mean! :P

-----------------------------------
wtd
Wed Aug 10, 2005 5:41 pm


-----------------------------------
http://forum.java.sun.com/thread.jspa?threadID=555662&messageID=2801012

-----------------------------------
[Gandalf]
Wed Aug 10, 2005 7:33 pm


-----------------------------------
Either make it a .jar file, or do a google search for a Java .exe maker or something like that.  I found quite a few a while ago - they just take the .class files and everything you have and make a executable out of them.

I think that's what you mean...

-----------------------------------
Spartan_117
Thu Aug 11, 2005 12:52 pm


-----------------------------------
"]Either make it a .jar file, or do a google search for a Java .exe maker or something like that.  I found quite a few a while ago - they just take the .class files and everything you have and make a executable out of them.

I think that's what you mean...

Yup thats exactly what i mean.  So i can just search for a Java .exe maker? Ok ill try that.

-----------------------------------
rizzix
Thu Aug 11, 2005 2:35 pm


-----------------------------------
meh.. y not just execute a "java -cp . classname" from java? ... like this:

Runtime.getRuntime().exec("java -cp . classname"); it should start a new java process..

-----------------------------------
Spartan_117
Fri Aug 12, 2005 8:11 am


-----------------------------------
meh.. y not just execute a "java -cp . classname" from java? ... like this:

Runtime.getRuntime().exec("java -cp . classname"); it should start a new java process..

So that makes the class file an executable???  WHere do i put that code?

-----------------------------------
rizzix
Fri Aug 12, 2005 3:35 pm


-----------------------------------
hmm? what do u mean.. makes it an executable.. 

i'm just showing you a way for executing another java program.. from within a java program.

-----------------------------------
Spartan_117
Fri Aug 12, 2005 3:48 pm


-----------------------------------
Oh, no thats not wut im trying to do tho, im trying to make the .class file work like a .exe file, so when i double click it, itll automatically start the program.

-----------------------------------
rizzix
Sat Aug 13, 2005 8:16 am


-----------------------------------
aah! yep.. u need special software for this..

this is a good one: http://jsmooth.sf.net

-----------------------------------
Spartan_117
Mon Aug 15, 2005 7:13 am


-----------------------------------
Thanx man, ill use that.
