• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

unable to set PATH variable

 
karthik s shetty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
after setting the PATH variable i tried running the HelloWorldApp.java file in the cmd...but it said javac is not a recognised internal or external command. i think i didnt set the PATH variable correctly could someone please help me out by giving me instructions from scratch...please!!
[ April 15, 2007: Message edited by: karthik s shetty ]
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15278
39
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
- What exactly did you set your PATH environment variable to and where exactly is your JDK installed?
- Did you close and open the command window after setting the PATH variable?

The installation instructions for the JDK explain how to set the PATH variable for different versions of windows - look it up there.
[ April 15, 2007: Message edited by: Jesper Young ]
 
karthik s shetty
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Jesper Young:
- What exactly did you set your PATH environment variable to and where exactly is your JDK installed?
- Did you close and open the command window after setting the PATH variable?

The installation instructions for the JDK explain how to set the PATH variable for different versions of windows - look it up there.

[ April 15, 2007: Message edited by: Jesper Young ]


my jdk is installed in c:\programfiles\java and under that there were 4 versions but i wanted to use hava1.5 and so i set my PATH variable to c:\programfiles\java\jre1.5.0_01\bin
and am on windows xp
 
Srikanth Ramu
Ranch Hand
Posts: 76
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I understand that you've set jre in your path. JRE is Java Runtime Environment which does not have "javac" compiler. You got to set JDK in your path.
 
Lucky J Verma
Ranch Hand
Posts: 278
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi,

suppose your java is installed on c:\,
1 you should set classpath to point where javac is lying on commmand line ::
set classpath=.;c:\java\bin ;
you can see the classpath variable contents
2.Then go to same directory on command line , c:\java\bin ,
type javac .If its accepting ,its done else some error in setting classpath.

See if this helps .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic