javascript
Brief description  about Online courses   join in Online courses
View Jaideep  Subudhi 's Profile

Verification of JDK installation done, running the first program not successful

Installed path is as i checked:
C:\Program Files\Java\jdk1.6.0_16\bin

on cmd i even wrote the command:
set PATH=%PATH%;C:\Program Files\Java\jdk1.6.0_16\bin

but the sampleprogram.java file still cannot be recognised. Please help! I can assure previous steps are done perfectly.
Asked by Jaideep Subudhi | May 9, 2012 |  Reply now
Replies (4)
View kevin mccormack 's Profile
Hi.
Check that your class name and .java file names are correct.
May 13, 2012
View ranjeet kumar singh 's Profile
Hi Jaideep,

I tried running your program in my computer and it worked as expected. So, the issue may be due to improper installation of the Java in your computer.(which can be checked if the javac.exe file is present under the Java folder in your computer) Try re installaing the application.
Secondly, if you are using a 64 bit version of the operating system then the installation path of java would be Program Files (x86) instead of Program Files.

Please inform me about the status so that we can try some other alternatives if it doesn't work.

Regards,
Ranjeet.
May 10, 2012
View jaideep subudhi 's Profile
The program is:
class SampleProgramme {

public static void main (String[] args) {

System.out.println("This is my first Java programme !!");

}

}

The error in cmd is:
D:\Java Project Module>javac SampleProgram.java
'javac' is not recognized as an internal or external command,
operable program or batch file.
May 10, 2012
View ranjeet kumar singh 's Profile
Hi Jaideep,

There may be some error in the program. Please paste the entire program alongwith the exact error message that you are getting as a reply to this post so that we can check that for you.

Regards,
Ranjeet.
May 9, 2012