Writing a Java Program
Java source code is written in plain text, using a text editor.
- This could range from a plain text editor like Notepad, to a programmers'
editor such as TextPad, EditPlus, or Crimson Editor, to a complex integrated
development environment (IDE) like NetBeans, Eclipse, or JDeveloper.
- The source code file should have a
javac compiler is then used to compile the source code into bytecode.
- The bytecode is stored in a file with an extension
- Bytecode is universal - one bytecode file will run on any supported platform.
You then run the
java runtime engine, which will then interpret the bytecode to execute the program.
- The executable program you are running is:
- The class name tells the JVM what class to load and run the
main method for.
- You must have a JVM made specifically for your hardware/OS platform.