• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Question about packages in Java

 
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Ranch Hand
Posts: 198
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Posts: 2
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Slideshow boring ... losing consciousness ... just gonna take a quick nap on this tiny ad ...
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic