Modification

From CoffeeMud Wiki
Jump to: navigation, search
CoffeeMUD
Administrator                                                  Builder                                                              Player
=CoffeeMUD Administrator Information=
Installation     Help     Development    Modification     Feature Requests     Deities     Clans     Wiki

Modifications

Getting Started with Eclipse

  1. Get Eclipse (for Java Developers is enough), run eclipse.exe .
  2. If it complains about missing JDK, install JDK from Oracle Java website.
  3. Install a Subversion provider using About – Eclipse Marketplace; I can recommend Subclipse.
  4. Import the CM source from Subversion repository by selecting File – Import.
  5. Select Subversion source and „Checkout project from SVN“.
  6. Enter the URL of the repository; this is currently svn:coffeemud.net/public/CoffeeMud and if asked what to import, click on the root, top-most entry in the Select Folder step.
  7. Select import using New Project Wizard, not the Import Existing Project option (otherwise it will not recognize it as a Java project because there are no Eclipse project files in SVN, which is fine though).
  8. Click finish.
  9. Select regular Java project (but not the with Ant build file option, because we do not have this file on our disk yet).
  10. Enter Project name, use default jre. Import is Project layout: „Use project folder as root for sources and class files“ or CoffeeMud will not find many of its files like database, classes to load, .ini file, web files, etc.
  11. Click finish. Some warning can pop up, but since our project directory is empty and there is no .project file in SVN, we can ignore this with „OK“. All files should now be imported.
  12. Right-click the CoffeeMud project (the most top-level item in the project file tree) and select Properties and in the new window, Build Path and Libraries.
  13. Add the libraries in the „lib“ path (javascript library and compression library; two jar files). Then Eclipse should rebuild the workspace and all errors called „cannot resolve type“ should disappear.
  14. The problems / errors, which remain are all in fakedb. Select all the red ones, right-click and select „quick fix“ and in the new window, select „add unimplemented methods“ (because some JDBC database interface requires these), then click on Finish.
  15. Now all errors should be gone and „only“ warnings be left.
  16. Now click the down arrow on the green „play“ button in the toolbar, select run configurations. Select „Java application“, then search for the main class as starting point. The correct one is the MUD class in the „application“ folder / package. Under „Arguments“ enter (with quotes): „NameOfYourMud“.
If this parameter is not given, then the MUD will fail to start with a NullPointerException, even though the name of the MUD is already defined in the coffeemud.ini file (or should be, is it?) (TODO fix – both mud name would be better defined in ini file not cmd parameter ... and fix the error handling code, which fails to work properly, in case cmd parameter is not given).
  1. Now we can first try to start the MUD by clicking on the green „play“ button.
  2. Connect with a Telnet client or special MUD client.
  3. To stop the MUD, connect with a Telnet or MUD client, log in and enter the Archon command „shutdown“, then confirm.