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?
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.
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...
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop