Hi, Hopefully, you can give mesome hints how to overcome my problem.
I am running Windows 10, Netbeans 12.1 with Gradle 6.6, Java 14. I have a multi-module, multi-project application with Gradle. The important parts of build.gradle: ... apply plugin: 'application' def LO_HOME = 'C:/Program Files/LibreOffice' dependencies { implementation project(':Tools') compileOnly files("${LO_HOME}/program/classes/libreoffice.jar", "${LO_HOME}/program/classes/unoloader.jar") runtimeOnly files("${LO_HOME}/program/classes/libreoffice.jar", "${LO_HOME}/program/classes/unoloader.jar") } application { mainClass = 'LOTestsGradleMulti.Tests.SWriter' } The application runs ok if launched from within Netbeans. So far, so good; But I cannot be executed correctly from the build distribution, because: - the LibreOffice jars (libreoffice.jar, unoloader.jar) must reside in their original location within LibreOffice (otherwise the LO system cannot be found) - for the distribution, the jars are copied into the lib fiolder (where they cannot be used due to the above point) - the classpath in the created execution script set CLASSPATH=%APP_HOME%\lib\Tests.jar;%APP_HOME%\lib\libreoffice.jar;%APP_HOME%\lib\unoloader.jar;%APP_HOME%\lib\Tools.jar I can make it run if I change %APP_HOME%\lib\libreoffice.jar;%APP_HOME%\lib\unoloader.jar; to refer to the correct LibreOffice directory, either by introducing a new variable or fixed path What I would need: - how can I avoid copying the jars to the lib folder ? - how can the classpath created with the correct directory, even better by using a variable ? - still may be run from Netbeans Note: if I remove the runtimeOnly: - the jars are not copied to lib - the classpath still contains the above unusable value - it cannot be run from the IDE any more Thanks in advance Helmut Leininger
<<attachment: h_leininger.vcf>>
--------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@netbeans.apache.org For additional commands, e-mail: users-h...@netbeans.apache.org For further information about the NetBeans mailing lists, visit: https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists