I can´t compile Libbulldog in BBB

135 views
Skip to first unread message

Jose Miracy

unread,
Dec 29, 2014, 2:01:12 PM12/29/14
to libbu...@googlegroups.com
Hello, 

    I´m Using eclipse with Java 1.8 in PC . in BBB i´m using JRE 1.8 . with Debian.
I Create a directory in BBB called Libbuldog and put all files together.  in eclipse (on PC) I create the aplication and the copy de class file to BBB. But it not works. 
I´ve got this error  

in thread "main" java.lang.NoClassDefFoundError: org/bulldog/core/platform/Platform
        at DigitalIO.main(DigitalIO.java:18)
Caused by: java.lang.ClassNotFoundException: org.bulldog.core.platform.Platform
        at java.net.URLClassLoader$1.run(URLClassLoader.java:372)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:361)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:360)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:357)

What wrong with my set up .  Do i have to compile in command line of BBB? 

Could you help please. ?

Thanks in advance
   

Hannes

unread,
Dec 29, 2014, 3:28:22 PM12/29/14
to libbu...@googlegroups.com
I added the jar to eclipse, add Buildpath and generate my application jar with all necessary jar.

And set LD_LIBRARY_PATH

Copy the .so file in same directory where you start in BBB

Jose Miracy

unread,
Dec 29, 2014, 3:37:44 PM12/29/14
to libbu...@googlegroups.com
I´m Sorry Hannes

I´m New in Java. I don´t understand. I´ve been Added the external Jar  in aineclipse it works. 

I´m Trying this 
javac -classpath /home/debian/libbulldog/bulldog.beagleboneblack.hardfp.jar DigitalIO.java 

Then I create DIgitalIO.Class -- OK , but when i run Java DigitalIO --I got Same error 

Ithink I´m doning something wrong

Hannes

unread,
Dec 29, 2014, 3:43:29 PM12/29/14
to libbu...@googlegroups.com
Hi Jose!

Did you wrote your own Programm in Eclipse on your PC and include the libbulldog jar file with BuildPath function?

What would you use in BBB? Inputs and Outputs?

Jose Miracy

unread,
Dec 29, 2014, 4:46:58 PM12/29/14
to libbu...@googlegroups.com

That´s Correct !

I Add a external Jar in Eclipse. I Get the sample code from Libbulldog i can save que app normally. I Got it the DigitalIO.class File 

But when i send the digitalIO.class to BBB and execute ,  I got the error.

I was traying to Compile inside BBB Directly. But Result the same error. 





 


Datenheld

unread,
Dec 29, 2014, 6:33:55 PM12/29/14
to libbu...@googlegroups.com
Hi Jose,

you really need to reference the libbulldog.jar during runtime, too!

Suppose you have all the files in the same directory (the bulldog jar, the native linux binary and your java file):

javac -cp bulldog.beagleboneblack.hardfp.jar YourClass.java

should then compile without problems! And don't forget to include the same -cp switch when running it via java.

java -cp bulldog.beagleboneblack.hardfp.jar:. YourClass (notice that no .class or .java extension is used!)

But pay attention to the package name of YourClass! If YourClass is in a package called "test", then you need to run it with the following command:

java -cp bulldog.beagleboneblack.hardfp.jar:. test.YourClass

That is, you have to specify the fully qualified name of your class.

HTH,
Datenheld aka Bulldog
Reply all
Reply to author
Forward
0 new messages