Stendhal on Eclipse: Difference between revisions
Content deleted Content added
imported>Hendrik Brummermann |
imported>Hendrik Brummermann more cleanup |
||
Line 3:
This guide describes how to setup a development environment in Eclipse for Stendhal.
== Get Java ==
* If you can play Stendhal, you already have Java and can skip this step.
* If you do not have java installed, please download it https://java.com<br> (if you are on Linux, use your packet manager)
== Get Eclipse==
Line 31 ⟶ 35:
* Eclipse will now download Stendhal from git, this may take a while
* "Import existing projects" and select "Next"
* "Finish" import of project Stendhal
Click on the screenshots to enlarge them, if you need help with any of the steps:
Line 42 ⟶ 47:
Eclipse 06.png|Just click "next" on destionation
Eclipse 07.png|Wait for the download to complete. This may take quite a while
Eclipse 08.png|Import existing project
Eclipse 09.png|Confirm import of project "Stendhal" by clicking finish
</gallery>
==Trouble Shooting==▼
After completing the import wizard, Eclipse should look like the following screenshot:
[[File:Eclipse 10.png]]
▲==Trouble Shooting==
There is a project called "stendhal" listed in the Package Explorer view. There may be a tiny yellow triangle in front of the blue project icon. But if you see a red circle or a red exclamation mark, something went wrong. In this case there will be an error in the "Problems" view at the bottom.
== Start StendhalServer ==
* In the toolbar there is the "Debug" button, which looks like a little, green bug. There is a little black arrow on the right side of it.
[[File:Eclipse_debug_configurations_menu.png]]
Line 73 ⟶ 81:
button "Advanced"
(*) add folder | OK
and select the "stendhal" project root folder | OK
</pre>
Line 79 ⟶ 87:
And then the server should be started.
==
# Open games.stendhal.client.update.Starter.java in the editor
# Then again the small black arrow on the right side of the green bug.
# Select "Debug Configurations" (or "Run Configurations...").
# Select Java Application and click the "New" button in upper-left corner.
# On the [Classpath] tab select "User Entries" - button "Advanced" - (*) add folder | OK - and select the project root folder. | OK
== Making patches ==
Line 93 ⟶ 99:
==Running JUnit Tests in Eclipse==
This is an advanced topic. If you make changes to the Java code, it is a good idea to run the automatic test.
Setting up JUnit tests in Eclipse:
# Click the arrow next to either the green "Run" or "Debug" button.
| |||