Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

How to turn off JIT

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
Can anyone tell me how to turn off JIT?
Thanks.
 
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well software that You are using and that uses jit compiler usually have a property file (or number of files) where You can specify that You don't want to use jit compiler.
Vladan
 
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
On Java 1.1 you can supply the "-nojit" parameter to the java command:
java -nojit MyClass
On Java 2, you can override the "java.compiler" property, usually by saying:
java -Djava.compiler=none MyClass
Does this help?
 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
this may be a stupid question, but why would someone want to turn off the JIT compiler?
dave
 
Vladan Radovanovic
Ranch Hand
Posts: 216
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Dave,
I have experienced huge problmes when installing VisualCafe and Oracle 8i on this machine. The problem is that the machine is p4 and You must turn off jit compiler when installing those two applications( and probably few more). Actually problem happens with any platform that uses the Intel Pentium 4 with sun JRE and Symantec JIT. I would guess that original poster have experienced the same problem but wasn't sure how to solve it. Just a guess.
Vladan
 
mike nu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This question did sound stupid. Actually I just want to perform a small benchmark test: how fast the JIT will bring to Java compared to C/C++.
Did you do this stupid thing before?
 
mike nu
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Now I got the answer: use java -Djava.compiler=none myapp
This command may not work under WindowsNT, but work under Solaries.
Thanks.
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Setting the java.compiler property should work on all Java 2 VMs, whatever system they are running on. It certainly works on Solaris, Linux, DEC Unix, NT, W95 and W98, because I use it!
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I switch off the JIT in order to see source-code line-numbers in cases of NullPointerException -- very helpful (otherwise, one sees, in the stacktrace, only "Compiled Code")
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic