Results 1 to 6 of 6
Thread: Wordpad help.
- 07-30-2008, 11:46 AM #1
Member
- Join Date
- Jul 2008
- Posts
- 7
- Rep Power
- 0
- 07-30-2008, 11:56 AM #2
go to the command prompt :
c:\yourdirectory>javac YourFile.java
to compile
c:\yourdirectory>java -cp YourFile
to run
- 07-30-2008, 12:12 PM #3
Member
- Join Date
- Jul 2008
- Posts
- 7
- Rep Power
- 0
I type in:
c:\users\duran\desktop\javac payroll.java
I get: is not recognized as an internal or external command and, operable program or bath file.
What am i doing wrong?
- 07-30-2008, 12:16 PM #4
You have to set the path variable in your enviroment var
set it to
c:\your jdk directory \bin
- 07-30-2008, 12:26 PM #5
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18
Here are the steps you have to follow.
- Save the file, file name should be same as your class name
- Open the command prompt and change the working directory to the java file saved location
- Set the Java class path to that folder
- Simply type the following command.
Java Code:path=C:\Program Files\Java\jdk1.6.0_07\bin
- Then compile the file as follows
Java Code:javac file_name.java
- Then run the file as follows
Java Code:java file_name
- 07-30-2008, 12:28 PM #6
- Join Date
- Jul 2007
- Location
- Colombo, Sri Lanka
- Posts
- 11,374
- Blog Entries
- 1
- Rep Power
- 18


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks