Reputation: 861
I want to know how do we use javac -J javaoption ? What is the purpose and how can i use this option during compile time ? I have gone through the documentation for javac -J option but do not quite follow the explanation there.
Passes the argument javaoption directly through to the Java interpreter. For example: -J-Xmx32m. javaoption should not contain spaces; if multiple arguments must be passed to the interpreter, use multiple -J options. Java 1.1 and later.
Upvotes: 1
Views: 2682
Reputation: 9587
Think of it the following way. Java applications are not executed directly, but are interpreted in a virtual machine, hence JVM. The options you normally pass to javac
govern restrictions and options for your applications running in the JVM.
However, the JVM itself is also an application, a native one, which has its own options, which are set via the -J-*
flags.
So the normal (including non-standard options) options tell the JVM how to configure and restrict your java code, and the -J-*
tell the JVM how to behave itself.
You most probably will never need to set these options.
Upvotes: 0
Reputation: 526713
javac
is itself written in Java. Thus, it provides an option to allow you to specify how javac
itself is run (as a Java program), just like any other Java program would.
Upvotes: 5