Home Answers Viewqa Java-Beginners simle pacakge issues :( fade up of mine)

 
 


Bipra Banerjee
simle pacakge issues :( fade up of mine)
0 Answer(s)      8 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.

View Answers









Related Pages:
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
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

Ask Questions?

If you are facing any programming issue, such as compilation errors or not able to find the code you are looking for.

Ask your questions, our development team will try to give answers to your questions.