Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 javac in cmd; the only way???
Index -> Programming, Java -> Java Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Spartan_117




PostPosted: Wed Aug 10, 2005 1:59 pm   Post subject: 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?
Sponsor
Sponsor
Sponsor
sponsor
wtd




PostPosted: Wed Aug 10, 2005 2:06 pm   Post subject: (No subject)

You don't use javac to execute a class file. Smile
Spartan_117




PostPosted: Wed Aug 10, 2005 4:54 pm   Post subject: (No subject)

lol, my mistake.

You know what i mean! Razz
wtd




PostPosted: Wed Aug 10, 2005 5:41 pm   Post subject: (No subject)

http://forum.java.sun.com/thread.jspa?threadID=555662&messageID=2801012
[Gandalf]




PostPosted: Wed Aug 10, 2005 7:33 pm   Post subject: (No subject)

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




PostPosted: Thu Aug 11, 2005 12:52 pm   Post subject: (No subject)

[Gandalf] wrote:
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




PostPosted: Thu Aug 11, 2005 2:35 pm   Post subject: (No subject)

meh.. y not just execute a "java -cp . classname" from java? ... like this:

code:
Runtime.getRuntime().exec("java -cp . classname");
it should start a new java process..
Spartan_117




PostPosted: Fri Aug 12, 2005 8:11 am   Post subject: (No subject)

rizzix wrote:
meh.. y not just execute a "java -cp . classname" from java? ... like this:

code:
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?
Sponsor
Sponsor
Sponsor
sponsor
rizzix




PostPosted: Fri Aug 12, 2005 3:35 pm   Post subject: (No subject)

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




PostPosted: Fri Aug 12, 2005 3:48 pm   Post subject: (No subject)

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




PostPosted: Sat Aug 13, 2005 8:16 am   Post subject: (No subject)

aah! yep.. u need special software for this..

this is a good one: http://jsmooth.sf.net
Spartan_117




PostPosted: Mon Aug 15, 2005 7:13 am   Post subject: (No subject)

Thanx man, ill use that.
Display posts from previous:   
   Index -> Programming, Java -> Java Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 12 Posts ]
Jump to:   


Style:  
Search: