Hi Sathvavathi, Please specify what are you trying to do? Are you trying to compile a .java file? Please paste the exact error what you are having. Javac is command and not a file. If this is the case you should get command not recognized (or something like this).
Hitesh On Mon, Sep 13, 2010 at 4:43 PM, Mihai DINCA <mihai.di...@free.fr> wrote: > Hi Sathvavathi, > > If you use some integrated programming environment like Eclipse or > NetBeans, it takes care about the location of the *javac* compiler. But if > you try to executed it by hand, be sure it is in the PATH. > > For e.g., under Windows, if your JDK is installed in "*C:\Program > Files\myJavaSDK*", probably the *javac.exe* is in "*C:\Program > Files\myJavaSDK\bin*". In this case, do create in the current directory > the file "*setenv.bat*": > > *> notepad setenv.bat > * > > with the following content: > > *SET JAVAHOME=C:\Program Files\myJavaSDK > SET PATH="%JAVAHOME%\bin";%PATH%* > > (please notice the double quotes " - mandatory if your JAVAHOME contains > any white space). > > Then execute first *setenv.bat*: > > *> setenv* > > and compile using javac only after. > > The same thing applies if you are trying to compile on GNU Linux or Unix. > Let's say that your *javac* compiler is in "*/usr/local/java files/bin*". > In this case, do create in the current directory the file "*sentenv.sh*": > > *> kate setenv.sh > * > > (your currently installed editor must be different from *kate*) with the > following content: > > *export JAVAHOME=/usr/local/java\ files* > *export PATH=$JAVAHOME/bin:$PATH* > > (there is no quote, but exotic characters, such as the space, must be > preceded by the escape character "*\*"; other differences: the separator > character in the PATH is the colon "*:*" instead of the semicolon "*;*" > and the environment variables are prefixed by "*$*" instead of being > surrounded by "*%*"). > > Then execute first *setenv.sh*: > > *> chmod a+x setenv.sh > > ./setenv.sh* > > and compile using javac only after. > > Hope it helps > Mihai > > Le 13/09/2010 09:27, Sathyavathi Sekar a écrit : > > > > --- On *Sun, 9/12/10, Sathyavathi Sekar > <sathyavathi_sr...@yahoo.com><sathyavathi_sr...@yahoo.com> > * wrote: > > > From: Sathyavathi Sekar > <sathyavathi_sr...@yahoo.com><sathyavathi_sr...@yahoo.com> > Subject: > To: javaprogrammingwithpassion@googlegroups.com > Date: Sunday, September 12, 2010, 10:25 PM > > hi i am new to java programming .in the command prompt,i am getting > error as javac file cannot be found or the or thesystem cannot find the path > specified. what should i do? > > > -- > To post to this group, send email to > javaprogrammingwithpassion@googlegroups.com > To unsubscribe from this group, send email to > javaprogrammingwithpassion+unsubscr...@googlegroups.com > For more options, visit this group at > http://groups.google.com/group/javaprogrammingwithpassion?hl=en > > -- > To post to this group, send email to > javaprogrammingwithpassion@googlegroups.com > To unsubscribe from this group, send email to > javaprogrammingwithpassion+unsubscr...@googlegroups.com<javaprogrammingwithpassion%2bunsubscr...@googlegroups.com> > For more options, visit this group at > http://groups.google.com/group/javaprogrammingwithpassion?hl=en > -- To post to this group, send email to javaprogrammingwithpassion@googlegroups.com To unsubscribe from this group, send email to javaprogrammingwithpassion+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/javaprogrammingwithpassion?hl=en