473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

compiler or an interpreter?

184 100+
Hi,
Is JVM a compiler or an interpreter?


-Thanks & Regards,
Hamsa
Mar 25 '08 #1
3 1877
sukatoa
539 512MB
Hi,
Is JVM a compiler or an interpreter?


-Thanks & Regards,
Hamsa
JVM (Java Virtual Machine), it is the JRE, required for the running of Java programs, which includes a Java interpreter.

Have you ever use javac.exe?

sukatoa.
Mar 25 '08 #2
r035198x
13,262 8TB
There is a JVM specification that might be of interest to read.
Mar 25 '08 #3
JosAH
11,448 Expert 8TB
Hi,
Is JVM a compiler or an interpreter?


-Thanks & Regards,
Hamsa
The JVM used to be just an interpreter and in a lot of implementations just
'green' threads were implemented (they blocked when an OS call blocked).
After a lot of complaints had come in about the lack of speed Sun came up
with 'hotspot' compilation which is JIT (Just In Time) compilation plus a watch-
dog that determined *what* code to compile and when in order to speed up
the execution of the virtual machine code.

Nowadays the JVM even preloads a lot of core classes (compiled to machine
code) such as String, Number, Integer etc. There still is an interpreter on board
but the hotspot mechanism is so 'aggressive' nowadays that most (if not all)
of the code is compiled to actual machine code before it could run in interpreted
mode.

So the JVM is a bit of both but it became more of a compiler nowadays. Note that
it doesn't compile a high level human readable language (that's the job for javac)
but it translates virtual machine code (the Java byte code) to native machine code.

kind regards,

Jos
Mar 25 '08 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

34
by: Nikola Skoric | last post by:
Is the a PHP compiler? A program that compiles PHP code to executable which doesn't need php interpreter to execute... -- Pozdrav/Regards, Nikola Skoric. "...Usne, tice-rugalice - a u oku...
17
by: Nuno Paquete | last post by:
Hi group. I hould like to write my code with a compiler instead of a text editor. What compilers do you advice me? I hould prefer compiler to run on Linux, but you can refer to windows' compilers...
1
by: Jeff Hagelberg | last post by:
I'm trying to create a python module which can be used by a python interpreter embedded inside a fortran program I have. To do this, I first created python wrappers for all the functions in my...
15
by: Anton Gavrilov | last post by:
Hi all, I seek your advice on where to start if I want to write a compiler for a toy C-like language I invented (or, rather, am in the process of inventing). Yes, yes, I know I'm crazy and the...
1
by: george jetson | last post by:
Hi All I need a compiler (C preferably) that will output a Pcode that I can create a interpreter for on a very small embedded system. I want to execute the Pcode from serial flash. Something...
2
by: Michael Hudson | last post by:
The PyPy development team has been busy working and we've now packaged our latest improvements, completed work and new experiments as version 0.9.0, our fourth public release. The highlights of...
5
by: Grant Olson | last post by:
I'm feeling a little guilty here. I spent a lot of my free time last year working on an x86 compiler for python. I made a reasonable amount of progress, but my interests wandered off into other...
30
by: lovecreatesbea... | last post by:
K&R says the following in the preface to the first edition, "... the C compiler, and ... are written in C." I'm wondering, does it say even the first / original C compiler was written in C?
31
by: Mark Dufour | last post by:
Hi all, I have recently released version 0.0.20 and 0.0.21 of Shed Skin, an optimizing Python-to-C++ compiler. Shed Skin allows for translation of pure (unmodified), implicitly statically typed...
2
by: Hendrik van Rooyen | last post by:
Up to now, I have been innocently using the vanilla python that comes with the Linux distribution (Suse in my case). For the past few days, I have been playing with a little device called an...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.