danielwippermann / resol-vbus-java

A Java library for processing RESOL VBus data
7 stars 6 forks source link

[question] - I need a little HowTo for building and running the examples #28

Open df8oe opened 1 year ago

df8oe commented 1 year ago

Hi Daniel, now I will dig into the example to extract what I need for translating parametrization to resol-python. But I am completely new to Java and need a push to the right direction... I am working on Linux CLI.

I have edited the IP address and the Relay address and name (I will test with Relay3) in parametrization/Main.java. As next step I changed working directory to the main directory resol-vbus-java and fired mvn compile It seems all went well: [INFO] Reactor Summary for RESOL VBus Parent 0.10.0:
[INFO]
[INFO] RESOL VBus ......................................... SUCCESS [ 3.725 s]
[INFO] RESOL VBus Parent .................................. SUCCESS [ 0.000 s]
[INFO] RESOL VBus Example ................................. SUCCESS [ 2.293 s]
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS

But how can I run the example? I do not find any .jar (thats what I usually run when I start a java application). Sorry for this maybe a stupid question but I have no idea for what i have to search if I do not want to learn java "in complete" ;)

danielwippermann commented 12 months ago

To build the .jar files you have to run mvn package first. After that you can find the respective files under vbus/target and vbus-example/target.

To run the parameterization example just execute:

java -cp vbus/target/vbus-0.10.0.jar:vbus-example/target/vbus-example-0.10.0.jar de.resol.vbus.example.parameterization.Main

df8oe commented 12 months ago

Many thanks. I needed the command for starting the Main-class. Java is different to C, C++ and Python.... Working now!