When trying to generate jaxb classes from an xsd in IntelliJ via the menu
Tools > XML Actions > Generate Java Code from XML schema using JAXB
(provided by the plugin Jakarta EE Webservices (JAX-WS)), I get the following error message :
Cannot run program "C:\Java\tomcat9\jvm\oraclejdk-11.0.18.0.2\bin\java.exe": CreateProcess error=206, The filename or extension is too long
After some googling, I saw that a common proposed solution is to add in workspace.xml the property : dynamic.classpath = true
It didn't work (even after reopening the IDE)
I also tried to add -Didea.dynamic.classpath=true
(in Help -> Edit Custom VM Options ...) also to no avail.
My conclusion is that the plugin seems to ignore those configs and (hopefully) uses its own.
Is it the case ? If yes, how to configure this plugin ?
Finally, I also tried to copy my jvm directly in the C:/ folder, and to put my xsd also in C:/ and same error ...
Are there really no way to make this plugin work as intended ?
The problem seemed to be related to the name of my project directory. Something like C:\git\com.my.project.identifier .
Even if the xsd is put directly in C:\ with a very short name, it doesn't help, because the plugin maybe still execute its command with a path relative to the project folder.
Creating a new project in C:\git with a much shorter name (e.g. C\git\test) has solved the problem.
Thank you all for your contributions. still a pity to suffer from such a limitation though ...