Re: Java and ActiveX Integration
On Oct 23, 8:23 pm, "Peter Olcott" <NoS...@SeeScreen.com> wrote:
"Arne Vajh=F8j" <a...@vajhoej.dk> wrote in message
news:471e9953$0$90264$14726298@news.sunsite.dk...
Peter Olcott wrote:
How does Java run on WebPages if it is not interpreted?
JSP (Java Server Pages) is triple compiled on the server
(jspc compiles from JSP to Java, javac compiles from Java
to Java byte code, JVM JIT compiles from Java byte code
to native).
Java applets is compiled from Java to Java byte code
by the developer somewhere and compiled from Java byte
code to native by the JIT compiler in the JVM used
by the browser.
Well if you use a JVM from mid 1990's it may actually
interpret, but ...
JavaScript is interpreted, but has nothing to do with
Java.
Arne
How long does this whole process take? Does the user have to
wait a long time for a Java applet to be compiled before it
runs? I need a language that will run will very little
delay, either directly from source-code or very quickly
compiled.
The compilation from bytecode to native code is an ongoing, background
process performed on code as it's run and profiled by the JVM. Sun's
implementation ("Hotspot") is described in detail on their site:
<http://java.sun.com/javase/technologies/hotspot/index.jsp>
In general JIT compilation trades a small slowdown initially (overhead
of running a lightweight profiler and the compilation process itself)
for a relatively large speedup over the life of the program. I've
seen test cases for some things double in speed over a few minutes of
repeated tests, personally (for somewhat CPU-heavy operations: XML
parsing from a memory buffer).
You'll need to quantify your speed needs and measure for yourself
whether a given language is "fast enough", but personally I've found
Java to be more than fast enough for the vast majority of programs.
YMMV,
Owen