File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes Question about packages in Java Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "Question about packages in Java" Watch "Question about packages in Java" New topic
Author

Question about packages in Java

AkumaX AkumaX
Greenhorn

Joined: May 12, 2005
Posts: 2
Hi people.

I'm building a game framework lately, and I'm now trying to put some of my loaders for sound & images as packages in various subdirectories in the source structure of my code. I'm using Java 1.5 update 2 and Netbeans 4.1 as dev tools and I have the following problem: when I put the loader sources as packages (I'm including the 'package ...; statement), the packages seem that they cannot find the GameMain class that is in the root of the project. That points to the matter that the packages have dependancies to the GameMain class (there are some file log classes initiated there, used for the outputting/logging procedures in the loaders). I've put the correct classpath in the 'project properties'of Netbeans 4.1 besides the default settings, but there seems no easy solution for this matter. Also, I couldn't find any help in the net for all these. Any ideas that could help me?

Thanx in advance!

AkumaX
Hentay Duke
Ranch Hand

Joined: Oct 27, 2004
Posts: 198
First the Sheriff round here will make you change your name.

Do you have GameMain in a package? And if so have you imported it into the classes that need it? From what you posted I can't tell, but it sounds like maybe GameMain is in no package. And you didn't mention any import statements.
AkumaX AkumaX
Greenhorn

Joined: May 12, 2005
Posts: 2
Uops, sorry about the name, hope it didn't offend anyone around, now it's corrected to the proper one!

No, I didn't import GameMain in the package, as that's something that has to be changed everytime I'll use the framework and I thought it wouldn't have a meaning to add that too. I'll try your hint and see the results, from what it seems it may work, although I wouldn't want to insert the GameMain in the package as well in the beginning...

Thanks Duke

AkumaX
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Question about packages in Java
 
Similar Threads
NetBeans Structure
Buildpath problem with Eclipse
Can we create a Web Service which will ivoke a standalone java project class?
Package design problem & Javadoc creation error in NetBeans 4.1
Hard to configurate Hibernate using NetBeans 5.5.1