Giter Club home page Giter Club logo

bluej-lejos's Introduction

BlueJ.leJOS

BlueJ.leJOS is an extension for the popular BlueJ development environment, integrating and connecting the leJOS NXJ Firmware for Lego Mindstroms NXT. It allows to develop Java programs for the NXT brick.

The extension is developed by Jonas Neugebauer and published under the GNU General Public License version 2.

Content

  1. Installation/Quick Guide
  2. Installation/Step-by-Step Guide
  3. How to use/Configuration
  4. How to use/Usage
  5. FAQ

Installation

Quick Guide

  1. Download and install a Java Development Kit
  2. Download and install BlueJ
  3. Download and install leJOS
  4. Download the extensions' jar-file and place it into your extensions folder
  5. Start BlueJ and open the preferences
  6. Under the Libraries tab add the classes.jar from your leJOS distribution
  7. Under the Extensions tab set the leJOS Folder and leJOS Version
  8. Restart BlueJ

Step-by-Step Guide

Install Java

To use BlueJ you need to install at least version 6 of the Java Development Kit (JDK). Download and install your package of choice from here. leJOS requires a 32 bit Java installation to work properly. So make sure to install the x86 version of the JDK, even if you're running a 64 bit Operating System.

Please pay attention to the sidebar on the BlueJ website:

Note that only the version labeled JDK will work. Not the one labeled JRE, nor the one that comes with NetBeans, nor the EE version.

and

Debian/Ubuntu users should install the JDK via the package management system rather than using the links above. See the installation instructions. [...] On MacOS X 10.5+, a recent Java SDK version is installed by default.

Install BlueJ

Download BlueJ from the BlueJ project website. For detailed instructions how to install BlueJ have a look at the BlueJ installation instructions.

Install leJOS

leJOS can be downloaded from the project homepage.

For Windows get the bundled installer (leJOS_NXJ_<version>_win32_setup.exe) and simply follow the steps of the installation process.

For all other systems get the tarball (leJOS_NXJ_<version>.tar.gz) and unpack it in a folder of your choice.

The windows installer will automatically set the NXJ_HOME environment variable to the installation folder. On other systems it is recommended to set it manually. See the documentation of your operating system or here for instructions.

If you're running multiple versions of Java (especially on a 64 bit OS, where you need to install a separate 32 bit version of Java to run leJOS on), you also should set the LEJOS_NXT_JAVA_HOME variable to the correct Java version.

Install BlueJ.leJOS

Download the extension from the jar folder of this repository. You need to place the jar-file in the extensions folder of your BlueJ installation. Depending on the operating system you are running, the location of the extension folder varies:

If you want to install the extension for every user and project on your machine:

  • Windows: <BLUEJ_HOME>\lib\extensions
  • Mac OS: <BLUEJ_HOME>/BlueJ.app/Contents/Resources/Java/extensions (Control-click BlueJ.app and choose Show Package Contents)
  • UNIX: <BLUEJ_HOME>/lib/extensions

If you want to install the extension for all projects of the current user:

  • Windows: <USER_HOME>\bluej\extensions
  • Mac OS: <USER_HOME>/Library/Preferences/org.bluej/extensions
  • UNIX: <USER_HOME>/.bluej/extensions

If you want to install the extension just for one project:

  • All sytstems: <BLUEJ_PROJECT>/extensions

Where <BLUEJ_HOME> is the path to your local BlueJ installation, <USER_HOME> is the path to your home folder and <BLUEJ_PROJECT> is the path of the project you want to use.

Now restart BlueJ, if the application is already running.

Configure BlueJ and BlueJ.leJOS

To use BlueJ.leJOS you need to setup the path to your leJOS installation. Open the BlueJ preferences and go to the Extensions tab. If the extension is correctly installed, you should see a panel titled BlueJ.leJOS.

If you set the NXJ_HOME environment variable, the correct path to your leJOS installation should already be set. Otherwise choose the correct folder (the folder containing the bin and lib folders).

If you want to use an older version of leJOS choose it in the leJOS Version box.

Now change to the Libraries tab. You need to add the classes.jar from your leJOS version into the classpath of your project. Click Add and navigate to the same leJOS folder you selected before. Find the classes.jar (leJOS 0.9: *lib/nxt", leJOS 0.8: lib) and click Choose.

Close the preferences by clicking Ok. The extension will check your configuration and show a warning if anything went wrong. Otherwise you need to restart BlueJ one more time for the changes to take effect.

Additional installations to connect Lego Mindstorms NXT

If you never used Lego Mindstorms NXT on your machine, you probably need to install additional drivers to connect to the NXT brick via USB or Bluetooth.

On *Windows you can use the NXT driver from the RobotC website. After installing either the 32 or 64 bit version you should be good to go.

On other systems you need to get the Fantom Driver from the Lego Mindstroms website.

How to use

Configuration

General Setup

Other options

Usage

Running leJOS programs

Debugging leJOS programs

FAQ

  • How can I use different leJOS versions for different projects

    You can configure different settings for different projects by bundling the necessary files with your project folder. First create your project. Navigate to the projects folder an create an extensions and a +lib folder in it. Place the extension in the extensions folder and the classes.jar from the leJOS installation into the +lib folder. After a restart BlueJ should load the extension and the library automatically. For more details have a look at the BlueJ reference manual

bluej-lejos's People

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

bluej-lejos's Issues

Status

Hi! What is the status of this project? Anyone using this plugin? We are planning to use LeJOS with EV3.

Uploading NXJ Files to NXT via BlueJ Extension Is Unsuccessful

First of all, thank you for developing the leJOS extension for BlueJ. I use leJOS and your extension in my computer science class.

I recently upgraded to the latest version of your extension and leJOS 0.9.1b3 on Windows 7.

I am able to successfully compile the Java source files and generate the NXJ file. However, when I attempt to upload the NXJ file to the NXT, there is a problem. At first, it appears to be successful. However, when I try to execute the file on the NXT, an exception is generated. When I inspect the uploaded NXJ file on the NXT, the file size is 0. It appears that the file is not uploading successfully.

If I upload the file using the nxjupload program from the command line, the file is uploaded fine (runs successfully, file size > 0).

Any suggestions? Is this a known issue?

Please let me know if I can provide any more information that would be helpful.

Some lines from the debug output are not parsed

e.g.

Method 43: lejos.nxt.VM.firmwareExceptionHandler(java.lang.Throwable, int, int) Native id 118
Method 44: lejos.nxt.VM.access$100(java.lang.Object, int, int, int, int) PC 4362 Signature id 250

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.