AlternativeJREPanel deprecated - throws IllegalArgumentException in Idea version 15


I'm looking into fixing the SBT plugin for intellij 15. The problems seems to be that the AlternativeJREPanel no longer works. Specifically I see this stacktrace:

Exception in thread "main" java.lang.IllegalArgumentException: Argument for @NotNull parameter 'componentManager' of com/intellij/openapi/components/ServiceManager.doGetService must not be null
 at com.intellij.openapi.components.ServiceManager.doGetService(
 at com.intellij.openapi.components.ServiceManager.getService(
 at com.intellij.openapi.projectRoots.ProjectJdkTable.getInstance(
 at com.intellij.execution.ui.AlternativeJREPanel.<init>(
 at net.orfjackal.sbt.plugin.settings.SbtSettingsForm.<init>(
 at net.orfjackal.sbt.plugin.settings.SbtSettingsForm.main(
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(
 at java.lang.reflect.Method.invoke(
 at com.intellij.rt.execution.application.AppMain.main(

I note that this class is deprecated but I couldn't find anywhere which I should use instead.

What's the best way to tackle this? Is there an alternative component - or would I need to write one from scratch?


Please sign in to leave a comment.