File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes java compiled or interpreted ? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "java compiled or interpreted ?" Watch "java compiled or interpreted ?" New topic

java compiled or interpreted ?

Manas Ahlaad
Ranch Hand

Joined: Nov 07, 2001
Posts: 165
is java a compiled language or interpreted language ?

Manas<br />Today If You are not Confused,You are just not thinking Clearly !<br />---------------------------------
Arun Boraiah
Ranch Hand

Joined: Nov 28, 2001
Posts: 233
source code -> bit code -> which run time interpreated and code gets executed. Will this answer your question?

Sharing is learning
Prashant Neginahal
Ranch Hand

Joined: Dec 04, 2002
Posts: 76
It's both man.Compiler and Interpreter are not about any languages ,these are the tools which assist high level language to talk with OS.
Yes, w.r.t java both comes into picture. Compiler converts source code(.java) into bytecode form(.class)which is OS independent.Then, interpreter interpretes byte code and converts it into machine level w.r.t.underlying OS.

--------------<br />Prashant<br />SCJP-91%
Manas Ahlaad
Ranch Hand

Joined: Nov 07, 2001
Posts: 165
you mean compiler gives byte code from source code and then interpreter executes it at runtime?
in that case can we call it as a compiled language? since runtime it may be interpreted or compiler (hotspot does comilation at runtime also i.e all at one chunk).
girish rateshwar
Ranch Hand

Joined: Mar 04, 2001
Posts: 99
Hi manas,
Java is a compiler as well as an interpretor based language.
What gives java its platform independance is the byte code which runs in the JVM. (remember it is the interpretor which executes the .class file in the JVM)
So <filename>.java--compiled-->><filename>.class--interpreted in the JVM-->> Execution

I agree. Here's the link:
subject: java compiled or interpreted ?
It's not a secret anymore!