• Post Reply Bookmark Topic Watch Topic
  • New Topic

CLASSPATH - Environment Variable  RSS feed

 
Omkar Shetkar
Ranch Hand
Posts: 100
2
Eclipse IDE Java Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

How to set the CLASSPATH variable for the packages I create in some drive of my system.

Eg., I create a package in D:\Java Practice\pkg1 .
pkg1 consists of Parent and Child classes in different files. Here Child class inherits Parent class. But when I compile the Child class the error
I am getting is
Unrecognized symbol, Parent.
I suppose the problem with the CLASSPATH environment variable. Can anybody help me in this regard?

Thanks
Omkar V S
 
Joanne Neal
Rancher
Posts: 3742
16
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You need to include D:\Java Practice in your classpath, but don't use the CLASSPATH environment variable. Use the -classpath option.
e.g.
javac -classpath "D:\Java Practice" pkg1/Child.java
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!