leJOS setup

This is where you talk about the EV3 software itself, installation issues, and programming talk.

Moderators: roger, gloomyandy, skoehler

New User
Posts: 23
Joined: Thu Apr 06, 2017 2:43 am

leJOS setup

Postby moo » Thu Apr 06, 2017 2:49 am

I have the following issue in macbook environment.

Installed lejos, plugin, eclipse and jdk 1.7 and 1.8

package w4;

import lejos.hardware.Button;
import lejos.hardware.Sound;
import lejos.utility.Delay;

public class WW {

public static void main(String[] args) {
// TODO Auto-generated method stub
System.out.println("Hello World");
for(int i=0;i<10;i++)


I get the following message in eclipse.

Hello World
Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/jna/Native
at lejos.internal.io.NativeFile$Linux_C_lib_DirectMapping.<clinit>(NativeFile.java:69)
at lejos.internal.io.NativeFile.<clinit>(NativeFile.java:77)
at lejos.internal.ev3.EV3Audio.<clinit>(EV3Audio.java:34)
at lejos.hardware.ev3.LocalEV3.<init>(LocalEV3.java:52)
at lejos.hardware.ev3.LocalEV3.<clinit>(LocalEV3.java:49)
at lejos.hardware.BrickFinder.getDefault(BrickFinder.java:30)
at lejos.hardware.Sound.<clinit>(Sound.java:13)
at w4.WW.main(WW.java:15)

Additionally, I do not see any source file uploaded checking through EV3Control.

User avatar
leJOS Team Member
Posts: 6001
Joined: Fri Sep 28, 2007 2:06 pm
Location: UK

Re: leJOS setup

Postby gloomyandy » Thu Apr 06, 2017 7:00 am

Hi and welcome to leJOS. A few things...
1. Please try and post questions in the correct part of the forum (each section has a description of what it is for), you posted your question in the intended to be used by people actually developing leJOS, not for user problems.
2. When posting code samples please use the code tag as this makes it much easier to read the code (the tags are displayed above the text area used for posting).

As to your question you seem to be trying to run a leJOS program on a PC (that is why you are getting the class not found exception). Did you create a leJOS project in eclipse? You should follow the steps given here:
https://sourceforge.net/p/lejos/wiki/De ... h%20leJOS/
In particular note how to create the project and also how you should run it (you can't just press the run button).
leJOS news https://lejosnews.wordpress.com/

Return to “EV3 Software”

Who is online

Users browsing this forum: No registered users and 1 guest