Tuesday, 13 August 2013

how to run the java -cp command

how to run the java -cp command

my current directory is C:/workspace/parent/persistence
I have two jars within persistence in the folder
path(src/main/java/resources/jars)
how do I execute the following command.
java -cp ./Example1.jar;./Example2.jar cm.f.c.h.h.c.CApp -e mypassword
So the folder structure is
work-->parent->persist-->s-->m-->r-->jars-->Example1.jar; Example2.jar
So the work-->parent can be traversed by doing cd parent on work directory
and so on and so forth.
do I give ./jars/Example1.jar or ./s/m/r/jars/Example1.jar neither of the
commands are working, it says jar is not being found.
s, m and r are directories. I tried other ways combinations, but none
working. Kindly help.

No comments:

Post a Comment