3 Replies Latest reply on Oct 31, 2012 5:18 PM by user8742475

    Wildcard for classpath

      I have all my jar files under a directory and I tried the below syntaxes in the classpath section but it won't work. Can we wildcard in classpath?

      I tried different syntaxes as below but no luck





        • 1. Re: Wildcard for classpath
          Mohammed Rayan-Oracle
          You can do it by copying all the name of the jars in a file and calling that file using the syntax in your program: -classpath @pathname\filename

          Note:Windows OS has a Classpath Length Limitation: Win32 systems have a 2K limitation on the length of the command line. If the classpath setting for the Windows service startup is very long, the 2K limitation could be exceeded.

          For example:

          -classpath *@c:\myClasspath.txt* -Dweblogic.Name=%SERVER_NAME% -Dbea.home=\"D:\bea_70sp2\" -Dweblogic.management.username=%WLS_USER% -Dweblogic.management.server=\"%ADMIN_URL%\" -Dweblogic.ProductionModeEnabled=%STARTMODE% -Djava.security.policy=\"%WL_HOME%\server\lib\weblogic.policy\" weblogic.Server"

          Refer the section " Adding Classes to the Classpath" in the below link
          • 2. Re: Wildcard for classpath
            Thanks. Yeah, I'm using WLS 10.3.5 on Windows. I did not know about the 2K limitation regarding the command line.

            I need to count the classpath string to see how long it is but it looks very long.
            • 3. Re: Wildcard for classpath
              I put it in the classpath section of the Server Start tab in the Weblogic Administration Console for my server as below


              but it failed to start up

              Any ideas?

              Also what is the correct format to specify all the jar files in a directory please?