VM Options (what you had is fine)
In Project Properties → Run → VM Options, use exactly:
- No quotes
- No escaping
- No slashes changed
Java handles spaces correctly at this level.
Even better (recommended for CPLEX)
Option 2: Use PATH instead of java.library.path
CPLEX officially recommends this.
Add to Windows Environment Variables:
Then remove -Djava.library.path entirely.
This avoids all NetBeans/Maven quoting problems.
How to verify it is really fixed
Add this once in main():
You should see:
If CPLEX loads without UnsatisfiedLinkError, You're done.
------------------------------
Mahavir Metal
------------------------------
Original Message:
Sent: Mon January 05, 2026 10:56 AM
From: Srini tamvada
Subject: Unable to set java runtime path in Netbeans
Have tried variations of this (forward slash, back slash, double back slash) but NetBeans keep saying syntax error when I run the project
-Djava.library.path="C:\Program Files\IBM\ILOG\CPLEX_Studio2211\cplex\bin\x64_win64" (This is under project , properties , run VM options)
Netbeans says: The syntax of the command is incorrect.
"JAVA_HOME=C:\\Program Files\\Amazon Corretto\\jdk21.0.8_9" cmd /c "\"C:\\Program Files\\NetBeans-23\\netbeans\\java\\maven\\bin\\mvn.cmd\" \"-Dexec.vmArgs='-Djava.library.path=\"C:\\Program Files\\IBM\\ILOG\\CPLEX_Studio2211\\cplex\\bin\\x64_win64\"'\" \"-Dexec.args=${exec.vmArgs} -classpath %classpath ${exec.mainClass} ${exec.appArgs}\" -Dexec.appArgs= -Dexec.mainClass=com.mycompany.saipops_v12_gold.SaiPOPS_v12_gold_Driver \"-Dexec.executable=C:\\Program Files\\Amazon Corretto\\jdk21.0.8_9\\bin\\java.exe\" \"-Dmaven.ext.class.path=C:\\Program Files\\NetBeans-23\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" --no-transfer-progress process-classes org.codehaus.mojo:exec-maven-plugin:3.1.0:exec"
EDIT: PROBLEM SEEMS TO HAVE GONE AWAY AFTER REBOOT.
------------------------------
Srini tamvada
------------------------------