answersLogoWhite

0

Because the source programs just do not run. Full stop.

You have to

1) compile them to an executable (C)

2) use a program that interprets them (script languages, eg. sh, perl, php)

3) mix the two: half-compile them into something that can be interpreted by another program (source -> javac.exe -> bytecode -> java.exe)

User Avatar

Wiki User

16y ago

What else can I help you with?

Related Questions

What in jit compiller?

The JIT (Just In Time) compiler takes the semi-compiled "byte-code" of a language (notably Java), and converts it into proper machine code before execution. This delays the startup time, but provides better execution time.


Where is a program temporally stored for execution?

All programs must be loaded into memory (e.g., RAM) in order to be executed. Compiled programs can be loaded directly since they consist of native machine instructions, but interpreted programs must be translated by a runtime program. E.g., Java is an interpreted language which compiles to byte code which must be interpreted by the Java Virtual Machine implementation at runtime.


Why are Java executables platform independent?

When programs written in most other languages are compiled, they produce a platform-dependent executable that only runs on the same type of computer (i.e. 64-bit Windows or Intel Macs) it was compiled on.When a Java program is compiled, on the other hand, it produces a Java .class file that contains Java bytecode. That bytecode runs the same on almost all computer types because the Java virtual machine takes it and compiles it to platform-dependent code just before it runs.


In .NET is CLR a process or a thread?

Process .... it is responsible for managing the execution of the .NET programs , it is the same as JVM is for JAVA programs...


What kinds of differences are compiling and running Java vs C programs?

Although Java is often described as a compiled language, it is a language that is both compiled and interpreted. Unlike C++ which typically compiles to native machine code, Java compiles to Java byte code, the native language of the Java virtual machine. The key difference here is that the Java virtual machine is not machine dependent, thus the same byte code can be executed upon any physical machine with a suitable Java virtual machine implementation; it is highly portable. Machine code can only be executed upon the machine architecture for which it was compiled. To support other architectures, the source code must be recompiled for those architectures. In terms of execution, native machine code requires no further translation and can be executed as soon as the code is compiled successfully (including any and all shared libraries required by the executable). Java byte code requires that the Java virtual machine be memory-resident during execution as the byte code must be interpreted to produce native machine code while the byte code is executing within the virtual machine. In terms of memory consumption, C++ programs require no additional memory over and above the program's requirements. Java programs require additional memory for the Java virtual machine runtime. Java programs also consume additional memory to assist in memory management, such as automatic garbage collection. C++ programs manage their own memory using resource handles and smart pointers; the use of a garbage collector is optional. In terms of performance, C++ programs execute many times more quickly than equivalent Java programs due to Java's need to interpret the byte code.


Define java virtual machine in java?

A Java Virtual Machine (JVM) is a set of computer software programs that use a virtual machine model for the execution of Java computer programs and scripts. The JVM accepts data in a form commonly referred to as Java bytecode. This language conceptually represents the instruction set of a stack-oriented, capability architecture.


What is the meaning of deplyoment IN JAVA?

Deployment is the process of copying the compiled Java classes to a server or client. Once deployed, the server is able to run those classes (as in Java servlets), or serve those files to clients (as in Java applets), or be executed as programs (as in Java desktop applications).


Command use on how to run a java program?

You execute it the same way you would on any other OS. As long as you have the Java Runtime Environment installed and the "java" executable is in your path, from the command line you would simply run: java -cp /path/to/file/here com.some.class.to.run.Here


Why is java virtual machine required?

That's because that's the way Java is designed. Java programs are compiled to be run on a special program that interprets it - the Java Virtual Machine. The reason it is designed this way is because it allows Java programs to run on just about any computer - despite the fact that different computers have different sets of machine instructions. It is well possible to write programs that run without requiring support of specific programs - but such programs will only run on specific computers.


What in computing is java?

Java is a computer programming language. Java programs can be interpreted (the computer compiles and runs the program as the code is executed) or it can be pre-compiled into bytecode (the computer doesn't have to compile it as soon as it is run, so time is saved.)


Extension file for Java?

Java source files have the .java extension, compiled Java class files have the .class extension.


Advantages of c plus plus over java?

The main advantage is that C++ programs compile to native machine code and therefore execute many times faster than equivalent Java programs, which compile to byte code suitable for interpretation by the Java virtual machine. C++ is also more efficient since it requires no interpretation (and therefore no interpreter), and can use memory just as efficiently as assembler. The main disadvantage is the code must be compiled separately for each platform. With Java, programs need only be compiled once for any platform.