This week's book giveaway is in the OCPJP forum. We're giving away four copies of OCA/OCP Java SE 7 Programmer I & II Study Guide and have Kathy Sierra & Bert Bates on-line! See this thread for details.
I have 3 packages for my FBN classes: suncertify.db suncertify.server suncertify.ui The classes in one package import classes from another package and vice versa. When I compile and run these (unjarred), everything works fine. I'm working on jarring everything now. I have jarred just the classes and stubs and skeletons into db.jar, server.jar, and ui.jar in the starting directory. So my c:\scjd\starting\ directory contains db.jar, server.jar, ui.jar and db.db. My server's RmiFBNServerReg.class has a main() and my UI's FlyByNight.class has a main(). I would like to run the server as a separate process and ditto for the FlyByNight clients. In my manifest file for my server.jar, I have Main-Class: suncertify.server.RmiFBNSreverReg In my manifest file for my ui.jar,I also have Main-Class: suncertify.ui.FlyByNight
My problem is when I run the following from my scjd\starting\ directory: java -jar server.jar I get an error:
I'm assuming Java runtime is trying to find the suncertify.ui.DatabaseInterface class file that doesn't exist in the executing server.jar file. 3 questsion: 1) Can I allow java to find the missing classes without including those classes in the respective packages? I don't want to include them because they belong in separate packages. 2) If I jar my 3 jar files into another larger jar file, I won't be able to call the separate main()s in server.jar and ui.jar , correct? 3) Also one quick side question: How do I set the default directory for the JFileChooser? Thanks in advance for anyone who can help me.