Portal:Lego Mindstorms/dev

From TeamFrednetWiki

Jump to: navigation, search

Setting up dev environment for JAVA version

NOTE: This guide will be update soon to make setting up dev environment easier.

  1. Download and install Java SE Development Kit 6 if you not already had.
  2. Go to www.eclipse.org
  3. Click "Get start now ... Download Eclipse"
  4. Choose "Eclipse IDE for Java EE Developers" and your OS and Download it.
  5. Unzip the zip the file
  6. Start Eclipse
  7. Choose direction were workspace are stored(default recommend)
  8. Choose Window -> open perspective -> Other...
  9. And choose Java EE and press OK
  10. Choose Window -> Show view -> Other...
  11. And choose Synchronize and press OK
  12. Windows -> Preferences
  13. Fold out Java and choose Installed JREs
  14. hit the add button
  15. Choose standaard VM and hit Next
  16. Choose Your JRE home on JDK.(in Windows for example: C:\Program Files\Java\jdk1.6.0_20)
  17. Hit finish
  18. Choose Help -> Install New Software
  19. Enter in the field "Work with: " : http://subclipse.tigris.org/update_1.6.x
  20. And press Add
  21. The name should be "subclipse 1.6"
  22. wait
  23. select subclipse in the list box
  24. hit next
  25. hit next again
  26. accept the license and hit Finish
  27. wait for a while
  28. You may get a serurity warning, press OK
  29. You may get asked to allow certificates
    1. press Select All and press OK
  30. When the software is install Eclipse will ask you to restart eclipse, press Yes
  31. When Eclipse is running again
  32. Choose Window -> Show view -> Other...
  33. Choose SVN Repositories and hit OK
  34. You will see at the bottom a tap SVN Repositories, hit this tab.
  35. At the end in same tab bar you will see the button Add SVN Repositorie, Hit this button.
  36. Enter following url: https://teamfrednet-lego.googlecode.com/svn/trunk/java2/
  37. Hit Finish
  38. You will see at the bottom a tap SVN Repositories, hit this tab.
  39. Right click on https://teamfrednet-lego.googlecode.com/svn/trunk/java2/
  40. and choose checkout
  41. hit Finish
  42. Choose Dynamic Web Project and hit Next
  43. Type in as project name: frednet.nxt.java
  44. By target runtime hit new
  45. Fold out Apache and choose Apache Tomcat v6.0 and hit Next
  46. Hit download and install
  47. agree and hit Finish
  48. Choose a folder to install Tomcat and hit OK
  49. Wait Tomcat is installing this may take a while(remember this one)
  50. For JRE select jdk1.6.0_20(or somethink like it)
  51. When finish hit Finish
  52. hit Finish
  53. Hit OK(if asked)
  54. You will see at the bottom a tap Synchronize , hit this tab.
  55. At the end in same tab bar you will see the button Synchronize..., Hit this button.
  56. Choose SVN and hit Next
  57. Choose Frednet.nxt.java and hit finish
  58. wait for a while
  59. on the left side on screen in project browser you will see Frednet.nxt.java
  60. now we need to add RXTC lib to project run direction:
    • For Windows
      1. C:\windows\system32
      2. Download from rxtx site the latest stable binary release and open the zip.
      3. Copy RXTXcomm.jar to system32 dir
      4. select you OS and copy all file in dir to system32, the file for windows are rxtxSerial.dll and rxtxParallel.dll.
    • For Linux
      1. export CLASSPATH=.:otherdirshere Need to be tested!!!!
  61. Go to Eclipse
  62. Select Frednet.nxt.java project
  63. Now hit the Debug button and select run on Server
  64. hit Finish
  65. May be you firewall bloks Eclipse or Tomcat please allow both.
  66. 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.


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

Personal tools