Stendhal on Eclipse: Difference between revisions

From Arianne
Jump to navigation Jump to search
Content deleted Content added
imported>Kymara
initial IRC chat!!
imported>Kymara
made look like wiki not mess
Line 1: Line 1:
==First Steps==
<kymara> so do you have any idea how i'd run teh server from eclipse? [10:42]
# First of all open the view called Package Explorer.
<durkham> no not really, mine wont run because of that mysql problem :)
# Create new 'Java Project'
<kymara> when one does ant dist for example you get a zip folder in
# Get stendhal from CVS.
stendhal/build which i unzip in another folder [10:43]
# make sure that the marauroa.ini is in your stendhal project folder.
<kymara> but i better not run that itn eclipse, that's froman old version
# right click on your project folder and select "Properties" in the context menu.
<durkham> how do you start the server normally? [10:44]
# then select "Java Build Path" on the left side of the dialog box.
<kymara> i do ant dist and that makes a zipped file inside stendhal/build/
<pre>source folder: stendhal/src
called something like stendhal-server-0.57.5.zip then i unzip that in
default output folder: stendhal/classes
a 'server' folder then i type ./start.sh which sets my classpath and
On the "library" tab: [Add jars] and select all the files in stendhal/lib</pre>
starts the server [10:47]
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.
<kymara> same when i want a new client i unzip

stendhal/build/stendhal-0.57.5.zip ina client folder then the .jar i
==Trouble Shooting==
need is tehre
menu Windows | Preferences | Java | Installed JREs
<kymara> i looked at the file
* there should be at least one entry with a valid JAVA_HOME path (make it so so JDK compliance is 5.0 ?)
src/games/stendhal/server/StendhalHTTPServer.java to see if running

that is all you need to do buyt i asked myboyfriend and he said
If you happen to get this:
because it doesn't have a word 'main' in it then it wouldn't be that
'' The method getLayerVector() is undefined for the type MapMapConverter.javastendhal/src/games/stendhal/toolsline 111''
one [10:50]
* please right click your project folder again --> properties -> java build path.
<durkham> in start.sh there must be written how the server is started [10:54]
* in the [source] tab there should only be stendhal/src, so remove stendhal/tiled/src
<kymara> java -cp "${LOCALCLASSPATH}" marauroa.server.marauroad -c
(This entry has higher priority than the tiled.jar in the libs folder but this code is highly outdated)
marauroa.ini -l [10:58]
<hendrik> kymara, first of all make sure that the marauroa.ini is in your
==To make it run the server==
stendhal project folder. [11:02]
* In the toolbar there is a green icon which looks like a bug.
<hendrik> right click on your project folder and select "Properties" in the
: there is a little black arrow on the right side of it.
context menu.
* This will open a menu, please choose "Debug..."
<hendrik> then select "Java Build Path" on the left side of the dialog box.
* Then in the dialog select "Java Application" and click on the "new"
<hendrik> source folder: stendhal/src [11:04]
icon in the top left corner.
<hendrik> default output folder: stendhal/classes
<pre> Name: StendhalServer
<hendrik> On the "library" tab: [Add jars] and select all the files in
Main class: marauroa.server.marauroad
stendhal/libs [11:05]
[x] include libaries when searching for the main class
<hendrik> eclipse should be able to compile the source code now.
on the [Arguments] tab:
<hendrik> there should be a little yellow sign before your project folder but
Program arguments: -c marauroa.ini -l
not red X. [11:06]
on the [Classpath] tab:
<kymara> i think i see the project folder in the Navigator tab
button "Advanced"
<kymara> shall i put marauroa.ini in stendhal/ ?
(*) add folder | OK
<kymara> it's not there yet
and select the root folder </pre>
<hendrik> There is something called "Project Explorer" which is similar to the
* button [Debug]
nagivator.
And then the server should be started.
<hendrik> please copy it.
'Note: you may need to 'add external jars' and add your mysql jar from your ant build type server'
<hendrik> please have a in detail look at the small icon in front of your

project folder. [11:07]
==To make the client run==
<hendrik> is there a "J" in it?
# Open games.stendhal.client.update.Starter.java in the editor
<kymara> I can't find Project Explorer to open but I can find Projects [11:08]
# then again the small black arror on the right side ofthe green bug.
<kymara> in Projects I see a small J
# java application -> new-icon, and it should be prefilled.
<kymara> but the projects tab doesn't have anything in it [11:09]
# for the client the [Classpath] advanced root folder thingy is needed as well.
<kymara> only navigator does

<kymara> there is something called Package Explorer
yay shiny new client, shiny server
<hendrik> oh sorry,you are right. [11:11]
<kymara> i can make a new project
<kymara> from an existing ant build
<hendrik> no, it is ok.
<hendrik> after you do the steps there should be "src" folder directly below
the project folder in the package explorer. [11:12]
<CIA-21> arianne_rpg: astridemma *
stendhal/src/games/stendhal/client/entity/RPEntity.java: removed
unused imports [11:13]
<hendrik> do NOT create an ant project. [11:14]
<kymara> i can't do the first thing you said [11:16]
<kymara> right click on your project folder and select "Properties" in the
<kymara> context menu.
<kymara> there's nothing in my project folder [11:17]
<kymara> should i create a new project but not an ant one?
<hendrik> is the package explorer empty? [11:18]
<hendrik> or do you see the directory tree there?
<kymara> i see directory tree in package explorer and navigator [11:19]
<hendrik> ok [11:20]
<hendrik> with "project folder" i mean the top level entry.
<hendrik> in the package explorer.
<hendrik> the one with the blue folder icon [11:21]
<kymara> ok i will go back and follow your instructions now :)
<kymara> sleetcing properties doesn't show a 'Java build path' on the left. it
shows 'Builders' though [11:22]
<kymara> i think i only imported it as a cvs project so far? [11:23]
<hendrik> ok, it there a little blue "J" on the blue folder icon.
<hendrik> ?
<kymara> no not on the one in package explorer
<kymara> it shows an orange square [11:25]
<hendrik> then you need to create a new "Java Project".
<kymara> Cannot create project content in workspace. [11:30]
<hendrik> did you use "file -> new project" or something else? [11:31]
<hendrik> does the old and new project folder tree overlap? [11:32]
<kymara> i deleted the old cvs project from eclipse but not the files then i
was trying to create a project from files and it didn't likeit
[11:33]
<kymara> but i got it working now properly
<hendrik> Does the package explorer now display the "src" folder directly
below the root folder with a different icon? [11:35]
<kymara> yes the icon is like a small grid [11:36]
<kymara> and i followed all the instructions about jars and output folders you
said above
<kymara> oh but a little red cross just appeared
<kymara> shall i tell you the errors? [11:37]
<hendrik> yes
<kymara> it's to do with Entity.java
<kymara> it wants java.lang.iterable it is indirectly referenced from required
.class files
<kymara> i'll add import blah to Entity.java? [11:38]
<hendrik> menu Windows | Preferences | Java | Installed JREs
<hendrik> there should be at least one entry with a valid JAVA_HOME path
[11:39]
<kymara> i'm using teh wrong java vm
<kymara> adding better one now [11:40]
<hendrik> there should be no more red X. [11:43]
<hendrik> if it does not change the error we may configure it in the project
preferences as well.
<kymara> i have now made it so JDK compliance is 5.0 [11:46]
*** ChadF (n=chadf@user-119a5l5.biz.mindspring.com) has joined channel #arianne
[11:47]
<hendrik> is there still a red X?
<kymara> ChadF: i know the rejection message doesn't come up but i figured
while i was there i put it in for future use :P
<hendrik> or does it compile now?
<kymara> hendrik: it's rebuilding the project 33%
<kymara> it needs so many billions of heap space. i need a better computer
[11:48]
<kymara> there's still a red cross
<ChadF> kymara: I know.. but still should make sure there aren't arbitrary
line breaks in it (so it doesn't look bad if/when enabled), if you
haven't already. [11:49]
<kymara> SeverityDescriptionResourceIn FolderLocationCreation TimeId
<kymara> 2The method getLayerVector() is undefined for the type
MapMapConverter.javastendhal/src/games/stendhal/toolsline 111March 9,
2007 11:47:17 6552
<kymara> ok ChadF
<hendrik> kymara, please ignore the stendhal/tools for the moment.
<hendrik> no, i rember the problem. [11:50]
<kymara> do i need to make sure it's not built with the project somehow?
<hendrik> please right click your project folder again --> properties -> java
build path.
<kymara> ok [11:51]
<hendrik> in the [source] tab there should only be stendhal/src
<hendrik> remove stendhal/tiled/src
<kymara> ok
<hendrik> this entry has higher priority than the tiled.jar in the libs folder.
<hendrik> but this code is highly outdated. [11:52]
<kymara> no little red crosses now :) only warnings :) [11:54]
<hendrik> very good. [11:55]
<hendrik> in the toolbar there is a green icon which looks like a bug.
<hendrik> there is a little black arrow on the right side of it. [11:58]
<hendrik> this will open a menu, please choose "Debug..."
<hendrik> then in the dialog select "Java Application" and click on the "new"
icon in the top left corner. [11:59]
<hendrik> Name: StendhalServer
<hendrik> Main class: marauroa.server.marauroad
<hendrik> [x] include libaries when searching for the main class [12:00]
<hendrik> on the [Arguments] tab:
<hendrik> Program arguments: -c marauroa.ini -l
<hendrik> on the [Classpath] tab:
<hendrik> button "Advanced" [12:01]
<hendrik> (*) add folder | OK
<hendrik> and select the root folder
<hendrik> OK
<hendrik> button [Debug]
<hendrik> and then the server should be started. [12:02]
<hendrik> i am going to the backery for some quick lunch. [12:03]
<kymara> ok
<hendrik> client will be easier.
<kymara> sorry
<kymara> my phone rang
<kymara> i'll read your instrustions
<hendrik> for the client: simply open games.stendhal.client.update.Starer.java
in the editor [12:04]
<hendrik> then again the small black arror on the right side ofthe green bug.
<hendrik> java application -> new-icon
<hendrik> and it should be prefilled.
<kymara> for ther server [12:11]
<kymara> i had to add the external mysql jar
<kymara> that i had in my other stendhal folder, then it is happy now
<hendrik> for the client the [Classpath] advanced root folder thingy is needed
as well. [12:13]
<durkham> :) this is the nicest explanation ever and arianne_eye is not running
<durkham> brb [12:14]
<kymara> shall i c&p and make a wiki guide out of this?
<hendrik> if it work, we can put it into the wiki tonight.
<durkham> oh yes that would be great [12:15]
<kymara> client! woo [12:16]
* ChadF sighs.. got the new motherboard's/cpu's yesterday, but the cases to go
with them won't arrive till Monday.
<kymara> pah you don' tneed a case
* ChadF will have fun testing the boards without cases =|
<kymara> yay shiny new client, shiny server

Revision as of 14:48, 22 March 2007

First Steps

  1. First of all open the view called Package Explorer.
  2. Create new 'Java Project'
  3. Get stendhal from CVS.
  4. make sure that the marauroa.ini is in your stendhal project folder.
  5. right click on your project folder and select "Properties" in the context menu.
  6. 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'

To make the client run

  1. Open games.stendhal.client.update.Starter.java in the editor
  2. then again the small black arror on the right side ofthe green bug.
  3. java application -> new-icon, and it should be prefilled.
  4. for the client the [Classpath] advanced root folder thingy is needed as well.

yay shiny new client, shiny server