Portability Question !
Visual C++ gave the ability to compile and link my code to an .exe that I
could put on a floppy a take to a friends house and run. Is this possible
Thanks in advance,
Re: Portability Question !
"eejay" <email@example.com> wrote:
>Visual C++ gave the ability to compile and link my code to an .exe that
>could put on a floppy a take to a friends house and run. Is this possible
>Thanks in advance,
Yes and no, the reason for this is C++ and Java have different philosophies.
You will not be able to produce an executable file from java classes using
JDK or even IDEs, but there is a tool called J2EXE which does exactly this
The reason you cant make a .exe file from java as easily as with C++ is C++
compilers produce executable code which can run directly on hardware (ah
you might say what a brilliant idea! but this severely limits the cross-platform
portability, i.e. a program written and complied on a windows platform will
not run on a Unix box). On the other hand Java is meant to be a platform
independent and to achieve this a java complier produces a bytecode file
from the compiled file instead of and executable file. Then this bytecode
can be interpreted on any platform and give you the same result (at least
-- Android Development Center
-- Cloud Development Project Center
-- HTML5 Development Center
-- Windows Mobile Development Center