You are currently browsing the category archive for the ‘Computer Science’ category.

Preliminaries

  • You need a Java Development Kit (JDK), version 1.5 or later.
  • Your PATH must contain the JDK’s bin directory. To do that edit /home/<username>/.bashrc file and add the following lines:
    export PATH=<JDK's bin directory>:$PATH
    Mine was /usr/lib/jvm/java-6-sun-1.6.0.07/bin
  • Make sure you have set JAVA_HOME properly to the root directory of the JDK. Again edit /home/<username>/.bashrc file and add the following lines:
    export JAVA_HOME=<JDK's root directory>
  • You will need to build the distribution, so your PATH must contain the ant binary (ant 1.7 or above). Just install the package ant by using the command “aptitude install ant” to do that. It may require being root. To add this to the PATH
    export PATH=/usr.share/ant/bin:$PATH
  • You need libusb installed. libusb for Linux can be obtained from http://libusb.sourceforge.net.

Installation and Set Up

  1. Extract the files from the distribution. A lejos_nxj subdirectory will be created.
  2. Set the environment variable NXJ_HOME to the full path of the lejos_nxj directory. As we did above just add the line:
    export NXJ_HOME=<full path of the lejos_nxj directory>
  3. Add the lejos_nxj/bin directory to your PATH. Add the following line to .bashrc
    PATH=$PATH:<full path of the lejos_nxj directory>/bin
    export PATH
  4. Depending on your privilege settings you might need to adjust the execution permissions in the bin directory.
    You will have to build the distribution first. To do so, switch to the build folder and run ant. You will need to ensure that the packages that leJOS NXJ is dependent on are on your system. These include libusb-dev, gcj and libbluetooth-dev. Don’t forget to install those packages to be able to build the distribution.

You are all set!
Now you can use nxjc or nxj commands to compile and run your code on the brick. Note that you can only see the usb device by becoming root user. If you don’t have the root privilages, you can try to edit the udev files mentioned in the readme file. However, I haven’t been able to make it work yet.

Note: Most of the parts are from the Readme.html in the directory of lejos_nxj. The purpose of this post is to make some parts clearer.

I have been waiting for Ubuntu 8.04 release for a long time. I decided not to install the beta version and waited for the release. Yesterday, I downloaded it and now I want to share my first impressions.

It is a revolution!

I didn’t know anything about Wubi until yesterday and maybe that’s why I am so impressed. By using Wubi, you can download and install/uninstall Ubuntu from Windows. You don’t need a partition or anything. It installs Ubuntu on Windows like any other program. You can see Ubuntu in add/remove programs section after you install it. They say that hard-disk access is slightly slower if you install it on Windows instead of installing Ubuntu on its own partition, but it is so simple that I think I can live with that. It took less than half an hour to install a new OS to my laptop which is awesome. You don’t even need to burn a CD to install. Just download the Ubuntu you want or let Wubi install the suitable one for you and then set up the OS. I am using Windows Vista Home Premium and I didn’t have any difficulties with Wubi.

After installation, I also tried to check the new features of Ubuntu. I had no driver problems at all. It automatically downloads drivers if necessary. I can use my webcam, wireless device and sound card without any problems. I couldn’t see that slight slow hard-disk access while working.

So, I strongly recommend to install Ubuntu on your machine. It is easy to use and completely free. You can have any tool you need. If you don’t like it, you can just uninstall it from Windows. Nothing to lose!

Ubuntu Logo

Follow

Get every new post delivered to your Inbox.