• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Devaka Cooray
  • Ron McLeod
  • Jeanne Boyarsky
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Junilu Lacar
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Martijn Verburg
  • Frits Walraven
  • Himai Minh

Doubt

 
Ranch Hand
Posts: 125
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 1710
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


can anyone explain me the detailed information about claspaths,working with javac ,java commands



Hi Pulukuri,

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
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic