gulliverrr
Posts: 38
Joined: Wed Jan 02, 2013 1:38 pm

Broken compilation of good-old code from Rev1 boards to Rev2

Thu May 09, 2013 10:14 pm

Hi folks!
I had some java code compiling fine in Rev1 boards with oracle jdk in softfloat debian.
I now got Rev2 boards and is driving me crazy giving me loads of errors like below

Code: Select all

./uk/co/jaynne/gpio/GpioControlPi4J.java:9: error: cannot find symbol
import com.pi4j.io.gpio.event.GpioListener;
                             ^
  symbol:   class GpioListener
  location: package com.pi4j.io.gpio.event
...
./uk/co/jaynne/gpio/GpioControlPi4J.java:9: error: cannot find symbol
import com.pi4j.io.gpio.event.GpioListener;
                             ^
  symbol:   class GpioListener
  location: package com.pi4j.io.gpio.event
thats how I compile and run it within a bash script running it with sudo

Code: Select all

LIBS=libs/raspberrygpio.jar:/home/pi/java:libs/commonsio24.jar:libs/mysql-connector-java-5.1.21-bin.jar:libs/framboos-0.0.1.jar:libs/pi4j-core.jar:./
echo "Compiling"
javac -classpath $LIBS uk/co/jaynne/BoilerControl.java
echo "Done, running"
java -cp $LIBS uk/co/jaynne/BoilerControl
where libs/pi4j-core.jar is a valid file relative to where I run the bash script from.

Any hints?

Return to “Java”