• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problems  RSS feed

 
Sean Casey
Ranch Hand
Posts: 625
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If I compile a class named fruit in my home directory, it compiles cleanly. If I then try to extend that class in the same directory, I get a compile error saying that class fruit can't be found. This is very frustrating as you can imagine, but I think I'm the culprit. I tinkered with my classpath when I was trying to install the j2ee, and now I'm running into these problems, so I attribute them to the classpath. I could be wrong. Any help would be greatly appreciated.
Thanks.
 
Ganesh Anekar
Ranch Hand
Posts: 36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello,
Set u r classpath pointing to u r current directory(i.e. the directory under which u r compiling the java file)
use this..
set classpath=.;
it will work..
Ganesh
 
Frank Carver
Sheriff
Posts: 6920
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The above post is almost right. On Unix/Linux systems the classpath separator is a colon ( and environment variables are referred to using the dollar-name syntax.
The basic solution is the same though, add the current directory to the classpath either as a relative path (.) or the full absolute path to the directory, if you might want to ue it from somewhere else too.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!