• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Junilu Lacar
  • Liutauras Vilda
Sheriffs:
  • Paul Clapham
  • Jeanne Boyarsky
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Piet Souris
  • Carey Brown
Bartenders:
  • Jesse Duncan
  • Frits Walraven
  • 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
 
pie. tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic