Portal:Lego Mindstorms/dev
From TeamFrednetWiki
Setting up dev environment for JAVA version
NOTE: This guide will be update soon to make setting up dev environment easier.
- Download and install Java SE Development Kit 6 if you not already had.
- Go to www.eclipse.org
- Click "Get start now ... Download Eclipse"
- Choose "Eclipse IDE for Java EE Developers" and your OS and Download it.
- Unzip the zip the file
- Start Eclipse
- Choose direction were workspace are stored(default recommend)
- Choose Window -> open perspective -> Other...
- And choose Java EE and press OK
- Choose Window -> Show view -> Other...
- And choose Synchronize and press OK
- Windows -> Preferences
- Fold out Java and choose Installed JREs
- hit the add button
- Choose standaard VM and hit Next
- Choose Your JRE home on JDK.(in Windows for example: C:\Program Files\Java\jdk1.6.0_20)
- Hit finish
- Choose Help -> Install New Software
- Enter in the field "Work with: " : http://subclipse.tigris.org/update_1.6.x
- And press Add
- The name should be "subclipse 1.6"
- wait
- select subclipse in the list box
- hit next
- hit next again
- accept the license and hit Finish
- wait for a while
- You may get a serurity warning, press OK
- You may get asked to allow certificates
- press Select All and press OK
- When the software is install Eclipse will ask you to restart eclipse, press Yes
- When Eclipse is running again
- Choose Window -> Show view -> Other...
- Choose SVN Repositories and hit OK
- You will see at the bottom a tap SVN Repositories, hit this tab.
- At the end in same tab bar you will see the button Add SVN Repositorie, Hit this button.
- Enter following url: https://teamfrednet-lego.googlecode.com/svn/trunk/java2/
- Hit Finish
- You will see at the bottom a tap SVN Repositories, hit this tab.
- Right click on https://teamfrednet-lego.googlecode.com/svn/trunk/java2/
- and choose checkout
- hit Finish
- Choose Dynamic Web Project and hit Next
- Type in as project name: frednet.nxt.java
- By target runtime hit new
- Fold out Apache and choose Apache Tomcat v6.0 and hit Next
- Hit download and install
- agree and hit Finish
- Choose a folder to install Tomcat and hit OK
- Wait Tomcat is installing this may take a while(remember this one)
- For JRE select jdk1.6.0_20(or somethink like it)
- When finish hit Finish
- hit Finish
- Hit OK(if asked)
- You will see at the bottom a tap Synchronize , hit this tab.
- At the end in same tab bar you will see the button Synchronize..., Hit this button.
- Choose SVN and hit Next
- Choose Frednet.nxt.java and hit finish
- wait for a while
- on the left side on screen in project browser you will see Frednet.nxt.java
- now we need to add RXTC lib to project run direction:
- For Windows
- C:\windows\system32
- Download from rxtx site the latest stable binary release and open the zip.
- Copy RXTXcomm.jar to system32 dir
- select you OS and copy all file in dir to system32, the file for windows are rxtxSerial.dll and rxtxParallel.dll.
- For Linux
- export CLASSPATH=.:otherdirshere Need to be tested!!!!
- For Windows
- Go to Eclipse
- Select Frednet.nxt.java project
- Now hit the Debug button and select run on Server
- hit Finish
- May be you firewall bloks Eclipse or Tomcat please allow both.
- You can visted the project at http://localhost:8080/frednet.nxt.java/
Now we Have setup dev environment. Remember be for you start working Update to HEAD(rightmouse button on project -> team) and when finish working Commit(rightmouse button on project -> team)
You can view change at the bottom in tap Synchronize.
Note: In this config it doesn't allow someone from outside your network to access it.
Any qeustion ask me mbrakels AT gmail DOT com
FAQ
Q: I get this error java.lang.UnsatisfiedLinkError: no rxtxSerial in
A: There is something wrong with the rxtx install.
Setting up dev envermount(windows Version)(this version is no longer future developed)
- install Visual Express C# 2008 or up
- install eclipse and wamp
NOTE: For dev of only the web interface, just download the lates version of control api at google code and run the app. If you don't have a NXT just don't connect it. The app will send out info because it is not connected but for testing of the web interface service well.
- install SVN plugin for Eclipse
- for SVN path for Eclipse: https://teamfrednet-lego.googlecode.com/svn/truck/legomindstorm/web
- add an Alias to config of apache
Alias /e "c:/Users/marc/workspace"
# C:\Users\marc\workspace
<Directory "C:/Users/marc/workspace/">
Options Indexes FollowSymLinks MultiViews
AllowOverride all
Order Deny,Allow
Deny from 1.2.3.4
Allow from all
</Directory>
You should change C:/Users/marc/workspace/ to your path to workspace
- start eclipse and connect to google code and create project from SVN
- you can access the web local by http://localhost/e.
Don't forget to commit the code
