I have a folder with lots of jar files and a classpath:
-classpath ./classes:./jogamp-all-platforms/jar/*
But it doesn't find the package. Just to make sure that I have the resource in question I manually find the jar that contains it and change the classpath to:
-classpath ./classes:./jogamp-all-platforms/jar/jogl-all.jar
And now it isn't complaining about not finding a package.
Under Debian I had to put quotations marks just around the wildcard for this to work: "*"
Then the compile command becomes:
javac -cp ~/my\ stuff/Java/"*" test.java
I'm using JDK, JRE 8.
I think you need to use ;
as path separator after ./classes
as below:
-classpath ./classes;./jogamp-all-platforms/jar/*
Also please note:
Subdirectories are not searched recursively. For example, jogamp-all-platforms/jar/* looks for JAR/Class files only in jogamp-all-platforms/jar, not in jogamp-all-platforms/jar/abcd, jogamp-all-platforms/jar/efc, etc.
By doing -classpath ./classes:./jogamp-all-platforms/jar/*
, it looks of all the JARs in jogamp-all-platforms/jar
folder only.
For more details, please refer the documentation here- Wildcards in classpath.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With