save it into a .java file.
then open command prompt and navigate to your java bin directory.
then type CD then your java bin directory.
then type this .
javac ProgName.java
compile:javac filename.javarun:java filename
If you want to compile a java program the name of that source code must end with extension .java
The Java compiler translates Java source code to Java byte code.
A java compiler takes Java source code and turns it into Java bytecode, which can then be run by the java virtual machine.Using JIT means that the java code will be compiled and executed at the time that you run the program, which will slow down the program because it has to compile the code at the same time that it runs.
One can run and compile a Java applet program by agreeing to the terms and downloading it. It is possible to get a compiler online that will compile and run Java programs.
You compile it.You compile it.You compile it.You compile it.
The source code is just the set of statements written in (any included) java language by a programer (in this case our source code is a text file with .java extension). And in other hand a bytecode is the resulting code of compile a .java file, It is not machine code, but it can be interpreted and executed by the jvm.
Java files can be compiled. The output is a machine understandable file that has a .class extension which can be executed by the JVM
Yes, Java programming language has a Garbage collector for unused memory. and the best part about it is that it does it automatically. The Garbage Collector is built into the Java Virtual Machine, and will do automatic garbage collection for you. If you chose to compile your Java code down to native code (via a Java->native code compiler), then NO garbage collection is done for you.
The main reason for this is that C code compiles down to native machine code. Java bytecode needs to be run in the JVM, which may or may not compile it down to native code.
java is platform independent because java code is compile on javac compiler after create one class file this file is run any of paltform run this code becauase jvm is understand this code properly managed. jatin patel
How can I compile java programs using windows vista text pad?