Question about Sun Java Programming Language (cdj-275)

3 Answers

Error to compile java program

When i comile the program using syntex ''javac'' in Dos
a message display on screen- 'JAVAC' is not recognized is as an internal or external command, operable program or batch file.

Please give me solution.

Posted by on

3 Answers

  • Level 2:

    An expert who has achieved level 2 by getting 100 points


    An expert that got 5 achievements.


    An expert whose answer got voted for 20 times.


    An expert who has written 20 answers of more than 400 characters.

  • Expert
  • 136 Answers

The main cause of this error is you havent set the environment variables correctly, you can do it as follows

Right click on "My Computers" select properties the click "Environment variables" then under "User variables for pcname"

select new and add the following paths

1)var name:path
var value:C:\Java\jdk1.5\bin

2)var name:classpath
var value:C:\YourJavaCodeDirName

click ok and its done

Posted on Jun 23, 2009

  • Level 2:

    An expert who has achieved level 2 by getting 100 points


    An expert that got 5 achievements.


    An expert who has written 20 answers of more than 400 characters.

    New Friend:

    An expert that has 1 follower.

  • Expert
  • 155 Answers

First off I assume you actually installed a JDK already before trying to compile the code. If not then you need to do that.

Secondly this error is because Windows cannot find the javac executable on your command. It could be because the JDK is missing or not installed or that Windows does not know where to look to find javac.exe from. You can simply run javac with the full path instead


"C:\Program Files (x86)\Java\jdk1.7\bin\javac"

Posted on Jan 30, 2015

  • Level 1:

    An expert who has achieved level 1.

  • Contributor
  • 1 Answer

U c dat u had given a proper path
C:\path=path of ur file

Posted on Mar 02, 2009

Add Your Answer

Uploading: 0%


Complete. Click "Add" to insert your video. Add



Related Questions:

1 Answer

Visual c++ runtime library runtime error!

then ur computer is running without latest Microsoft c++ redistributed version. Do a windows update.

Feb 09, 2013 | NaviCoder IDE for Java

1 Answer

Write a Java application that finds a. Area and perimeter of rectangle. b. Area and circumference of a circle.Display explanatory text with the value

Did you find a solution for this ?

You haven't received any help because the request looks a lot like a homework assignment and a lot of people are unwilling to do that.

I have some suggestions:

1) You should make sure that you have a working copy of Java. Start at the Java Tutorial:

If you do not have a working Java on your machine, follow the link at the top right of that screen to 'Download JDK'. That is the set of programming tools you need to use to compile and run programs.

The Installation Instructions will tell you everything you wish to know. I suggest that you use: to type in programs.

Good luck. Post more on the problem page for more help.

Sep 22, 2012 | Sun Java Programming Language (cdj-275)

1 Answer

Problems changing variables on windows 7 for Java jdk1.7.0. I have no path variable any ideas thankyou

If your trying to add javac.exe to your path variable do the following
  • Right Click Computer
  • Select Properties
  • On the left select Advanced System Settings
  • Select Environment Variables
  • Under System Variables scroll down to Path
  • Append the path and exe to the Path variable
If memory serves javac.exe is located in C:\Windows\System32 so append ;C:\Windows\System32\javac.exe

Comment if you need more help

Sep 13, 2011 | Sun Compilers & Programming Tools

1 Answer

Java Vitual Machine Launcher prompts this message "Could not find the main class. Program will exit" How can I solve this problem? I need urgent assistance.

You need to compile the .java file you have, and run the .class file that is produced.
Open up command prompt, go to your working directory. If your file was called In command prompt type "javac". Now, in the working directory, you will see a new file, Hello.class. Run that file by "java Hello.class". Hope this helps!
Thanks for using FixYa

Aug 20, 2011 | Sun Java Programming Language (cdj-275)

4 Answers

Java is not working

Hello there :
first you are going to want to ensure that your your current version of java is installed correctly and is not corrupted and if it needs to be reinstalled
download the latest java version and reinstall this .
this should be able to take care of the problem that you are having ok?
best regards michael

Aug 23, 2009 | ArcMedia JavaScript Source Code 3000 Pro...

1 Answer

I have a project in Java which i want to execute..Can somebody help me out in that

install JDK as well as JRE on the system .
copy the project and paste in the BIN of jdk.
you can install any update of JDK as well as JRE.
  1. open command prompt
  2. specify path of file in jdk in command prompt.
  3. type javac <file name>
  4. hit enter.
  5. type java <file name>
this will run your project on any system on which you want to run your project by performing above steps.

Apr 22, 2009 | Compilers & Programming Tools

4 Answers

Can anyone tell how run java program in cmd prompt???


You need to type:

If it's a program.class

java program

or of it's a program.jar

java -jar program.jar


Apr 03, 2009 | Sun Java Programming Language (cdj-275)

2 Answers

How to run java code in cmd prompt...

javac to compile and java filename to execute

Mar 21, 2009 | Compilers & Programming Tools

1 Answer

Cannot install/uninstall Java

It is not necessary to install java in order to use java.
Just download java highest version, copy and paste the java software in the system drive(eg C:,D:,....), Then set path the java file.
Example, if you have the java file in your C drive, do the following steps

1. Goto start->Run-> type command. Command prompt(black screen) will open.
2. if it shows as C:> follow the steps, else Goto step 6.
3. set path="c:\Java file name"
4. type javac
5.after typing if u find compiler then Java is installed in your system.
6. Example... if it shows as F:> and if u have saved your file in C:, do the following.
7. cd..
8. cd..
9. cd C
10 .then it appears as C:>, follow from the step 3.

thank you.

May 07, 2008 | ArcMedia JavaScript Source Code 3000 Pro...

Not finding what you are looking for?
Compilers & Programming Tools Logo

243 people viewed this question

Ask a Question

Usually answered in minutes!

Top Sun Compilers & Programming Tools Experts

Robin Hill
Robin Hill

Level 3 Expert

1251 Answers

Les Dickinson
Les Dickinson

Level 3 Expert

18299 Answers


Level 3 Expert

2072 Answers

Are you a Sun Compiler and Programming Tool Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides