Hi again.
Ok so I have been developing a zelda clone. It works beautifully. I just want to clean up and organize my project folder. I started with everything in the same folder. To begin organizing, I put everything I haves as text data files in folders. Now I have maps, images, scripts, saves, and dialogs folders, and edited my game code to load/save everything to the appropriate folders.
Where I'm stumped is I have a lot of tools, ex. ImageTools.java, IOOperations.java, and TileSet.java to name a few. I also have a million game objects, for ex. gameProp.java, GameEnemy.java, and GameNPC.java to name a few. What I would like to do is put all the tools in a Tools folder and all the objects in an Objects folder.
I tried so far by adding "package ImageTools;" for example to the top of each tool, using the tool's name
I then placed every tool into the Tools folder and javac'ed everything, and this was the result.
I also added import Tools.*;
I then tried import Tools.toolName.*;
Further down I was trying to put everything into separate folders within the Tools folder.
this has been edited for an easier read.
C:\JSource\MyGame>javac MapMaker.java MapMaker.java:36: cannot access Tools.IOOperations bad class file: .\Tools\IOOperations.class class file contains wrong class: IOOperations Please remove or make sure it appears in the correct subdirectory of the classpath. private IOOperations ioObject; ^ C:\JSource\MyGame>javac MapMaker.java MapMaker.java:36: cannot access Tools.IOOperations bad class file: .\Tools\IOOperations.class class file contains wrong class: IOOperations Please remove or make sure it appears in the correct subdirectory of the classpath. private IOOperations ioObject; ^ C:\JSource\MyGame>javac MapMaker.java MapMaker.java:15: package Tools.WindowCloser does not exist import Tools.WindowCloser.*; ^ MapMaker.java:40: cannot access Tools.IOOperations.IOOperations bad class file: .\Tools\IOOperations\IOOperations.java file does not contain class Tools.IOOperations.IOOperations Please remove or make sure it appears in the correct subdirectory of the classpath. private IOOperations ioObject; ^ C:\JSource\MyGame>javac MapMaker.java MapMaker.java:15: package Tools.WindowCloser does not exist import Tools.WindowCloser.*; ^ MapMaker.java:40: cannot find symbol symbol : class IOOperations location: package Tools private Tools.IOOperations ioObject; ^ MapMaker.java:41: cannot access Tools.ImageTools.ImageTools bad class file: .\Tools\ImageTools\ImageTools.class class file contains wrong class: ImageTools.ImageTools Please remove or make sure it appears in the correct subdirectory of the classpath. private ImageTools iT = new ImageTools(); ^ C:\JSource\MyGame>javac MapMaker.java MapMaker.java:11: package Tools.DecoratedIcon does not exist import Tools.DecoratedIcon.*; ^ MapMaker.java:12: package Tools.ImageSplitter does not exist import Tools.ImageSplitter.*; ^ MapMaker.java:13: package Tools.ImageTools does not exist import Tools.ImageTools.*; ^ MapMaker.java:14: package Tools.IOOperations does not exist import Tools.IOOperations.*; ^ MapMaker.java:15: package Tools.WindowCloser does not exist import Tools.WindowCloser.*; ^ MapMaker.java:40: package Tools does not exist private Tools.IOOperations ioObject; ^ MapMaker.java:41: cannot access ImageTools bad class file: .\ImageTools.class class file contains wrong class: ImageTools.ImageTools Please remove or make sure it appears in the correct subdirectory of the classpath. private ImageTools iT = new ImageTools(); ^ C:\JSource\MyGame>javac MapMaker.java MapMaker.java:35: cannot access IOOperations bad class file: .\IOOperations.java file does not contain class IOOperations Please remove or make sure it appears in the correct subdirectory of the classpath. private IOOperations ioObject; ^
Is there a way to do this?