|Author: Abhinav 25 Jul 2012 Member Level: Gold Points : 4 (Rs 2) Voting Score: 0|
To change the current directory in command prompt, you need to type CD directory name. i.e.
C:\> CD Windows it will move to
Note: you can also use asterisk sign to complete a directory name. i.e.
C:\> CD Win* it will move to
In case you want to change drive and directory both then use CD /D Drive name:\Directory name i.e.
E:\> CD /D C:\win* will change to
|Author: Sabrez Alam 26 Jul 2012 Member Level: Gold Points : 4 (Rs 2) Voting Score: 0|
By default when you open command prompt it will take you to c drive. Am I right?
Just right the above command and you will be shifted to D drive. Now you have to lacate your folder. Let assume you have a folder name called java.
Write the above command and hit enter. This will take you to the java folder looks like below.
To come out from the folder you need to give the following command:
D:\java>cd.. and hit enter.
To use java in command mode you need to set the path by using setpath command of java then javac to compile the program and then java to run the java program.
|Author: Adi 28 Jul 2012 Member Level: Silver Points : 4 (Rs 1) Voting Score: 0|
1.)A simple way just copy the complete path of the bin directory.
2.)Open command prompt type 'cd' without the quotes.
3.)Give a space.
4.)Right click and from the menu click paste.
5.)Hit ENTER key,You will enter in the directory.
Copy your programs to the bin folder of jdk.
For compiling the java program use the command "javac FILE_NAME",there should be space between javac and your file name. FILE_NAME indicates name of your file with .java extension.
After you compile the program a class file is generated.For running the program use the command "java FILE_NAME" here FILE_NAME can be without extension.
Example:- javac hello.java (for compilation)
java hello (for execution)
|Author: arvind 03 Aug 2012 Member Level: Bronze Points : 1 Voting Score: 0|
you can use either