0

Ok, I'm done with it.

Trying to run java files via command line.(Never worked with command line before, everything was done in Eclipse). I've already read several stackoverflow answers on this topic, oracle documentation concearning classpath. And I still have no idea, what should be the CLASSPATH folder.

Somebody, please, explain me: how the CLASSPATH path should look like if I have my .java file in D:\javaWorkspace\projectFolder1\src\File1.java? And what if I want to run .java file from D:\javaWorkspace\projectFolder2\src\File2.java?

I've already tried 'javac absolutePathToFile/File.java' and it worked. But it's too complicated. And it didn't work when I tried to run compiled file like 'java absolutePathToFile/File'.

For now the value of CLASSPATH variable is '.;C:\Java\jdk1.8.0_51\lib' What I want is just to input 'javac File.java' or 'java File' in command line.

Dmitry Klimov
  • 131
  • 2
  • 4
  • 10

0 Answers0