The moose likes Beginning Java and the fly likes problem with custome package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Building Microservices this week in the Design forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "problem with custome package" Watch "problem with custome package" New topic

problem with custome package

billakanti narendra

Joined: Nov 04, 2005
Posts: 1
hi im narendra
im new to java..
i have a problem in importing custome package

the following 2 programs

package wish;
public class hello
public static void call()
System.out.println("Hello World!");


import Wish.*;
public class Wishing
public static void main(String[] args)
it is giving me error cannot access hello
bad class file: .\
file does not contain class hello
Please remove or make sure it appears in the correct subdirectory of the classpa
1 error
[ November 08, 2005: Message edited by: billakanti narendra ]
Ernesto Elias-Nieland
Ranch Hand

Joined: Sep 01, 2005
Posts: 53

Hi Narenda!

Your class hello is in the package wish. So you have to import the package wish.hello in your class Wishing to access the static method call.


0x2B | ~0x2B
SCJD, SCJP 1.5, SCJP 1.4, SCBCD 1.3, SCWCD 1.4, SCJA, IBM Test 150, 142, 700, 701, Oracle Test 1Z0-51
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link:
subject: problem with custome package
jQuery in Action, 3rd edition