• Post Reply Bookmark Topic Watch Topic
  • New Topic

classpath jar  RSS feed

 
mark smith
Ranch Hand
Posts: 258
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi

i created a program, i run it without problem

after i try to read a database, it's need a driver




when i run the program i get
java -cp jtds-1.2.jar -jar test.jar


jtds-1.2.jar is in the same place then test.jar

i tried

java -cp . -jar test.jar


with the same result

any idea?

thanks
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If you use the -jar option then the -cp option is ignored. You need to specify the classpath in your jar's manifest file.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!