Build .jar file with eclipse (help for a beginner)

Hello, first of all great to see this active community. I’m working with openhab nog for a couple of weeks. To connect my Google Nest Doorbell, I have to install a custom .jar file. I know where to put this file on my RPI. But I really need help building this .jar file.

What I’ve done: I have installed Eclipse on my Macbook. Also installed latest version of java. But when I’m importing a total github library and try to export the JAR file, I see a lot of errors (820), like:
AvailabilityTracker cannot be resolved to a type
Before cannot be resolved to a type
ChannelConfigurationTypeAdapterFactory cannot be resolved to a type

See image for more details:

Hopefully someone could give me some tips/advice on what to do. I’ve searched the internet for more then a week to find a solution by myself, but I have still nog found it.

Thank you already!

1 Like

openHAB 3 requires Java 11, the latest LTS release Is that what you installed?

1 Like

Did you follow the instructions for developing openHAB addons? Did you install maven? Also openHAB 2.5.x is Java 8.

1 Like

@mennootje I think i should move on latest version of java. It will defiantly clear this error. Thanks man for giving me solution of this problem. :slightly_smiling_face:

Hi Bruce,

Thank you for your answer. I have installed: Java SE Development Kit 11- - Downloads | Oracle Nederland

1 Like

Hi J-N-K, I have installed Maven and Java 11. Is Java 11 not ok (is newer version)? And I’ve followed some instructions. But do you have a link to the instructions you mentioned. Maybe this is a different/better one.

Thanks a lot!

:slight_smile: I’m on Java SE Development Kit 11. Is this the latest version?

That should be the correct version if you are working with openHAB 3.

If you are working with the older openHAB 2 it requires Java 8. The image in your first post indicates openHAB 2.5.x so you need Java 8, not 11.

Did you try mvn clean install on the command line? Does that work?

„Export jar“ sounds wrong, you must use maven to create the jar.

1 Like