0

I'm trying to run a Java program that calls on the C:\Users\Brandon\Downloads\commons-io-2.4 folder. It compiled fine with this code javac -cp "C:\Users\Brandon\Downloads\commons-io-2.4\*" Login.java but when I tried to run it with this code java -cp C:\Users\Brandon\Downloads\commons-io-2.4\* Login it gave me thiserror: Could not find or load main class Login.class How do I fix this? P.S. The program calls on the FileUtils.

brandon Whe
  • 206
  • 1
  • 14

2 Answers2

0

Try this: java -cp C:\Users\Brandon\Downloads\commons-io-2.4\*;. Login You have to add the current directory to the class path If that doesn't work try java -cp C:\Users\Brandon\Downloads\commons-io-2.4\* -cp . Login

TameHog
  • 950
  • 11
  • 23
0

You need to add the current location as part of classpath.

java -cp .;C:\Users\Brandon\Downloads\commons-io-2.4\* Login

symbol .(dot) is the current path, separated by comma

sendon1982
  • 9,982
  • 61
  • 44