I need to set the following argument as the Default VM Arguments in Eclipse
-javaagent /Developer/aspectj-1.6/aspectjweaver.jar
When I add the line and run my code, it gives me the error:
Unrecognized option: -javaagent
Could not create the Java virtual machine.
How do I fix this ?
-- Go to the Eclipse Window > preferences, in "Java > Installed JREs". -- Copy the current default JRE with a new name, for example myJRE. -- Select the new JRE and click on the "Edit" button. -- In the "Edit JRE" dialog, add your JVM arguments in the "Default VM Arguments" field.
VM arguments are typically values that change the behaviour of the Java Virtual Machine (JVM). For example, the -Xmx256M argument allows the Java heap to grow to 256MB. The Eclipse runtime is also configurable via many system properties which can be passed as VM arguments in the form: -DpropertyName=propertyValue.
Step 1: Open the IDE and right-click on the application in which you want to pass VM arguments. Step 2: Click on the Run As » Run Configurations… Step 3: Click on the Arguments tab and in the VM arguments: box, type the arguments that you want to pass.
The directory server provides a means of configuring the Java Virtual Machine (JVM) and Java options for each command-line utility and for the directory server itself. The Java configuration is provided in a properties file, located at instance-dir /OUD/config/java.
You need a colon (:
) between the -javaagent
and the JAR, not a space. For example:
-javaagent:/Developer/aspectj-1.6/aspectjweaver.jar
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With