Logo 
Search:

Java Forum

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds

x.class to x.exe

  Asked By: James    Date: Jul 15    Category: Java    Views: 934
  

I hear that it's possible to map a "myProgram.class" to
a "myProgram.exe" ! is it true or false?

Thank you for some help about this topic.

Share: 

 

2 Answers Found

 
Answer #1    Answered By: Jaime Bowman     Answered On: Jul 15

They don't make a standalone exe, ie you still need all the jar files
and a jre to run the exe. My understanding of how they work is they
simply make a exe  file which runs a command promt with the command line
you need to run your program.

 
Answer #2    Answered By: Brandon Tucker     Answered On: Jul 15

ages ago (in java terms), some of the compilers used to bind the jvm and
your classes into an exe  that launched the jvm and loaded the classes.
The really intelligent ones made a subset of the jvm which your classes
used. This was before reflection was used much, or that would make a
mess of discerning which jvm classes are used. With the current size of
the jvm, it would be a large exe, unless you did cull unused jvm stuff
though.
It's possible to do it, you just have to be careful with reflection (and
know what parts of the jvm are dependant on each other - I think
reflection is used in the jvm).

 
Didn't find what you were looking for? Find more on x.class to x.exe Or get search suggestion and latest updates.




Tagged: