Solved

where can I get the JAVA "Just in Time" compiler?

Posted on 1998-12-07
14
534 Views
Last Modified: 2013-11-23
where can I get the JAVA "Just in Time" compiler?
0
Comment
Question by:chenwei
  • 6
  • 6
  • 2
14 Comments
 
LVL 16

Expert Comment

by:heyhey_
Comment Utility
almost everywhere ...
sun's JDK include's Symantec JIT compiler and java.exe uses it by default
0
 
LVL 7

Expert Comment

by:conick
Comment Utility
The recently released JDK1.2 is now available has the "Just In Time" compiler (Symantec's i think) bundled with it.  (its out of beta for Windows development environment and in pre-release for Solaris)
http://java.sun.com/products/jdk/1.2/    

If you need a 1.1 solution JIT is now bundled with 1.1.7 (B) and is located at:

http://java.sun.com/products/jdk/1.1/download-jdk-windows.html


0
 
LVL 7

Expert Comment

by:conick
Comment Utility
I couldnt find just the JIT compiler on sun's site
But if you are using 1.2 or 1.1 you probably should have the latest version anyway
The file is called
symcjit.dll

0
 

Author Comment

by:chenwei
Comment Utility
I am not sure if one uses the JIT, the compiling time will be shortened or the program will run faster?

I've downloaded the jdk1.2 and have tried compiled my programs again, that means I used the javac to compile the program and use the java to start the program as by using jdk1.1. But I can't feel any improvement by speed. I was told if one uses the JIT, either the compiling or the runing time of the program will be almost so fast as c/c++.
0
 
LVL 16

Expert Comment

by:heyhey_
Comment Utility
usually Java VM interpretes the VM instructions - i.e loads one bytecode instruction, analyzes it and exceutes it.
when you start java.exe, you start the java VM.

JIT is JustInTime compiler. if you use JIT VM, it precomiles all the bytecode instructions in run-time so that the next time it needs them they are already in native platfotm instructions format (so it exceutes them much quicker)
so JIT speeds up the 'runing time' of the program.

you can start your program with/without JIT to see the differences

java myTest
java -nojit myTest

JIT is included in the JDK package and is turned on by default.

(note: Sun's JIT VM - which is in fact Symantec's has some serious bugs in the past ... it seems OK at the moment ...)

>> .. will be almost so fast as c/c++
still not so fast .. but we are waiting for the miracle named HotSpot :-)
0
 

Author Comment

by:chenwei
Comment Utility
to heyhey's answer:

I've tried using the -nojit option, but it failed. For example, I've a program myTest.java. First I used "javac myTest.java" to compile it. Later I used "java -nojit myTest" to start it. But it shows an error message: "Unrecognized option:-nojit. Could not create the Java virtual machine."

Further, I just typped in java and want to see the options. But I can't find out the option "-nojit".
0
 
LVL 16

Expert Comment

by:heyhey_
Comment Utility
this is my java.exe

[c:\]java
usage: java [-options] class

where options include:
    -help             print out this message
    -version          print out the build version
    -v -verbose       turn on verbose mode
    -debug            enable remote JAVA debugging
    -noasyncgc        don't allow asynchronous garbage collection
    -verbosegc        print a message when garbage collection occurs
    -noclassgc        disable class garbage collection
    -ss<number>       set the maximum native stack size for any thread
    -oss<number>      set the maximum Java stack size for any thread
    -ms<number>       set the initial Java heap size
    -mx<number>       set the maximum Java heap size
    -classpath <directories separated by semicolons>
                      list directories in which to look for classes
    -prof[:<file>]    output profiling data to .\java.prof or .\<file>
    -verify           verify all classes when read in
    -verifyremote     verify classes read in over the network [default]
    -noverify         do not verify any class
    -nojit            disable JIT compiler

[c:\]java -version
java version "1.1.7A"

and i've used java with the -nojit option ...

what is your java version ?
0
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 

Author Comment

by:chenwei
Comment Utility
The following are the outputs from my java:
1)
c:/jdk1.2/java
Usage: JAVA.EXE [-options] class [args...]
       (to execute a class)
       or  JAVA.EXE -jar [-options] jarfile [args...]
       (to execute a jar file)
       where options include:
       -cp -classpath <directories and zip/jar files separated by ;>              
          set search path for application classes and resources
       -D<name>=<value> set a system property  
       -verbose[:class|gc|jni]  enable verbose output
       -version  print product version  
       -? -help  print this help message
       -X print help on non-standard options

2)
c:/jdk1.2/java -version
 java version "1.2fcs"
 Classic VM (build JDFK1.2fcs-S, nativ streads)

I've just downloaded this new version yesterday.
0
 

Author Comment

by:chenwei
Comment Utility
I think perhaps one has no chance to chose if you want the JIT or not by the new version. The JIT is automatic be used by the new version. Possible?
0
 
LVL 16

Expert Comment

by:heyhey_
Comment Utility
chenwei:

so what's the real question then? :)
i couldn't find any JIT information in the README file ... (but i made just a quick search ...)

0
 

Author Comment

by:chenwei
Comment Utility
My real question is just want to know if jdk1.2 really runs faster than the other old version. I read in some books that if the one uses the jit, the java program will run almost so fast as the c/c++ program. If really so, it's certainly a great advantage. But according you and conick''s answer, the jit is already in jdk1.2 embadded. But I can't feel that the java program compiled with jdk1.2 runs much faster than that without jit.
0
 
LVL 16

Expert Comment

by:heyhey_
Comment Utility
Note: JIT was embeded not only in JDK1.2, but in JDK 1.1.7 (where you can turn it On/Off)

>> But I can't feel that the java program compiled with jdk1.2 runs much faster than that without jit.
JIT speeds the program execution, but not by compliling .java files to .class files  in different way - it speeds the real program execution (i.e. JIT is JustInTime interpreter - not compiler)

so (with jdk1.1.7) there is significant speed diference between
java.exe myTestClass  - which starts myTestClass with JIT comppiler enabled
java.exe -nojit myTestClass - which starts myTestClass with JIT comppiler diabled
(it is the same .class file)

get JDK 1.1.7 and you'll easy see the difference. but the speed (with JIT enabled) is still not so fast as C/C++ (but pretty fast although)

so yes - JDK 1.2 probably includes JIT compiler which will increase signfvicantly the speed excution of the programs that you start
0
 

Author Comment

by:chenwei
Comment Utility
>>JIT speeds the program execution, but not by compliling .java files to .class files  in different >>way - it speeds the real program execution (i.e. JIT is JustInTime interpreter - not compiler)

Yes, I see. I do meant the execution speed.

If you have tested that a program compiled with jit runs faster than that compiled without jit, and if you are sure that the java program (even is compiled with jit) runs still not so fast than a c/c++ program. Than my question is answered.

Thanks!


0
 
LVL 16

Accepted Solution

by:
heyhey_ earned 10 total points
Comment Utility
>> If you have tested that a program compiled with jit runs faster than that
>> compiled without jit, and if you are sure that the java
>> program (even is compiled with jit) runs still not so fast than a c/c++ program.

yes i've tested this, and it's (probably) not so fast as c/c++ program
so should i post an answer ?

note: many developers are wayting for Sun's HotSpot project which is supposed to be super-fast super-inteligent JavaVM that will work even faster that native code ...

0

Featured Post

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Go is an acronym of golang, is a programming language developed Google in 2007. Go is a new language that is mostly in the C family, with significant input from Pascal/Modula/Oberon family. Hence Go arisen as low-level language with fast compilation…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

7 Experts available now in Live!

Get 1:1 Help Now