Author Topic: syntax to add all .jar files in dir to debug script  (Read 3418 times)

edb

  • EA Novice
  • *
  • Posts: 4
  • Karma: +0/-0
    • View Profile
syntax to add all .jar files in dir to debug script
« on: December 26, 2023, 07:31:28 am »
I'm trying to debug (and ultimately record) a Java 11 application. The application uses gradle to build a shadowJar. I'm able to debug the
app using IntelliJ and the fat jar - but when I switch to EA to debug via launching the bootstrap class - the application exits about 90% of
the way through initialisation. I suspect that it's missing 3rd party libs - but the logs are not showing exactly what.

I have a script with the following VM Options:
Code: [Select]
jre=%JAVA_JDK2%\server,XX:+LogVMOutput,-Xlog: all=info:sparx-vm-logging-errors.log, -XX: Initial RAMPercentage=50,-
XX: MaxRAMPercentage=75,-Djetty.port=9999,-Dhazelcast.client.config=%SERVICES_ROOT%\config_test\hazelcast_test.xml,-
Djava.util.logging.ConsoleHandler.level=FINE,-Dfile.encoding=UTF8,-
Djava.class.path=%SERVICES_ROOT%\src\;%SERVICES_ROOT%\build\classes\java\main\;%SERVICES_ROOT%\config_test;%SERVICES
2.0.jar;%SERVICES_ROOT%\lib\commons-cli-1.2.jar;%SERVICES_ROOT%\lib\jackson-core-asl-1.9.13.jar;%SERVICES_ROOT%\lib\jetty-
|_ROOT%\lib;%SERVICES_ROOT%\lib\aws-java-sdk-1.6.12.jar;%SERVICES_ROOT%\lib\commons-configuration2-
io-8.1.10.v20130312.jar;%SERVICES_ROOT%\lib\jackson-mapper-asl-1.9.13.jar;%SERVICES_ROOT%\lib\hazelcast-client-
3.12.10.jar;%SERVICES_ROOT%\lib\hazelcast-3.12.10.jar;%SERVICES_ROOT%\lib\logback-core-
1.0.9.jar;%SERVICES_ROOT%\lib\logback-classic-1.0.9.jar;%SERVICES_ROOT%\lib\jetty-all-
8.2.0.v20160908.jar;%SERVICES_ROOT%\lib\slf4j-api-1.7.28.jar;%SERVICES_ROOT%\src\com\xyz\package-info.java;.;

I searched extensively, asked ChatGPT and tried to bruteforce find a syntax to add all .jars in the /lib dir to the classpath (EA throws an
error with an '*' in the path. (Adding all .jars in lib folder results in a error about exceeding 64 entries in classpath)
Has anyone encountered this? Is there an undocumented method in which to do this?
I would be grateful for any assistance
/Ed B.