Stendhal on Eclipse: Difference between revisions

Jump to navigation Jump to search
Content deleted Content added
imported>Hendrik Brummermann
imported>Hendrik Brummermann
 
(22 intermediate revisions by 5 users not shown)
Line 7: Line 7:
* If you can play Stendhal, you already have Java and can skip this step.
* 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)
* If you do not have java installed, please download it https://java.com<br> (if you are on Linux, use your packet manager)

== Get Node.js ==

* https://nodejs.org (optional: for building & using web client)


== Get Eclipse==
== Get Eclipse==
Line 12: Line 16:
* Go to https://www.eclipse.org/downloads/
* Go to https://www.eclipse.org/downloads/
* Download: "Eclipse IDE for Java Developers"
* Download: "Eclipse IDE for Java Developers"
* Unzip the download an run Eclipse
* Unzip the download and run Eclipse
* In Eclipse, close the "Welcome" window
* In Eclipse, close the "Welcome" window


Line 21: Line 25:
File:Eclipse_00a.png|Typical window layout with the Package Explorer on the left hand side and an empty area for editors in the middle
File:Eclipse_00a.png|Typical window layout with the Package Explorer on the left hand side and an empty area for editors in the middle
</gallery>
</gallery>
Note: If you installed Eclipse in Ubuntu via a package manager, also install: "eclipse-egit"


== New Project from Git ==
== New Project from Git ==
Line 29: Line 34:
* In the dialog select: "Git -> Projects from Git" and click "Next".
* In the dialog select: "Git -> Projects from Git" and click "Next".
* Select "Clone URI" and click "Next".
* Select "Clone URI" and click "Next".
* Fill in the following information:<br>URI: <code><nowiki>git://git.code.sf.net/p/arianne/stendhal</nowiki></code>
* Fill in the following information:
** '''URI''':
(if you are a developer with commit access, use <code><nowiki>ssh://[[username]]@git.code.sf.net/p/arianne/stendhal</nowiki></code>)
*** GitHub readonly: <code><nowiki>https://github.com/arianne/stendhal.git</nowiki></code><br>(if you have a github account, please go to https://github.com/arianne/stendhal and click on "Fork" to create you own copy of the repository and then use that in Eclipse instead)
*** GitHub read/write (SSH): <code><nowiki>git@github.com:arianne/stendhal.git</nowiki></code>
* The result of the fields are filled in automatically, click "Next"
* The result of the fields are filled in automatically, click "Next"
* On the Branch selection page, keep everything selected and click "Next"
* On the Branch selection page, keep everything selected and click "Next"
Line 46: Line 53:
Eclipse 04.png|Fill in URI and watch the remaining fields to be filled automatically
Eclipse 04.png|Fill in URI and watch the remaining fields to be filled automatically
Eclipse 05.png|Just click "next" on branch selection
Eclipse 05.png|Just click "next" on branch selection
Eclipse 06.png|Just click "next" on destionation
Eclipse 06.png|Just click "next" on destination
Eclipse 07.png|Wait for the download to complete. This may take quite a while
Eclipse 07.png|Wait for the download to complete. This may take quite a while
Eclipse 08.png|Import existing project
Eclipse 08.png|Import existing project
Line 69: Line 76:
[[File:Eclipse_new_debug_configuration.png]]
[[File:Eclipse_new_debug_configuration.png]]


<pre> Name: StendhalServer
Name: StendhalServer
Main class: games.stendhal.server.StendhalServer
Main class: games.stendhal.server.StendhalServer


* All other settings ("include system libries", "Stop in main", ... can be left at their default value.
* All other settings ("include system libries", "Stop in main", ... can be left at their default value.
* on the [Arguments] tab: VM arguments: -Xmx128M
* on the [Classpath] tab: click "UserEntries" - button "Advanced" - (*) add folder | OK - and select the "stendhal" project root folder | OK
* button [Debug]


And then the server should be started.
on the [Arguments] tab:
VM arguments: -Xmx128M


on the [Classpath] tab:
NOTE: On newer Eclipse versions, the [Classpath Entries] are under Dependencies tab.
click UserEntries
button "Advanced"
(*) add folder | OK
and select the "stendhal" project root folder | OK
</pre>

* button [Debug]
And then the server should be started.


== Start Stendhal Client ==
== Start Stendhal Client ==