Win a copy of Svelte and Sapper in Action this week in the JavaScript 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

JAVA_TOOL_OPTIONS

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi All,

I have java and qtp 9.5 on my computer.
When I created a small "Hello World" to compile,
javac gives an error message : Picked Up JAVA_TOOLS_OPTIONS: -agentlib:jvmhook

How to compile java the normal way?

Regards,
Venkat
 
Marshal
Posts: 70263
282
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch and sorry for not replying earlier; I have been very busy. How did you get that error message; I have never seen it before. How are you compiling your hello world program?
 
Ranch Hand
Posts: 214
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I realize this is an old thread, but when searching I found a similar question which also had not been answered, and since I just learned about this I thought I might reply so people can find an answer when they search for this

JAVA_TOOL_OPTIONS is an environment variable you can set to pass arguments to the Java Virtual Machine (and apparently also javac). If the variable is set, its content is printed out as mentioned by the OP. So this is no error, just debugging info. It can be used for command line options (like -enableassertions) and also to set system properties (like -Dmyvar=myvalue), which you can then query through System.getProperty().

Its use is for when you have no command line available when starting the JVM, or also starting from scripts.

From a quick test, this works for Java 1.5 and up.

Link to Oracle Doku: Environment Variables.
 
Those are the largest trousers in the world! Especially when next to this ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
    Bookmark Topic Watch Topic
  • New Topic