Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

java.lang.ClassNotFoundException: org.sintef.jarduino.comm.Serial4JArduino #60

Open
SkyHawkBre opened this issue May 19, 2016 · 3 comments

Comments

@SkyHawkBre
Copy link

SkyHawkBre commented May 19, 2016

I am tring to run the Blink example:

import org.sintef.jarduino.*;

public class Blink extends JArduino 
{

    public Blink(String port) 
    {
        super(port);
    }

    @Override
    protected void setup() 
    {
        // initialize the digital pin as an output.
        // Pin 13 has an LED connected on most Arduino boards:
        pinMode(DigitalPin.PIN_12, PinMode.OUTPUT);
    }

    @Override
    protected void loop() 
    {

        // set the LED on
        digitalWrite(DigitalPin.PIN_12, DigitalState.HIGH);
        delay(1000); // wait for a second
        // set the LED off
        digitalWrite(DigitalPin.PIN_12, DigitalState.LOW);
        delay(1000); // wait for a second
    }

    public static void main(String[] args) 
    {
        String serialPort = "/dev/cu.wchusbserial1410";
        JArduino arduino = new Blink(serialPort);
        arduino.runArduinoProcess();
    }
}

And I am getting the following error:

java.lang.ClassNotFoundException: org.sintef.jarduino.comm.Serial4JArduino
    at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
    at org.sintef.jarduino.AbstractJArduino.<init>(AbstractJArduino.java:41)
    at org.sintef.jarduino.JArduino.<init>(JArduino.java:48)
    at Blink.<init>(Blink.java:8)
    at Blink.main(Blink.java:34)
Exception in thread "Thread-0" java.lang.NullPointerException
    at org.sintef.jarduino.AbstractJArduino.pinMode(AbstractJArduino.java:64)
    at Blink.setup(Blink.java:16)
    at org.sintef.jarduino.JArduino$RemoteArduinoProcess.run(JArduino.java:128)

I am new to GitHub and don't know what I am doing wrong, any help is greatly appreciated :)
-Sky

@MrLuiso
Copy link

MrLuiso commented Oct 20, 2016

I'm having the same problem.

@jsutaria
Copy link
Contributor

jsutaria commented Oct 21, 2016

Also having the same problem! Any thoughts?

Edit: Solved, the classes are found in the jarduino.serial folder.

@MrLuiso
Copy link

MrLuiso commented Oct 25, 2016

I found the missing class on the master folder. If you do a quick search it
will come up. Now all I have to do is resolve an issue with an import.

gnu.io.* to be more specific

On Oct 20, 2016 8:16 PM, "Jainil Sutaria" notifications@github.com wrote:

Also having the same problem! Any thoughts?


You are receiving this because you commented.
Reply to this email directly, view it on GitHub
#60 (comment),
or mute the thread
https://github.com/notifications/unsubscribe-auth/AFZ93yYt6iBVdF25ntGbjiUmyV7B1y6Sks5q2ARhgaJpZM4Iiatz
.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants