You can type the address yourself, or copy it from windows explorer. You can copy the location three ways:
-
Right clicking the .java file and going to properties. It should then list the location of the Java file for you.
-
Right clicking the final location in Windows Explorer location bar and clicking "Copy adress as text":
-
Left clicking the location bar anywhere besides a location (whitespace). Look to the red highlighted box in the picture below. It will bring up plain text that you can copy.
But keep in mind that if it's in a library such as Desktop, Documents, etc., the copied address may not work because it's not the raw address in your drive.
For example, it may be copied as "Documents" instead of "C:\Users\Your_User\Documents".
Then type
cd location
into the command line (where location is the location of the file). For example, if your Java file called Test.java is located in the directory: C:\Users\Mike\Documents\Test\Test.java, you will type this into the command line:
cd C:\Users\Mike\Documents\Test
Then hit enter and it should bring you to that location.