Computers & Internet Logo
Posted on Feb 28, 2009
Answered by a Fixya Expert

Trustworthy Expert Solutions

At Fixya.com, our trusted experts are meticulously vetted and possess extensive experience in their respective fields. Backed by a community of knowledgeable professionals, our platform ensures that the solutions provided are thoroughly researched and validated.

View Our Top Experts

Error to compile java program

When i comile the program using syntex ''javac filename.java'' 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.

3 Answers

Anonymous

Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Governor:

An expert whose answer got voted for 20 times.

Scholar:

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

  • Expert 136 Answers
  • Posted on Jun 23, 2009
Anonymous
Expert
Level 2:

An expert who has achieved level 2 by getting 100 points

MVP:

An expert that got 5 achievements.

Governor:

An expert whose answer got voted for 20 times.

Scholar:

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

Joined: Jun 22, 2009
Answers
136
Questions
0
Helped
132401
Points
347

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

dhnguyen

Level 2:

An expert who has achieved level 2 by getting 100 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Sergeant:

An expert that has over 500 points.

  • Expert 281 Answers
  • Posted on Jan 30, 2015
dhnguyen
Expert
Level 2:

An expert who has achieved level 2 by getting 100 points

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Sergeant:

An expert that has over 500 points.

Joined: Oct 25, 2007
Answers
281
Questions
1
Helped
79767
Points
819

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

ex.

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

Ad

Anonymous

Level 1:

An expert who has achieved level 1.

  • Contributor 1 Answer
  • Posted on Mar 02, 2009
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

Joined: Mar 02, 2009
Answers
1
Questions
0
Helped
269
Points
1

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

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

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

×

Loading...
Loading...

279 views

Ask a Question

Usually answered in minutes!

Top Sun Computers & Internet Experts

Rob Hill
Rob Hill

Level 3 Expert

1483 Answers

Narseman

Level 3 Expert

1092 Answers

Brad Brown

Level 3 Expert

19190 Answers

Are you a Sun Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...