Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX


Tip of the Day
Language: Java Language
Expertise: Beginner
Jan 18, 2000

Standalone Executable

Question:
How can I compile a Java application's class files into a standalone executable file without using a commercial native code compiler and at the same time keep it platform independent?

Answer:
The simple answer is that you cannot do that. By compiling Java byte code to operating system binaries, you create a platform-dependent program. The only way to keep your Java applications platform-independent is to keep them in byte code form.

With the progress being made in just-in-time (JIT) compilation, there is little need to compile your Java programs into native executables. However, natively compiled Java still leads JIT Java in performance benchmarks.

If you need platform independence, distribute your application as class files, otherwise you're going to have to compile the program for ever platform you want to run on.

DevX Pro
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date