Can I compile by .java file directly into machine language instead of Java bytecode?
Yes, if you have gcj type one of the following at the command prompt % gcj –main=HelloWorld HelloWorld.java % gcj –main=HelloWorld HelloWorld.class This will create an executable named a.out or HelloWorld.exe depending on your operating system. You can then run the program by typing a.out or HelloWorld instead of java HelloWorld.
Related Questions
- If a midlet has a text file that contains all its language strings and this was Java Verified – would the midlet need to be retested (Java Verified) if a different language file were dropped in?
- Can I compile by .java file directly into machine language instead of Java bytecode?
- Why Java is considered as machine independent language?