You should use:
System.out.println(System.getProperty("user.dir")) ;
Thanks, that works.
Leprechaun, I think you worked on a Java IDE. Because almost all IDEs prompt that error. You can get an idea why it is wrong just looking at the error message.
I did see that but didn't know what to do. It said it didn't recognize the symbol which is why I thought I might need to import something. I'll be sure to always check that before posting errors I can't solve in my code.