PetrMiksik opened a new issue, #7858:
URL: https://github.com/apache/netbeans/issues/7858

   ### Apache NetBeans version
   
   Apache NetBeans 23
   
   ### What happened
   
   In Maven project, it's not possible to enter the path with spaces into VM 
options in Linux (not tested under Windows OS). I use javaagent with my 
application, the path to agent JAR file contains spaces, so I've enclosed it in 
quotation marks. The path was:
   
   _/projects/java/Libraries/OpenJPA 4.0.0/openjpa-all-4.0.0.jar_
   
   Generated command lines is as follows:
   
   > cd /projects/java/DBTestMaven; 
JAVA_HOME=/usr/lib/jvm/java-21-openjdk-amd64 
/usr/lib/apache-netbeans/java/maven/bin/mvn 
"-Dexec.vmArgs=-Dsun.java2d.opengl=true  
'-javaagent:'\\"'\\"'/projects/java/Libraries/OpenJPA 
4.0.0/openjpa-all-4.0.0.jar'\\"'\\"''" ... <
   
   And the error is:
   
   >Error occurred during initialization of VM
   agent library failed Agent_OnLoad: instrument
   Error opening zip file or JAR manifest missing : 
'/projects/java/Libraries/OpenJPA 4.0.0/openjpa-all-4.0.0.jar'<
   
   As you can see, quotation marks are interpreted as part of the path.
   
   ### Language / Project Type / NetBeans Component
   
   Java Maven Project (Java application)
   
   ### How to reproduce
   
   Create Maven project (Java application) and use quoted paths with spaces in 
VM options or arguments.
   
   
![image](https://github.com/user-attachments/assets/5fb19925-03aa-4e12-8454-82f0b44fa83a)
   
   
   ### Did this work correctly in an earlier version?
   
   No / Don't know
   
   ### Operating System
   
   Ubuntu 22.04
   
   ### JDK
   
   JDK 21
   
   ### Apache NetBeans packaging
   
   Apache NetBeans provided installer
   
   ### Anything else
   
   _No response_
   
   ### Are you willing to submit a pull request?
   
   No


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists

Reply via email to