I exported my source code to a jar file and moved it to a folder under the cdrive. I can execute the jar on the cmd line by typing name.jar. I can execute the jar specifying java and the classpath. However at no time can I execute AND pass an argument.
I know the syntax is java [-options] -jar Name.jar [args...] but when I add the [args...] to the working syntax I receive the following error:
C:\MQCLient_TM>java -cp C:\ProgramFiles\IBM\WebSphereMQ\Java\lib;C:\Oracle9.2 -jar c:\MQClient_TM\LCDirectory.jar [kim] Exception in thread "main" java.lang.NoClassDefFoundError: com/ibm/mq/MQExceptio n at net.LCDirectory.EY_LCDirectory.main(EY_LCD irectory.java:31)
Sorry for the wrapping. Again if I leave off [kim] the line executes but not what I need for my pgm.
Please advise how to execute jar and pass parameter when [args...] not working.