i had installed Jcreater in my system and i had setted only path variable up to bin directory of my jdk and i had not setted my calss path and java_home but when a compiler needs API of java in lib directory how come the compiler take class files in lib is JCreater is going to be handle or what?
As far as I remember about JCreator, once you have given it the PATH to use when you configure it, it invokes the javac executable in your bin directory and that knows the CLASSPATH. I have never had to set a CLASSPATH when I used JCreator.
I think what you are trying to say is that how does the compiler takes the jars(library files) in the lib folder when you've not set the classpath. Well you don't need to add the lib folder of your JDK to the classpath. The compiler implicitly uses the jars in the jdk lib directory while compiling. JCreator has no role in this...
santhosh.R gowda wrote: Thanks but i had seen so many books all are telling that we need to set path for operating system to search executable tools
Yes, you have to set the path for bin of the JDK which includes executables javac,java etc..
and classpath for the program to search class files...
Yes. Thats for everything other than core java libraries (third party libraries etc..) which are not included in the JDK.
Joined: Apr 06, 2009
Thanks all of you for guiding me .... the isuue has been closed
Joined: Oct 13, 2005
santhosh.R gowda wrote:Thanks all of you for guiding me .... the isuue has been closed
No, it hasn't.
Lots of books tell you about setting a classpath. Lots of people tell you about it too. And lots of them give unhelpful advice. The classpath varies from application to application, so you ought not to set a system-wide classpath, if your Java™ code works all right. Vijatha Kumara has given you the correct advice: you only need to specify a classpath if you are using additional jars, which you will probably not do until you start database programming.
If your Java™ programming has worked well without your setting anything in the classpath, then your classpath settings are correct already and will not need to be changed. If you start getting problems about ClassDefNotFound, it is worth checking the system classpath. If it doesn't contain . for "current directory" somewhere, add .; (Windows systems) or .: (Unix Linux or Mac computers) at the beginning of the classpath.