File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes JAVA_TOOL_OPTIONS Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "JAVA_TOOL_OPTIONS" Watch "JAVA_TOOL_OPTIONS" New topic
Author

JAVA_TOOL_OPTIONS

Venkat Eturi
Greenhorn

Joined: Jun 19, 2010
Posts: 1
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
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 36508
    
  16
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?
D. Ogranos
Ranch Hand

Joined: Feb 02, 2009
Posts: 214
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: JAVA_TOOL_OPTIONS
 
Similar Threads
can i compile java from java code?
Compiling Pacakage
Java 1.5 on mac
can i compile java from java code?
trouble with reflection