Hi folks can anyone explain me the detailed information about claspaths,working with javac ,java commands the topics that were in tha last chapter of Kathy seria book,please help me out iam unable to solve questions on those topics Thanks in advance
can anyone explain me the detailed information about claspaths,working with javac ,java commands
java and javac see the same classpath; you can set the classpath to the classpath variable from the Control Panel >> System >> Some System Variable setting. You give the folder path where the packages are kept. Most of us programmers place the path of the package directly; that is not true, the address should be, till the last folder where your packages are kept, no "/" also after the folder/directory name. Path must end with the folder name.
While using "javac" or "java" use -cp or -classpath (if the classpath is not in the classpath setting) "say on the fly you want to give the classpath". You must give the path to all the directories which keep the packages referred from your program, if the referenced class does not belong to the package your class belongs, you must include their path to the -cp.
Do some practices with jar and how to use jar, finding the classes required for your class.
Thanks and Regards, cmbhatt
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop