[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 548
  • Last Modified:

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

where can I get the JAVA "Just in Time" compiler?
0
chenwei
Asked:
chenwei
  • 6
  • 6
  • 2
1 Solution
 
heyhey_Commented:
almost everywhere ...
sun's JDK include's Symantec JIT compiler and java.exe uses it by default
0
 
conickCommented:
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
 
conickCommented:
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
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
chenweiAuthor Commented:
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
 
heyhey_Commented:
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
 
chenweiAuthor Commented:
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
 
heyhey_Commented:
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
 
chenweiAuthor Commented:
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
 
chenweiAuthor Commented:
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
 
heyhey_Commented:
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
 
chenweiAuthor Commented:
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
 
heyhey_Commented:
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
 
chenweiAuthor Commented:
>>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
 
heyhey_Commented:
>> 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

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

  • 6
  • 6
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now