I've been working on porting a Java application from a Solaris Server to a Windows Server. I've finally gotten the calling scripts rewritten to supply the java launch command all of the appropriate information (I think). However, I continue to get
Could not find the main class: com.dir1.dir2.dir3.dir4.ManagementAgent. Program will exit.
This path and file do exist in one of the jar files (the first in the CLASSPATH) and it resides in the path shown (e.g. the absolute path to the class file if the jar were expanded would be c:\apps\ecs\bin\com\dir1\dir2\dir3\dir4\ManagementAgent.class
)
I've been following the directions from this Q&A but continue to receive the error.
Obviously I've not fixed something but I can figure out what that might be.
%JAVA_HOME%\bin\javaw.exe -Xms512m -Xmx1024m -cp .\ecs.jar;.\ect.jar;.\jmxri.jar;.\jmxtools.jar;.\log4j.jar;.\xercesImp.jar;.\xalan.jar;.\weblogic81.jar;.\classes12_9i.zip;.\localEJB.jar;.\tct_ip1.1.jar com.dir1.dir2.dir3.dir4.ManagementAgent
I execute the command from the directory which contains all of the jars. I've tried several variations of the CLASSPATH (shown below):
- Relative paths; generically calling jars & class (e.g.
.\*;.
) - Absolute path, generically calling jars & class (e.g.
c:\apps\ecs\bin\*;c:\apps\ecs\bin
) - Relative paths, explicitly calling jars (shown above)
- Absolute paths, explicitly calling jars (how it was executed on Solaris Server)
But no combination seems to work.