NetBeans 12.4 "Warning - could not install some modules: JavaFX wrapper" - java

I get the following message after exiting out of NetBeans and then re-starting.
Warning - could not install some modules: JavaFX wrapper - No module providing the capability org.openide.modules.jre.JavaFX could be found. Another module could not be installed due to the above problems.
I am using Java 15, with JavaFX. I didn't have the issue with 12.3 and Java 15, but now I get it at least once a day, depending on how often I leave and re-enter.
I have a work-around. I replace the NetBeans cache with a clean copy kept for this purpose, and I can then restart and continue working without the error, but this is a bit tedious after the first couple of times, each day.
Product Version: Apache NetBeans IDE 12.4
Java: 15.0.4; OpenJDK 64-Bit Server VM 15.0.4+5-MTS
Runtime: OpenJDK Runtime Environment 15.0.4+5-MTS
System: Windows 10 version 10.0 running on amd64; UTF8; en_AU (nb)

I have found the solution, I have re-installed, and skipped the installation of the nb-javac plugin. I had forgotten that I did this on my older installations, until I re-read the post below. Everything is fine now.
NetBeans plugin fails if nb-javac installed
What's "nb-javac" in Apache NetBeans?

Related

IntelliJ Git plugin can't seem to find Java Runtime

When trying to perform any git actions on my IntelliJ, I get the below error:
0 file committed, 11 files failed to commit: Documentation updates, error message updates
The operation couldn’t be completed. Unable to locate a Java Runtime.
Please visit http://www.java.com for information on installing Java.
Which is unusual because everything else on the editor works - the code completion, running maven, even the tests. So if I am not mistaken, IntelliJ is identifying a Java Runtime but for some reason the Git plugin is not picking it up.
Running Git in the normal terminal works fine and the application executes on the terminal. What is causing this issue?
My IntelliJ about is as follows:
IntelliJ IDEA 2020.3.3 (Community Edition)
Build #IC-203.7717.56, built on March 15, 2021
Runtime version: 11.0.10+8-b1145.96 x86_64
VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o.
macOS 10.16
GC: ParNew, ConcurrentMarkSweep
Memory: 1979M
Cores: 12
Resolved.
Turns out the issue was on the Git plugin, which did not honor the $JAVA_HOME variable on my environment. Executing Git in terminal is fine, presumably because zsh/bash is honoring Java location more explicitly, but executing through Git plugin or Github failed.
Either that Git has issues picking up Java in *nix environments where env variables are more obfuscated, or my company's terrible Mac OS estate bungled the installation. Or both.

Installing eclipse 2020-03, jdk 1.8, spring3 on macbook m1

I'm relatively new to mac os, java, eclipse,, simply everything, and all the changes that are being made due to the revolutionary apple silicon is driving me crazy.
My co-workers and I are working on a java project based on Eclipse 2020-03, jdk 1.8, spring 3. and I'm having trouble installing the environment on my Macbook M1.
First, I've tried installing the open jdk1.8 and have managed to set the PATH in .zshrc
Then I installed Eclipse 2020-03 and opened it using rosetta when it immediately crashed on me. It wouldn't even ask what workspace to open.
So I tried installing the new Eclipse 2022-06 (arm) and set jdk to 1.8. Eclipse worked fine until I tried making a new Spring MVC project when it gave me java.lang.exceptionininitializererror. I've searched for solutions to this error and only found 'upgrade your jdk' suggestions.
I decided to lower Eclipse version to 2021-12 (arm, because its the first arm supported), and install jdk11 + set Path in .zshrc (commented out jdk1.8 path). I still get java.lang.exceptionininitializererror when I try to create new spring legacy project.
tried:
Option 1. Eclipse 2020-03 (macOS x86_64) + jdk1.8 -> eclipse wont open
Option 2. Eclipse 2022-06 (AArch64) + jdk1.8 -> java.lang.exceptionininitializererror when creating spring project
Option 3. Eclipse 2021-12 (AArch64) + jdk11 -> java.lang.exceptionininitializererror when creating spring project
with option 3 above, I could open spring-mvc-project set in a different PC and worked fine. but I still want to have my problem solved.
I've thought over and came up with three ways to get these problems sorted:
Have exactly same Eclipse, jdk, spring version with my co-workers (option 1), try fixing start-eclipse problems.
-> slow since im using rosetta but i wont have compatibility problems with my co-workers
use most recent Eclipse, jdk, spring3
-> fast and have less problems but I assume I'll have tons of compatibility problems
use relatively old but apple silicon-supported Eclipse(Option 3), jdk 11
-> fast, have some compatibility problems (if I solve 'java.lang.exceptionininitializererror' problem)
My questions are:
Of the three ways listed above, which would you suggest me try?
How can I solve the problem I face when trying that particular way?
Additionl:
I couldn't find any related error on terminal, but I found this on my error log
Additions2:
I decided to install the relatively new Eclipse(2022-03), using jdk11. so far its working fine, without any compatibility issues
Unfortunately, it seems that Eclipse Adoptium / Temurin pointed to by rzwitserloot's answer either never had a JDK8 for MacOS aarch64, or has removed it. They have JDK11 and higher, but that's not what this question is about.
Eventually, I found that Azul offers a version of OpenJDK 8 compiled for MacOS ARM64 (Apple Silicon):
https://www.azul.com/downloads/?version=java-8-lts&os=macos&architecture=arm-64-bit&package=jdk
I have installed it and it seems to work fine.
java -version
openjdk version "1.8.0_345"
OpenJDK Runtime Environment (Zulu 8.64.0.19-CA-macos-aarch64) (build 1.8.0_345-b01)
OpenJDK 64-Bit Server VM (Zulu 8.64.0.19-CA-macos-aarch64) (build 25.345-b01, mixed mode)
You can get ARM mac versions of all JDKs including JDK8 from Adoptium.
Eclipse is highly backwards compatible. There is no sensible reason to use anything but the most recent stable release.
Eclipse itself runs on a JVM. There is no need for this JVM to be what your project standardized on, because any project in eclipse can be configured to run on whatever JVM you want. Thus, if it sounds like you need a newer JVM version to run eclipse on, just do that. It doesn't matter if your project won't run on that.
More generally getting an ExceptionInInitializerError is a wrapper exception. The real cause is inside it. Inspect the traces somewhat more rigorously; start eclipse from the command line (open a terminal, then run /path/to/Eclipse.app/Contents/MacOS/eclipse - now you can see the terminal output, that might help. "ExceptionInInitializerError" says almost nothing and has a billion causes. You want the exception that caused that, that'll be much more specific. It's somewhat unlikely to be related to running on an M1; very little stuff in the java ecosystem cares one iota about what chips you run it on.
More generally if rosetta is involved you're doing it wrong, there is no need for this. Everything relevant (which is really just the JVM, everything else runs on top of that) is available native.

Enable Compile on Save option in Netbeans 11

How can I enable Compile on Save in Apache Netbeans IDE 11.0?
Output of my java -version
java version "11.0.4" 2019-07-16 LTS
Java(TM) SE Runtime Environment 18.9 (build 11.0.4+10-LTS)
Java HotSpot(TM) 64-Bit Server VM 18.9 (build 11.0.4+10-LTS, mixed mode)
I tried setting:
compile.on.save=true in nbproject/private/private.properties
compile.on.save=true in nbproject/private.properties
compile.on.save.unsupported.javafx=true in nbproject/private.properties
compile.on.save.unsupported.javafx=false in nbproject/private.properties
and possible combinations of these. But not to succeed so far.
TLDR:
You need to install the nb-javac library to enable compile on save.
However, due to a NetBeans bug, you must use version 11.2 beta 3 of NetBeans for that to work.
You may be seeing this issue because you need to install the nb-javac library. To determine whether installation is necessary:
Open the Notifications window by selecting Window > IDE Tools > Notifications.
If installation is required there will be a message stating "Install nb-javac Library" in the Notifications window:
To install the nb-javac library:
Unfortunately you must use version 11.2 beta 3 (or later) of NetBeans. This is due to an unrelated problem with the installation of nb-javac.
You can download NetBeans 11.2 beta 3 from this page. The file is named netbeans-11.2-beta3-bin.zip. Just download the zip file, then unzip it in a new directory.
From version 11.2 beta 3 of NetBeans (or later), select the notification in the Notifications window.
Click the link in the right pane with the text "It is recommended to install nb-javac Library to improve Java editing experience and enable compile on save".
A wizard for installing the library will be shown:
Complete the steps in the wizard. Once installation is complete, restart NetBeans.
After restarting NetBeans you should find that:
The nb-javac library has been installed.
The Compile on Save checkbox for your project is enabled.
I could reproduce your problem in NetBeans 11.1, and I have verified that this solution worked for me.
Notes:
See Bug Report NETBEANS-2552 Fail to install nb-javac Library on NetBeans 11 for details on why you need to upgrade NetBeans to version 11.2 beta 3 to fix this issue.
If you prefer not to use a beta release, version 11.2 of NetBeans should be available very soon.
See these articles for further information on nb-javac:
"What's "nb-javac" in Apache NetBeans?".
Overview: nb-javac
The nbjavac plugin needs to be installed. See also here.

Jenkins on Windows returns unsupported JVM error when Java is updated to OpenJDK 11

I have been testing updating Oracle Java 8 to Red Hat OpenJDK Java 11 on a Windows Jenkins server, but I seem to have hit a wall. My Jenkins instance is stating that Java 11 is unsupported, returning the following error after I updated the JENKINS_HOME JRE files:
"We detected that your JVM is not supported by Jenkins. This is due to the limitation is one of the libraries that Jenkins uses, namely XStream. See this FAQ for more details."
Steps I've taken:
1. Stopped and disabled Jenkins service
2. Uninstalled Oracle Java 8 191 from control panel and removed remaining program files at Java\jdk1.8.0_191
3. Installed Red Hat OpenJDK 11.0.4 msi to Java\jdk11.0.4
4. Updated JAVA_HOME and PATH variables to point to new Java locations
5. Created JRE 11 from the JDK 11 files using all modules in JDK. Specifically I utilized this site for assistance creating the JRE. Placed JRE files on the server in the standard location, Java\jre11.0.4
5. Set Jenkins service to automatic and started it. Confirmed Jenkins site was working properly, then stopped and disabled service again
6. After backing up JENKINS_HOME, replaced the JRE folder there with the jre11.0.4 folder I created from the JDK 11 files.
7. Started Jenkins service. After navigating to the Jenkins site, I received the error message about the JVM being unsupported.
8. Stopped/disabled the Jenkins service, then updated the Jenkins.war to Jenkins 2.194 weekly release. (I was previously running Jenkins LTS 2.176.3.) Started Jenkins service, only to receive the same error.
I'm not sure how to proceed, the "Upgrading Jenkins Java version from 8 to 11" Jenkins documentation isn't much help at this point. The last step in the Upgrading Jenkins section says to "Use a package manager to install the new JVM" and to "Make sure the default JVM is the newly installed version. If it is not, use the correct java command in the Jenkins startup scripts". These instructions appear to be specific to Jenkins instances running on Linux OS. If they are for all OS types, I am unsure how to follow them in a Windows environment.
I've also reviewed Jenkins' documentation for Running Jenkins on Java 11, but didn't find any useful information there either.
And finally the FAQ hyperlink in the error message does not work, and the only information provided by this similarly named XStream site is a note stating XStream requires Java 8, which is in direct conflict with Jenkins' Java documentation that says Jenkins supports Java 8 and 11.
Any suggestions for getting any version of Jenkins to run with OpenJDK 11 or what my next steps should be here would be greatly appreciated.
Software and versions:
- Windows Server 2016
- Jenkins LTS 2.176.3
- Jenkins weekly release 2.194
- Oracle Java JDK and JRE 1.8.0.191
- Red Hat OpenJDK 1.11.0.4 and JRE created from all modules in the JDK files
So it seems I missed the following instructions in the Jenkins.xml file:
If you'd like to run Jenkins with a specific version of Java, specify
a full path to java.exe.
Another member of my team saw this and added a JAVA11_HOME environment to the Jenkins.xml file:
<env name="JAVA11_HOME" value="D:\Java\jdk11.0.4"/>
And then updated the executable path in the Jenkins.xml:
From the default:
<executable>%BASE%\jre\bin\java</executable>
To:
<executable>%JAVA11_HOME%\bin\java</executable>
Jenkins is finally up and running on Java 11!

netbeans project collapses tree menu

NetBeans project collapses tree menu, but this did not occur earlier.
Product Version: NetBeans IDE 7.4 (Build 201310111528)
NetBeans IDE NetBeans 7.4 Patch 2
Java: 1.7.0_45; Java HotSpot(TM) 64-Bit Server VM 24.45-b08
Runtime: Java(TM) SE Runtime Environment 1.7.0_45-b18
System: Windows 7 version 6.1 running on amd64; Cp1251; ru_RU (nb)
Usually for that kind of issues there is no solution. Try to report the bug to the netbeans community if it is not already reported. If you want to have a clear solution to your problem change you netbeans to an earliest version or reinstall this particular version.
PS: You should update you Java version to the latest one (1.7.0_51).
there may be some issues with the istallation processes try
1) reinstaiing
2) changing perspective mode
3) refeshing project
The problem may be with your Netbeans compatibility, because you are using 64 bit system. Your Netbeans is might be compatible with 32 bit system only. Or other possible thing is that Netbeans is not installed properly.
So to solve this problem you can do this:
Reinstall Netbeans
Search for 64 bit compatible Netbeans version, Download it, and then install it properly.
Delete your existing project and create a new project.

Categories

Resources