Rosjava gradle build java classpath
Hi,
I've spent the last week learning gradle with little success. It seems overly complex and unnecessary for rosjava, but I will try to put my complaints aside. No matter what I do, after a gradle build (either using gradlew installApp or gradle build), my java class path is not set. I check my class path with echo $CLASSPATH
and it always spits out a blank line. I even tried this from the pubsub tutorial and got the same result. This leads me to believe that it is normal behavior. However, if this is the case, how do you include dependencies? I follow the gradle default set up with my source code in main/src/main/java and my external .jar in src/main/resources, which gradle seems to use as the default (and I specify it in the gradle build script anyway for redundancy). Could someone please help?
src located in: /src/main/java/org/ros/rosd where org/ros/rosd is the package.
.jar in: /src/main/resources/d.jar
I know the jar runs fine, and after building I can manually run the java code:
roscore &
./build/install/rosd/bin/rosd org.ros.rosd.talker &
./build/install/rosd/bin/rosd org.ros.rosd.listener &
However, whenever I try to initialize a constructor from something in the .jar, it fails to recognize it as an actual resource. For example, adding the following to talker.java:
new ds();
throws a compile-time error. Though, I can manually run the jar with java -jar d.jar
edit: I should note that within talker.java I import edu.wpi.d; and it doesn't find the package, which is in d.jar.
Your help would be greatly appreciated!
--James