• Post Reply Bookmark Topic Watch Topic
  • New Topic

classpath  RSS feed

 
Ranch Hand
Posts: 50
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have saved a class called classA in a package called MyPackage. I am trying to access classA in MyPackage from classB from same MyPackage, but when I am compiling I am getting as classA cannot find symbol. I guess there is some problem with the classpath. How to give a classpath of the classA file when you are compiling?
 
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
About CLASSPATH, you should read this and figure it out :
http://faq.javaranch.com/view?HowToSetTheClasspath

You naming convention is a funny one
Class names usually start with a capital letter and package names with a minuscule. You are doing the opposite You'd better rename them.
 
Ranch Hand
Posts: 77
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
sai.. check out the link sent abv.. it is really good..


but your answer may be this.. you r supposed to set path to the default directory too..

jus go to my computer and set the environmental variables and set path=classpath and value=.;

.(dot) refers to the current working directory.
[ March 31, 2006: Message edited by: vignesh hariharan ]
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!