Web Design Forum HTML CSS JavaScript PHP Graphic Design SEO forum

Full Version: How to compile Java
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
We all know Java compiles down into byte format which requires a JVM to run. Often for deployment we can not guarantee that our clients will have the JRE installed, nore can we supply them with a jar file. What solutions do people use to compile their Java code into native code for simple use and execution?
jdk 1. 4 is used to compile java code
Before the Java virtual machine (VM) can run a Java program, the program's Java source code must be compiled into byte-code using the javac compiler. Java byte-code is a platform independent version of machine code; the target machine is the Java VM rather than the underlying architecture. To compile a Java source code file Foo.java, you would do the following:

% javac -g Foo.java

The -g command line option is optional, but we recommend using it as it makes debugging easier.
Reference URL's