How to include all JAR files from a folder in Java classpath?
Hello everyone! I'm a beginner Java developer, writing a small console application using Apache Commons and Gson libraries. I have a `lib` folder containing all JAR files: `commons-lang3-3.12.0.jar`, `gson-2.8.9.jar`, and a few others.
When I compile the project manually via command line, I specify each JAR separately:
```bash
javac -cp ".;lib/commons-lang3-3.12.0.jar;lib/gson-2.8.9.jar" MyApp.java
```
But this is terribly inconvenient: if I add a new library, I have to rewrite the command. I've heard that in Java 6+ you can use wildcard `*`, but it doesn't work for me. I tried this:
```bash
javac -cp ".;lib/*" MyApp.java
```
The compiler gives an error that it cannot find classes from the JAR files. What's the problem? How do I correctly specify the classpath to automatically