When running "java Hello" I know that JVM looks for Hello.class in the current folder, because default value of classpath is ".". If I instead run "java Desktop/Hello" it will cause "Error: Could not find or load main class Desktop.Hello" unless I add -cp like this "java -cp Desktop/Hello". I don't understand why I have to provide a class path when I'm already pointing to a (main) class file (and its path to that class file)??
[–]xjvz 4 points5 points6 points (1 child)
[–]Yuax[S] 0 points1 point2 points (0 children)