I'm fairly new to IntelliJ and I have tried making a hello world program in some other directory other than ~/IdeaProject. When I did so although my code is correct it gives me ClassNotFoundException. But when I copy the files into ~/IdeaProject and open the project from that directory, I can run it just fine and it isn't from my code since I tried different ones and I already uninstalled and installed IntelliJ and still got the same result anybody can tell me why? Any help is greatly appreciated!
Update: I can run my codes fine in all directories except a directory called: /Course Material/Week 2/Web Server: Reflection/ I can also run my program from command line in that directory and it works fine I suppose the problem is with IntelliJ.
~/U/S/I/C/W/W/untitled folder> ls out/ src/ untitled folder.iml ~/U/S/I/C/W/W/untitled folder> cd src/com/company/ ~/U/S/I/C/W/W/u/s/c/company> ls Main.java ~/U/S/I/C/W/W/u/s/c/company> javac Main.java ~/U/S/I/C/W/W/u/s/c/company> cd ../.. ~/U/S/I/C/W/W/u/src [1]> java com.company.Main write your code here Does anybody have any idea why?
src/main/java?:in the path creates a problem for this or that tool.