If I have one directory, which has 100 jar file. Say, C:\doc\ has 100 jar.I want to use them all.in theory( Java command guide) , when i use java command to execuate A.classi can use :java -classpath ".;C:\doc"  A
or 
java -cp "C:\doc\*.*" A
or 
java -cp "C:\doc\" Aor java -cp "C:\doc\*.jar" AI tried all of thees, fail.also i try to add these jar file into classpath in the sysem, using "C:\doc\*.jar". failwho konws this ? Quick question.

解决方案 »

  1.   

    if you add all the .jar files into the classpath,you can run the program as:
    java -classpath A
    that is OK,I think,you can just try it.
      

  2.   

    Hehe, man, It does not make sense at all.there are 100 jar file, how can I add them all to classpath? ONe by one? or just by directory ?It does not work when u add something like this:\*.*; \*jar; or \U never try it , do u ? I have tried, it does not work. My current solution is to add them explicitly one by one.
      

  3.   

    you are right,i didn't try it,
    In fact,a program or a project don't need so many .jar files,isn't it?
    In the Jbuilder IDE or Eclipse,you can just add the .jar files you needed in the project,
    I think that is OK.it just a suggestion for you,because we use the command line very few.