DEV Community

Pablo Herrero
Pablo Herrero

Posted on • Updated on

Big Sur Java MacOS users, Java problems in Big Sur? HELP

Well, yesterday I impatiently upgraded to MacOs Big sur and since then I can't use any of my IDEs (Eclipse, Netbeans, IntelliJ). They don't recognize the JDK.

I have already tried to set the JAVA_HOME variable, I have reinstalled and even formatted and done a clean installation of OS and programs ... but without success.

Searching the internet there are more people affected, although there is no clear solution.

Does anyone feel the same? Possible solution? Is this the fault of Apple, Java, or the IDE developers?


Edit to conclude:

To this day (11/17/2020), we still have no solution for NetBeans. I have finally tried IntelliJ and it works perfectly with Big Sur. I don't know whose actual responsibility is, but I think Apache is in the mood to lose users.

Discussion (18)

Collapse
oyarzun profile image
oyarzun

The workaround is to manually set the JDK path in the netbeans.conf file.

e.g. with AdoptOpenJDK 8 installed.

sudo vi /Applications/NetBeans/Apache\ NetBeans\ 12.1.app/Contents/Resources/NetBeans/netbeans/etc/netbeans.conf
Enter fullscreen mode Exit fullscreen mode
netbeans_jdkhome="/Library/Java/JavaVirtualMachines/adoptopenjdk-8.jdk/Contents/Home"
Enter fullscreen mode Exit fullscreen mode
Collapse
thorstenhirsch profile image
Thorsten Hirsch • Edited

Here's what I've found out so far:

  • If you're already using Java 15 everything works fine (tested with AdoptOpenJDK 15, installed with homebrew). Big Sur's /usr/libexec/java_home will detect Java 15 and set appropriate environment variables.

  • However /usr/libexec/java_home does not find Java 11 (tested with AdoptOpenJDK 11, installed with homebrew). Reinstall has no effect. Calling /usr/libexec/java_home -v 11 returns the path of Java 15. So yes, this seems to be broken in the shell. But IDEs with their own JDK configuration like IntelliJ are still able to use Java 11.

I haven't tried other versions than AdoptOpenJDK 11 and 15, but I guess they will behave like 11. Also note that I'm using homebrew to install all my developer tools and homebrew currently says:

Warning: You are using macOS 11.0.
We do not provide support for this released but not yet supported version.
You will encounter build failures with some formulae.
Please create pull requests instead of asking for help on Homebrew's GitHub,
Discourse, Twitter or any other official channels. You are responsible for
resolving any issues you experience while you are running this
released but not yet supported version.
Enter fullscreen mode Exit fullscreen mode
Collapse
pablohs1986 profile image
Pablo Herrero Author

Sorry, but it doesn't work .. with JDK 15 the NetBeans installer still can't find the JDK.

Collapse
Sloan, the sloth mascot
Comment deleted
Collapse
pablohs1986 profile image
Pablo Herrero Author

The truth is that it is very VERY annoying. I am lucky to have another laptop with Windows, otherwise I would be totally thrown away...

Collapse
andrewbaisden profile image
Andrew Baisden

I heard that Big Sur was causing problems with developer tools. Fortunately the download failed for me first time so it was never installed. Probably better to wait until they release a new update with bug fixes.

Collapse
vijendrahs profile image
vijendrahs

Hi Pablo,

Here is the solution for the Java issue after upgrading to Big Sur.

You need to create the symlink for the libjvm.dylib as follows (please replace the JDK version per your installation)

sudo ln -s /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/jre/lib/server/libjvm.dylib /Library/Java/JavaVirtualMachines/jdk1.8.0_251.jdk/Contents/Home/lib/libserver.dylib

Collapse
pablohs1986 profile image
Pablo Herrero Author

I've tried what you tell me, but the NetBeans installer still doesn't recognize that I have no JDK installed.

Collapse
klcollins profile image
Karen Collins

Thanks so much Pablo.

Collapse
odinrossy profile image
Gleb Remniov

I use sdkman to manage my JDKs and other java-related stuff. It works pretty good even on MacOS Big Sur. I would recommend it.

Collapse
mmesnjak profile image
mmesnjak • Edited

I also use sdkman, but I can not start jnlp files using javaws (although it is on the PATH and can be called without full path) because /usr/libexec/java_home refuses to recognize my java installation:

> /usr/libexec/java_home

The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Enter fullscreen mode Exit fullscreen mode

Any pointers how to solve that? (Big Sur 11.5.2, AdoptOpenJDK 11.0.11)

Collapse
pyrogo profile image
Valeriano Piromalli

Thanks. It fixed the issue when using Intellij.

Collapse
d_brown_7b214546a0689f1d3 profile image
D Brown

I'm having a similar problem. I can't use Oracle Forms... Java isn't recognizing the jnlp filetype. Everything worked fine until I upgraded to Big Sur last night. Anybody have any idea how I can fix this? If I try using Java Web Start from the terminal line... it does at least recognize the jnlp file... but I need to somehow reassociate the jnlp filetype. I'm not a Mac expert, this is my first so I have no clue.

Collapse
bknasmueller profile image
Bernhard Knasmueller

knasmueller.net/how-to-install-jav...
I have posted a step by step instruction on how to install and configure OpenJDK 15 for macOS Big Sur, maybe you find this helpful!

Collapse
dmahely profile image
Doaa Mahely

Sorry to hear that! Apple OS updates often come with a lot of big issues.

Collapse
mrsagarmh13 profile image
Sagar Shinde

I am also facing the issue once I updated to Big Sur. If anyone has any solution please do help.

Exception while loading the app : EJB Container initialization error
com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to start resource adapter : java.security.PrivilegedActionException: javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting LOCAL broker=MQJMSRA_LB4001: start:Aborted:Unable to ping Broker within 60000 millis (startTimeOut)
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:192)
at com.sun.enterprise.connectors.ConnectorRuntime.loadDeferredResourceAdapter(ConnectorRuntime.java:1331)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.getActiveResourceAdapter(ConnectorMessageBeanClient.java:315)
at com.sun.enterprise.connectors.inbound.ConnectorMessageBeanClient.setup(ConnectorMessageBeanClient.java:166)
at org.glassfish.ejb.mdb.MessageBeanContainer.(MessageBeanContainer.java:252)
at org.glassfish.ejb.mdb.MessageBeanContainerFactory.createContainer(MessageBeanContainerFactory.java:63)
at org.glassfish.ejb.startup.EjbApplication.loadContainers(EjbApplication.java:221)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:291)
at org.glassfish.ejb.startup.EjbDeployer.load(EjbDeployer.java:99)
at org.glassfish.internal.data.ModuleInfo.load(ModuleInfo.java:206)
at org.glassfish.internal.data.ApplicationInfo.load(ApplicationInfo.java:313)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:496)
at com.sun.enterprise.v3.server.ApplicationLifecycle.deploy(ApplicationLifecycle.java:219)
at org.glassfish.deployment.admin.DeployCommand.execute(DeployCommand.java:491)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:539)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2$1.run(CommandRunnerImpl.java:535)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$2.execute(CommandRunnerImpl.java:534)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:565)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$3.run(CommandRunnerImpl.java:557)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.Subject.doAs(Subject.java:360)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:556)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.doCommand(CommandRunnerImpl.java:1464)
at com.sun.enterprise.v3.admin.CommandRunnerImpl.access$1300(CommandRunnerImpl.java:109)
at com.sun.enterprise.v3.admin.CommandRunnerImpl$ExecutionContext.execute(CommandRunnerImpl.java:1846)
at org.glassfish.deployment.autodeploy.AutoOperation.run(AutoOperation.java:164)
at org.glassfish.deployment.autodeploy.AutoDeployer.deploy(AutoDeployer.java:597)
at org.glassfish.deployment.autodeploy.AutoDeployer.deployAll(AutoDeployer.java:484)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:412)
at org.glassfish.deployment.autodeploy.AutoDeployer.run(AutoDeployer.java:403)
at org.glassfish.deployment.autodeploy.AutoDeployService$1.run(AutoDeployService.java:233)
at java.util.TimerThread.mainLoop(Timer.java:555)
at java.util.TimerThread.run(Timer.java:505)
Caused by: com.sun.appserv.connectors.internal.api.ConnectorRuntimeException: Failed to start resource adapter : java.security.PrivilegedActionException: javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting LOCAL broker=MQJMSRA_LB4001: start:Aborted:Unable to ping Broker within 60000 millis (startTimeOut)
at com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.init(ActiveOutboundResourceAdapter.java:135)
at com.sun.enterprise.connectors.inbound.ActiveInboundResourceAdapterImpl.init(ActiveInboundResourceAdapterImpl.java:90)
at com.sun.enterprise.connectors.ActiveRAFactory.instantiateActiveResourceAdapter(ActiveRAFactory.java:141)
at com.sun.enterprise.connectors.ActiveRAFactory.createActiveResourceAdapter(ActiveRAFactory.java:108)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:210)
at com.sun.enterprise.connectors.service.ResourceAdapterAdminServiceImpl.createActiveResourceAdapter(ResourceAdapterAdminServiceImpl.java:346)
at com.sun.enterprise.connectors.ConnectorRuntime.createActiveResourceAdapter(ConnectorRuntime.java:405)
at com.sun.enterprise.connectors.service.ConnectorService.loadDeferredResourceAdapter(ConnectorService.java:184)
... 34 more
Caused by: javax.resource.spi.ResourceAdapterInternalException: java.security.PrivilegedActionException: javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting LOCAL broker=MQJMSRA_LB4001: start:Aborted:Unable to ping Broker within 60000 millis (startTimeOut)
at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.startResourceAdapter(ActiveJmsResourceAdapter.java:510)
at com.sun.enterprise.connectors.ActiveOutboundResourceAdapter.init(ActiveOutboundResourceAdapter.java:130)
... 41 more
Caused by: java.security.PrivilegedActionException: javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting LOCAL broker=MQJMSRA_LB4001: start:Aborted:Unable to ping Broker within 60000 millis (startTimeOut)
at java.security.AccessController.doPrivileged(Native Method)
at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter.startResourceAdapter(ActiveJmsResourceAdapter.java:494)
... 42 more
Caused by: javax.resource.spi.ResourceAdapterInternalException: MQJMSRA_RA4001: start:Aborting:Exception starting LOCAL broker=MQJMSRA_LB4001: start:Aborted:Unable to ping Broker within 60000 millis (startTimeOut)
at com.sun.messaging.jms.blc.LifecycleManagedBroker.start(LifecycleManagedBroker.java:436)
at com.sun.messaging.jms.ra.ResourceAdapter.start(ResourceAdapter.java:365)
at com.sun.enterprise.connectors.jms.system.ActiveJmsResourceAdapter$1.run(ActiveJmsResourceAdapter.java:501)
... 44 more
Caused by: java.lang.RuntimeException: MQJMSRA_LB4001: start:Aborted:Unable to ping Broker within 60000 millis (startTimeOut)
at com.sun.messaging.jms.blc.LocalBrokerRunner.start(LocalBrokerRunner.java:366)
at com.sun.messaging.jms.blc.LifecycleManagedBroker.start(LifecycleManagedBroker.java:434)
... 46 more
|#]

Collapse
d_brown_7b214546a0689f1d3 profile image
D Brown

So what is the solution to run Oracle thin forms? It's also jnlp files...

Collapse
gabrielpramos profile image
Gabriel Pereira Ramos

I resolved the problem I had with JAVA_HOME setting the variable by myself
this link may help you.
sajeconsultants.com/how-to-set-jav...