How to run habmin in the Eclipse IDE?

Is there a way to include habmin2 jar in the Eclipse IDE debug launch without building it.
There is no ‘addons’ folder in which I can simply drop it it seems.

@chris ?

Generally, if you want to include a JAR in the IDE, from memory you need to use the File | Import menu.

Alternatively you could grab the source and import into your workspace…

1 Like

Thanks works smooth!
So easy but I did not know :slightly_smiling:

So easy but I did not know

Everything is simple when you know how to do it :slight_smile:

In Package explorer, I have:

  • Other Projects
  • Runtime
  • ESH Extensions
  • OH1 Add-ons
  • OH2 Add-ons
  • Infrastructure
    – demo-resources
    – > launch [openhab-distro master]

According to this tutorial I select “Run as > openHAB_Runtime”. Then the program runs, the console shows log messages, and http://localhost:8080 responds, but http://localhost:8080/habmin doesn’t come up.
I dragged and dropped the file org.openhab.ui.habmin_0.1.6.jar into “launch [openhab-distro master]” and I can see it in
– > launch [openhab-distro master]
---- > ESH-INF
---- > home
---- > lib
---- > …
---- > web
---- > org.openhab.ui.habmin_0.1.6.jar
Obviously this is not the right way to include the JAR. How should I do it so that it takes effect when running openhab?

I was able to solve it following this post.

Summary of steps taken:

  • step1 - Downloaded the habmin jar file from here

  • step2 - Created a directory, and placed the habmin jar file in it

mkdir -p /home/avner/openhab2-master2/ws/tmp1
ll /home/avner/openhab2-master2/ws/tmp1
-rw-rw-r-- 1 avner avner 4193121 Nov 23 00:49 org.openhab.ui.habmin_0.1.6.jar
  • step3 - Followed the instructions in here to add the jar file to the project.

Window -> Prefernces -> Plug-in Development -> Target Platform
selected openHAB Target Platform (Active) - /launch/
Selected Edit -> (Locations tab) -> Add -> Directory, and added /home/avner/openhab2-master2/ws/tmp1 where I placed the jar file.
Verified that the jar file is added to the list of locations like so

  • step4 - Used the instructions in here to setup and execute openhab from eclipse, by right-clicking on openHAB_Runtime.launch “Run as > openHAB_Runtime”

After that I can see, as expected:

  1. Messages in the Console pane, indicating that the program is running
  2. http://localhost:8080 responds
  3. http://localhost:8080/habmin/index.html#/home reponds as well

List item