Stendhal on Eclipse
The following guide is not complete. Please add the newer details relating to changes from Stendhal 0.63 and Marauroa 2.0 if necessary.
First Steps
- First of all open the view called Package Explorer.
- Create new 'Java Project'
- Get stendhal from CVS.
- make sure that the marauroa.ini is in your stendhal project folder.
- right click on your project folder and select "Properties" in the context menu.
- then select "Java Build Path" on the left side of the dialog box.
source folder: stendhal/src default output folder: stendhal/classes On the "library" tab: [Add jars] and select all the files in stendhal/lib
Eclipse should be able to compile the source code now. There should be a little yellow sign before your project folder but not red X. The package explorer should now display the "src" folder directly below the root folder with a different icon, the icon is like a small grid.
Trouble Shooting
menu Windows | Preferences | Java | Installed JREs
- there should be at least one entry with a valid JAVA_HOME path (make it so so JDK compliance is 5.0 ?)
If you happen to get this: The method getLayerVector() is undefined for the type MapMapConverter.javastendhal/src/games/stendhal/toolsline 111
- please right click your project folder again --> properties -> java build path.
- in the [source] tab there should only be stendhal/src, so remove stendhal/tiled/src
(This entry has higher priority than the tiled.jar in the libs folder but this code is highly outdated)
To make it run the server
- In the toolbar there is a green icon which looks like a bug.
- there is a little black arrow on the right side of it.
- This will open a menu, please choose "Debug..."
- Then in the dialog select "Java Application" and click on the "new" icon in the top left corner.
Name: StendhalServer Main class: marauroa.server.marauroad [x] include libaries when searching for the main class on the [Arguments] tab: Program arguments: -c marauroa.ini -l on the [Classpath] tab: button "Advanced" (*) add folder | OK and select the root folder
- button [Debug]
And then the server should be started. Note: you may need to 'add external jars' and add your mysql jar from your ant build type server, if you have that already, or download from http://dev.mysql.com/downloads/connector/j/3.0.html (there are newer mysql available on the same site but I have 3.0 and it seems fine.)
To make the client run
- Open games.stendhal.client.update.Starter.java in the editor
- then again the small black arror on the right side ofthe green bug.
- java application -> new-icon, and it should be prefilled.
- for the client the [Classpath] advanced root folder thingy is needed as well.
yay shiny new client, shiny server