IDE setup in macOS

Hi, I follow the instructions in the web-page to setup the IDE environment in macOS and it does not work.
All the add-ons have multiple errors. I have been trying to have the IDE working again since February.
After trying several times I decided to try in windows 7 (in a VM) and it works like a charm.

I tried with Mojave and now with Catalina, in a macbook Pro with an i7 and 32Gb of RAM, java 1.8.0_221.
One issue that I found is that eclipse reports running out of memory. I increased it from 512Mb (as it is setup by default) to 8Gb, but I can only do that after the installation finishes and then re-running the setup tasks doesn’t fix the problems. In windows 7, the default install works and the VM only has 2Gb of RAM. When I install it I always delete the .eclipse .m2 .p2 and the openhab-master folders to have a clean install.

Has anybody successfully installed the eclipse IDE setup for openhab in a mac following the instructions in the openhab documentation?

I have the same problem. I tried several times the last time I’ve used @hilbrand his latest version of the guide https://www.openhab.org/docs/developer/ide/eclipse.html.

When I install the openhab development project only it works. But when also selecting the add-ons right away it just hangs infinite on 95% (It stayed there for hours before I killed the process).

I could try to add the add-ons project after the initial install finished but I can’t seem to find the right option in Eclipse (I normally use IntelliJ) to add it afterwards.

The documentation has been updated very recently as Mark mentions. If you still have problems and haven’t tried with the new instructions you should certainly have a look.

The default memory is 2048 mb as set in the eclipse.ini file in the eclipse directory. It’s the option -Xmx2048m.

For any development it’s not necessary to add the add-ons project. If you do select it will download all jar files and all source jars for all those bindings. And depending on your network connection this may take a long time. That’s the reason I don’t recommend to use this option in the updated documentation.

If you want to run a specific binding. Get the sources via of the add-ons repo via git:
git clone git@github.com:openhab/openhab2-addons.git in the git directory and just import that specific binding in Eclipse. See the documentation mentioned on how to run that binding in the demo environment.

To summarize. There is absolutely no reason to select the add-ons during or after installation of Eclipse!

Hi, I tried again and it fails now with a different error (maybe related to Catalina)

Executing bootstrap tasks

Java™ SE Runtime Environment 1.8.0_221-b11

Product org.eclipse.products.epp.package.java.mars

Workspace /Users/manuel/openhab-master/ws

Project com.github.openhab.1_infra.master

Project com.github.openhab.2_addons2.master

Bundle org.eclipse.oomph.setup 1.15.0.v20191116-1146, build=4407, branch=7d370b0a3dc5d861b8834263a6bdf6c3ee31bfa3

Bundle org.eclipse.oomph.setup.core 1.15.0.v20191103-0619, build=4407, branch=7d370b0a3dc5d861b8834263a6bdf6c3ee31bfa3

Bundle org.eclipse.oomph.setup.installer 1.15.0.v20191119-1204, build=4407, branch=7d370b0a3dc5d861b8834263a6bdf6c3ee31bfa3

Bundle org.eclipse.oomph.setup.p2 1.13.0.v20191019-1424, build=4407, branch=7d370b0a3dc5d861b8834263a6bdf6c3ee31bfa3

Performing Workspace /Users/manuel/openhab-master/ws

Performing P2 Director (Eclipse IDE for Java Developers (Mars))

Offline = false

Mirrors = true

Resolving 21 requirements from 5 repositories to /Users/manuel/openhab-master/Eclipse.app/Contents/Eclipse

Requirement epp.package.java [4.5.0,5.0.0)

Requirement org.eclipse.platform.feature.group [4.5.0,5.0.0)

Requirement org.eclipse.rcp.feature.group [4.5.0,5.0.0)

Requirement org.eclipse.jdt.feature.group [3.11.0,4.0.0)

Requirement org.eclipse.oomph.setup.feature.group

Requirement org.eclipse.oomph.setup.jdt.feature.group

Requirement org.eclipse.oomph.setup.git.feature.group

Requirement org.eclipse.egit.feature.group

Requirement org.eclipse.oomph.setup.workingsets.feature.group

Requirement org.eclipse.oomph.setup.projects.feature.group

Requirement org.eclipse.wst.xml_ui.feature.feature.group

Requirement org.eclipse.m2e.feature.feature.group

Requirement org.eclipse.m2e.logback.feature.feature.group

Requirement org.eclipse.mylyn.java_feature.feature.group

Requirement org.eclipse.mylyn.bugzilla_feature.feature.group

Requirement org.eclipse.mylyn.hudson.feature.group

Requirement org.eclipse.mylyn.git.feature.group

Requirement org.eclipse.wst.jsdt.feature.feature.group

Requirement org.eclipse.wst.web_ui.feature.feature.group

Requirement bndtools.m2e.feature.feature.group

Requirement bjmi.m2e.sourcelookup.feature.feature.group

Repository http://download.eclipse.org/technology/epp/packages/mars

Repository http://download.eclipse.org/releases/mars/201602261000

Repository http://download.eclipse.org/oomph/updates/milestone/latest

Repository https://dl.bintray.com/bndtools/bndtools/latest/

Repository https://bjmi.github.io/update-site/

Adding repository https://dl.bintray.com/bndtools/bndtools/latest/

Fetching content.jar from https://dl.bintray.com/bndtools/bndtools/latest/ (45.38kB)

Fetching p2.index from http://download.eclipse.org/releases/mars/201602261000/

Fetching p2.index from http://download.eclipse.org/technology/epp/packages/mars/

Adding repository http://download.eclipse.org/oomph/updates/milestone/latest

Adding repository https://bjmi.github.io/update-site/

Adding repository http://download.eclipse.org/releases/mars/201602261000

Adding repository http://download.eclipse.org/technology/epp/packages/mars

Fetching compositeContent.xml from https://bjmi.github.io/update-site/

Fetching content.xml.xz from http://download.eclipse.org/releases/mars/201602261000/

Fetching content.xml.xz from http://download.eclipse.org/technology/epp/packages/mars/

Fetching compositeContent.jar from http://download.eclipse.org/oomph/updates/milestone/latest/ (437B)

Fetching content.xml from https://bjmi.github.io/update-site/bjmi.jdt.extensions/

Fetching p2.index from https://bjmi.github.io/update-site/bjmi.m2e.sourcelookup/ (177B)

Fetching content.jar from http://download.eclipse.org/oomph/drops/milestone/S20191119-111759-1.15.0-M3/ (66.81kB)

Fetching content.xml.xz from https://bjmi.github.io/update-site/bjmi.m2e.sourcelookup/ (1.7kB)

Calculating requirements and dependencies.

Cannot complete the request. Generating details.

ERROR: org.eclipse.equinox.p2.director code=10053 Cannot complete the install because one or more required items could not be found.

at org.eclipse.oomph.util.OomphPlugin.coreException(OomphPlugin.java:280)

at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.resolve(ProfileTransactionImpl.java:426)

at org.eclipse.oomph.p2.internal.core.ProfileTransactionImpl.commit(ProfileTransactionImpl.java:338)

at org.eclipse.oomph.setup.p2.impl.P2TaskImpl.perform(P2TaskImpl.java:815)

at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.doPerformNeededSetupTasks(SetupTaskPerformer.java:3827)

at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performNeededSetupTasks(SetupTaskPerformer.java:3755)

at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.performTriggeredSetupTasks(SetupTaskPerformer.java:3736)

at org.eclipse.oomph.setup.internal.core.SetupTaskPerformer.perform(SetupTaskPerformer.java:3629)

at org.eclipse.oomph.setup.ui.wizards.ProgressPage$9.run(ProgressPage.java:582)

at org.eclipse.oomph.setup.ui.wizards.ProgressPage$11$1.run(ProgressPage.java:708)

at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)

ERROR: org.eclipse.equinox.p2.director code=0 Software being installed: artificial_root 1.0.0.v1574357450738

ERROR: org.eclipse.equinox.p2.director code=0 Missing requirement: Bndtools m2e 4.3.1.REL-201911131708-g281e71d (bndtools.m2e.feature.feature.group 4.3.1.REL-201911131708-g281e71d) requires ‘org.eclipse.equinox.p2.iu; org.eclipse.m2e.feature.feature.group 1.8.3’ but it could not be found

ERROR: org.eclipse.equinox.p2.director code=1 Cannot satisfy dependency:

ERROR: org.eclipse.equinox.p2.director code=0 From: artificial_root 1.0.0.v1574357450738

ERROR: org.eclipse.equinox.p2.director code=0 To: org.eclipse.equinox.p2.iu; bndtools.m2e.feature.feature.group 0.0.0

Took 6 seconds.

There are failed tasks.

Press Back to choose different settings or Cancel to abort.

How did you install eclipse and which version of eclipse did you install?

I was able to make it work, but the instructions are wrong. In the screenshot it has the version “Mars” selected and with that selection it does not work in MacOS Catalina. I selected the latest and with that it works.
The instructions should be updated as before it was saying that the latest version could not be used, I assume that people will pay attention to the version selected in the screenshot and select the same one, as I did.
I don’t know who to contact to update that. I tried to edit the page myself but I could not (for obvious reasons).

I am trying to setup the development environment to extend the Loxone binding but with the same configuration the M5 build works and the eclipse run gives an exception when connecting to the miniserver.

Exception in thread “Thread-7” java.lang.RuntimeException: Unable to invoke no-args constructor for class org.openhab.binding.loxone.internal.types.LxResponse$LxSubResponse. Registering an InstanceCreator with Gson for this type may fix this problem.

at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:226)

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:210)

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$1.read(ReflectiveTypeAdapterFactory.java:129)

at com.google.gson.internal.bind.ReflectiveTypeAdapterFactory$Adapter.read(ReflectiveTypeAdapterFactory.java:220)

at com.google.gson.Gson.fromJson(Gson.java:888)

at com.google.gson.Gson.fromJson(Gson.java:853)

at com.google.gson.Gson.fromJson(Gson.java:802)

at com.google.gson.Gson.fromJson(Gson.java:774)

at org.openhab.binding.loxone.internal.LxWebSocket.getResponse(LxWebSocket.java:318)

at org.openhab.binding.loxone.internal.LxServerHandler.connect(LxServerHandler.java:538)

at org.openhab.binding.loxone.internal.LxServerHandler.access$4(LxServerHandler.java:530)

at org.openhab.binding.loxone.internal.LxServerHandler$LxServerThread.run(LxServerHandler.java:637)

Caused by: java.lang.UnsupportedOperationException: Cannot allocate class org.openhab.binding.loxone.internal.types.LxResponse$LxSubResponse

at com.google.gson.internal.UnsafeAllocator$4.newInstance(UnsafeAllocator.java:104)

at com.google.gson.internal.ConstructorConstructor$14.construct(ConstructorConstructor.java:223)

… 11 more

I assumed that having the same conf folder contents would work the same, but there is something that I am missing. As start in the Milestone build I don’t put the smarthome.cfg file and it does not complain while in the eclipse runtime/conf it complains if it doesn’t find it (although it makes no difference).

Any idea?

What screenshot are you refering to?
Our installation instructions show

Eclipse IDE for Java Developers 2019-06

Now it does, but when I followed it one hour ago it was another screenshot.

Strange, the screenshot I am refering to is much older and I used this unstruction quite a while ago.