ide-probe
ide-probe copied to clipboard
Fix running ideprobe on macos
ide-probe was designed to run on linux, running on mac causes
[intellij-stderr] java.lang.NoClassDefFoundError: com/apple/eawt/OpenURIHandler
[intellij-stderr] at com.intellij.ui.mac.MacOSApplicationProvider.initApplication(MacOSApplicationProvider.java:57)
[intellij-stderr] at com.intellij.idea.ApplicationLoader.startApp(ApplicationLoader.kt:152)
[intellij-stderr] at com.intellij.idea.ApplicationLoader.executeInitAppInEdt(ApplicationLoader.kt:68)
[intellij-stderr] at com.intellij.idea.ApplicationLoader.access$executeInitAppInEdt(ApplicationLoader.kt:1)
[intellij-stderr] at com.intellij.idea.ApplicationLoader$initApplication$1$1.run(ApplicationLoader.kt:374)
[intellij-stderr] at java.desktop/java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:313)
[intellij-stderr] at java.desktop/java.awt.EventQueue.dispatchEventImpl(EventQueue.java:770)
[intellij-stderr] at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:721)
[intellij-stderr] at java.desktop/java.awt.EventQueue$4.run(EventQueue.java:715)
[intellij-stderr] at java.base/java.security.AccessController.doPrivileged(Native Method)
[intellij-stderr] at java.base/java.security.ProtectionDomain$JavaSecurityAccessImpl.doIntersectionPrivilege(ProtectionDomain.java:85)
[intellij-stderr] at java.desktop/java.awt.EventQueue.dispatchEvent(EventQueue.java:740)
[intellij-stderr] at java.desktop/java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:203)
[intellij-stderr] at java.desktop/java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:124)
[intellij-stderr] at java.desktop/java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:113)
[intellij-stderr] at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:109)
[intellij-stderr] at java.desktop/java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:101)
[intellij-stderr] at java.desktop/java.awt.EventDispatchThread.run(EventDispatchThread.java:90)
We should inspect how intellij is started on mac normally, that the missing class appears on classpath. It might be just a different launcher or we may need to download dmg files.
@lukaszwawrzyk In my case running ide-probe
succeeds when running tests on the git-machete-intellij-plugin
locally. MacOs with M1 Pro chip using the OpenJDK version 11.0.16. Can you specify the situation, when such error occured? What JDK was used? Was it also on the mac with M1 chip or on an older one? When does such error occur - local tests on the ide-probe
(sbt test
) or maybe when running tests on a project that uses ide-probe
in tests?
In my case, I am not able to run sbt test
successfully on my machine (https://github.com/VirtusLab/ide-probe/issues/238) but it looks like a different issue.
The original issue seems to be related to what's the underlying JDK: https://stackoverflow.com/questions/46722665/noclassdeffounderror-and-nullpointerexception-when-opening-a-project-with-phpsto
Yeah, similar bug described here: https://github.com/t-oster/VisiCut/issues/488 - also looks like an issue with some older releases of JDK?