0

In this jars folder, I am having multiple jars. How to set classpath to all of these jars?

C:/users/jars/***
  • are you using eclipse? – Nadendla Jul 04 '14 at 13:49
  • I need to give it in command line itself. –  Jul 04 '14 at 13:51
  • You do it as it is has been documented for a long time now. http://docs.oracle.com/javase/6/docs/technotes/tools/windows/classpath.html . Look for 'Understanding class path wildcards'. Also look in the related items on the right side of this question. – Gimby Jul 04 '14 at 13:51
  • try http://stackoverflow.com/a/219801/1629362 answer – bitkot Jul 04 '14 at 13:53
  • What is this mean? in the above questions... java -cp "Test.jar;lib/*" my.package.MainClass –  Jul 04 '14 at 14:01
  • @Seelenvirtuose: You don't have sense? Put the answer for my quiestion first and edit my question to say like already have an answer –  Jul 04 '14 at 14:16
  • What exactly do you think is different to this possible duplicate? For me it seems that it's totally the same. Thus, you shouldn't have asked this question as a simple search would have revealed the answer. – Seelenvirtuose Jul 04 '14 at 18:28
  • That is not the correct answer i m looking for . –  Jul 07 '14 at 05:13

1 Answers1

0

You can add this directory to classpath

java -cp C:/users/jars/* MAIN_CLASS_NAME

you can also use -classpath instead of -cp

Keerthivasan
  • 12,040
  • 2
  • 26
  • 49