• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

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
 
That feels good. Thanks. Here's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic