Classpath 4082 char limit and jars directories not classloading
Miguel Ruiz Velasco Sobrino <[email protected]> Fri, 7 Mar 2025 12:43:40 -0600
| Newsgroups | gmane.comp.jakarta.commons.user |
|---|---|
| Organization | FCM Computación Mexicana |
| Message-ID | <[email protected]> |
Hi, While using Apache Commons Daemon 1.3.4 (on Windows 7) in JVM mode to lauch an spring boot application, I found the following 2 issues: #1 only finds the classes if the jars at Classpath are located at StartPath directory (a very workarround-able issue). #2 Also classpath has a 4082 (undocumented) char limit (harder problem with springboot that adds lots of transitive (potentially unused) dependencies), had luck this time with 122 jars. What options do I have to solve this? (specially #2). Please find below evidence of * All .jar in the StartPath directory (works): prunsrv.exe //IS//cfdifacturar --Classpath=* ... --StartPath=%BASE% --StartMode=jvm --> [2025-03-06 13:41:53] [debug] ( javajni.c:822 :apxJavaInitialize ) [12892] JVM Option[1] -Djava.class.path=camel-api-4.10.0.jar;...;spring-tx-5.3.31.jar;txw2-2.3.9.jar * Jars inside directory under --StartPath (does Not work) prunsrv.exe //IS//cfdifacturar --Classpath=file-integration-0.0.1-SNAPSHOT.jar;i\* --StartPath=%BASE% --StartMode=jvm --> [2025-03-07 10:59:57] [debug] ( javajni.c:822 :apxJavaInitialize ) [11108] JVM Option[1] -Djava.class.path=file-integration-0.0.1-SNAPSHOT.jar;i\camel-api-4.10.0.jar;i\camel-attachments-4.10.0.jar; ... ;i\spring-expression-5.3.31.jar;i\spring-jcl-5.3.31.jar;i\spring-tx-5.3.31.jar;i\txw2-2.3.9.jar It does not find any jar in directory (i/) * This truncates the classpath to 4082 chars (even does not find any jar): prunsrv.exe //IS//cfdifacturar --Classpath=file-integration-0.0.1-SNAPSHOT.jar;i\* ... --StartPath=%BASE% --StartMode=jvm --> --> [2025-03-07 10:55:12] [debug] ( javajni.c:822 :apxJavaInitialize ) [10772] JVM Option[1] -Djava.class.path=file-integration-0.0.1-SNAPSHOT.jar;import_lib\camel-api-4.10.0.jar;import_lib\camel-attachments-4.10.0.jar; ... ;import_lib\spring-boot-starter-2.7.18.j prunsrv.exe //IS//cfdifacturar --Classpath=file-%BASE%\file-integration-0.0.1-SNAPSHOT.jar;%BASE%\import_lib\* ... --StartPath=%BASE% --StartMode=jvm --> --> [2025-03-07 10:42:25] [debug] ( javajni.c:822 :apxJavaInitialize ) [ 5664] JVM Option[1] -Djava.class.path=file-C:\eclipsework\abis-oracle\file-integration\target\file-integration-0.0.1-SNAPSHOT.jar;C:\eclipsework\abis-oracle\file-integration\target\import_lib\camel-api-4.10.0.jar; ... ;C:\eclipsework\abis-oracle\file-integra Thanks for any pointer on the above issues. Regards, -- Miguel Ruiz Velasco Sobrino FCM Computación Mexicana