Bipra Banerjee
simle pacakge issues :( fade up of mine)
0 Answer(s)      2 years and 7 months ago
Posted in : Java Beginners

Using folder: /home/bira/Javanew CLASSPATH= . (using ubuntu linux)

created under /home/bira/Javanew package base;

public class Base { public void show() { System.out.println("Base function's show"); }
}

Comiled the above using : javac -d . Base.java

below created under /home/bira/Javanew

import base.*;

class Derived { public static void main(String args[]) { Base b = new Base(); b.show(); } }

getting following error:

javac Derived.java Derived.java:8: error: cannot access Base Base b = new Base(); ^ bad source file: ./Base.java file does not contain class Base Please remove or make sure it appears in the correct subdirectory of the sourcepath. 1 error

I know that i have messed up the classpath into something. Please help me..stucked with it for while.

Advertisement
View Answers









Related Tutorials/Questions & Answers:
simle pacakge issues :( fade up of mine)
simle pacakge issues :( fade up of mine)  Using folder: /home/bira/Javanew CLASSPATH= . (using ubuntu linux) created under /home/bira/Javanew.... 1 error I know that i have messed up the classpath into something
simle pacakge issues :( fade up of mine)
simle pacakge issues :( fade up of mine)  Using folder: /home/bira/Javanew CLASSPATH= . (using ubuntu linux) created under /home/bira/Javanew.... 1 error I know that i have messed up the classpath into something
Advertisements
dbms
dbms  **can u please explain how to create a database in simle manner in windows
Jupiter
or download the zipped pacakge and upzipped it into Eclipse plugins directory