How to build Installers for java7 - netbeans-8

I have Netbeans Platform Application project. I have to build installers for all supported platforms, with using nbi. It should be built on Java8 and works on Java7.
my error is, when I try to install my application to machine with only java7
java.lang.UnsupportedClassVersionError: com/apple/eawt/ApplicationListener :
Unsupported major.minor version 52.0
I figured out that nbi.engine should rebuild with javac.target=1.7 but netbeans does not contain that sources.
Can you help me, how to download nbi.engine sources?

Related

Gradle sync fails when creating a new Kotlin project with default settings in freshly installed IntelliJ IDEA

I wanted to learn some Kotlin so I installed IntelliJ IDEA, created a new Kotlin project with the default settings and then the IDE tells me that Gradle sync has failed. Here's the error message:
Could not open init generic class cache for initialization script 'C:\Users\<my_name>\AppData\Local\Temp\wrapper_init.gradle' (C:\Users\<my_name>\.gradle\caches\6.8\scripts\344chmz69zyndatc9zp4rwux5).
> BUG! exception in phase 'semantic analysis' in source unit '_BuildScript_' Unsupported class file major version 60
I googled the error and got a suggestion to try a different JDK version. Tried a few different versions but that didn't help. Then I installed the IDE on my laptop to see if that works and there I don't get any errors. As far as I can tell, the project settings were exactly the same on both machines but obviously something is messed up on my desktop computer. Both have Windows 10.
I'm also not at all familiar with the Java/Kotlin ecosystem or the build tools or whatever so I honestly have no idea how I could even begin fixing some Gradle errors. I don't really even know what Gradle is or what it does. So can you help me?
First, check the version which the project uses: File > Project Structure. Or, during project creation (https://i.stack.imgur.com/SXIzQ.png / example with SDK 1.8)
It has to be the same as JDK / SDK installed on your computer.
To verify java version installed in your terminal:
java -version
openjdk version "1.8.0_252"
OpenJDK Runtime Environment (build 1.8.0_252-8u252-b09-1~19.10-b09)
OpenJDK 64-Bit Server VM (build 25.252-b09, mixed mode)

Is jboss 4.2.2 GA compatible with java 11?

We have a product that is running fine with JBoss 4.2.2/java 7.
We are now moving to JDK 11. simply added java 11 in the classpath and tried starting the server.
Encountered below error
OpenJDK 64-Bit Server VM warning: Ignoring option MaxPermSize; support was removed in 8.0
-Djava.endorsed.dirs=C:\PathBuilder\GE\EMEA\vp\jboss\lib\endorsed is not supported. Endorsed standards and standalone APIs in modular form
will be supported via the concept of upgradeable modules.
removed below configurations from run.bat and started the server again
-XX:MaxPermSize=128m
"-Djava.endorsed.dirs=%JBOSS_ENDORSED_DIRS%"
now getting below error and which is
interrupting the ear deployment Caused by:
java.lang.ClassNotFoundException: No ClassLoaders found for:
org.omg.CORBA.Object
Is Java 4.2.2 compatible with JDK 11 or we need to update JBoss to 7.2 or latest versions?
can someone help with this or provide related links?
JBoss 4.2 is a very old and outdated version and it only tested with JDK 1.5 and 1.6 version. If you are upgrading your JDK to 11 then you should update the JBoss to 7.3 version which is the latest available GA release from Red Hat.
You can download the jdk files of older versions like jdk6 and then replace JAVA path in the jboss run file from "set JAVA=%JAVA_HOME%\bin\java" to
"set JAVA=C:\Users\jdk1.6.0_45\bin\java"
Of course it's better to upgrade to a higher JBoss version... But in case that's not possible, you can avoid the ClassNotFoundException for org.omg.CORBA.Object by placing rt.jar from Java 8 in your JBoss-libs folder.
With this configuration you can run older JBoss versions with Java 11.

Error installing PMD on Eclipse Version: 2020-06 (4.16.0)

I recently upgraded to Eclipse Version: 2020-06 (4.16.0) on Windows 10.
My java version is "14.0.1" 2020-04-14
After the upgrade, I attempted to install Eclipse-PMD 2.0 from the Marketplace ( help / Eclipse Marketplace / etc. ) ...I receive the error(s):
Cannot complete the install because some dependencies are not
satisfiable Software being installed: a.jre.javase 14.0.0 Software
being installed: Eclipse PMD Plug-in 2.0.0.202006052026
(ch.acanda.eclipse.pmd.feature.feature.group 2.0.0.202006052026)
Cannot satisfy dependency:
From: Eclipse PMD Plug-in 2.0.0.202006052026 (ch.acanda.eclipse.pmd.feature.feature.group 2.0.0.202006052026)
To: org.eclipse.equinox.p2.iu; ch.acanda.eclipse.pmd.java.feature.feature.group
[2.0.0.202006052026,2.0.0.202006052026] Cannot satisfy dependency:
From: eclipse-pmd Java 2.0.0.202006052026 (ch.acanda.eclipse.pmd.java 2.0.0.202006052026)
To: osgi.ee; (&(osgi.ee=JavaSE)(version=11)) Cannot satisfy dependency:
From: eclipse-pmd Java Support (Optional, JDT Prerequisite) 2.0.0.202006052026 (ch.acanda.eclipse.pmd.java.feature.feature.group 2.0.0.202006052026)
To: org.eclipse.equinox.p2.iu; ch.acanda.eclipse.pmd.java [2.0.0.202006052026,2.0.0.202006052026]
Does anyone have an idea(s) as regards the source of the issue ...if all else fails I may try building the PMD source from the github repo ( https://github.com/eclipse-pmd/eclipse-pmd ) but I cannot imagine why this should be necessary.
I created eclipse-pmd and I can install eclipse-pmd 2.0 from the marketplace with Java 14 and Eclipse 2020-06 without any problems.
From the error message you provided it looks like there are two missing dependencies:
ch.acanda.eclipse.pmd.java requires (&(osgi.ee=JavaSE)(version=11))
several plugins require org.eclipse.equinox.p2.iu and ch.acanda.eclipse.pmd.java
The first issue indicates that you do not run Eclipse with Java 11+. Check the Java version by opening the "Installation Details" dialog: Help > About Eclipse IDE > Installation Details > Configuration. Then look for the system property java.version. If it shows a version lower than 11, then you need to configure Eclipse to run with Java 11+.
The second issue looks like a subsequent error. Since ch.acanda.eclipse.pmd.java couldn't be installed, all plugins that depend on this plugin cannot be installed either. Why org.eclipse.equinox.p2.iu is also mentioned in the error message is unclear to me since eclipse-pmd does not (directly) depend on this plugin and it should be a plugin installed by default in Eclipse.
If this does not fix your problem, then please open a new issue on Github as it is easier to help with problems like this on Github than on Stack Overflow.
You need to run Eclipse with a Java 11 JRE. This is normally done by insuring you have JAVA_HOME set to Java 11, and JAVA_HOME in your path. Alternatively, you can modify eclipse.ini and specify Java 11 as the vm (How to run Eclipse with different Java version?).

"Unsupported major.minor version 51.0" in Netbeans

I know that the title is almost identical to other questions, but, I've not been able to resolve my problem with those answers.
This is the problem:
I have 2 almost identical projects (one has been cloned from the other with mercurial) and some changes have been made.
After the last pull from the original project, the following error appears when I try to run the project. I know that means that the project is being compiled with java7 and run with java6.
Exception in thread "main" java.lang.UnsupportedClassVersionError: com/[...]/Start : Unsupported major.minor version 51.0
The original project keeps running normally.
It runs if I change the Java Platform in the project properties to java7, but I need the project to run on java6, so that's not an option.
Product Version: NetBeans IDE 7.2 (Build 201207171143)
Java: 1.6.0_35; Java HotSpot(TM) 64-Bit Server VM 20.10-b01
System: Linux version 3.2.0-32-generic running on amd64; UTF-8; en_US (nb)
Thanks for your help!
You can add more than 1 jdk to your environment and you can decide which one to use. try to add the jdk 6 and compile it based on that.

Mono on Fedora mscorlib cant install gtk-sharp-2.12.11

When I compile a simple web application on my machine it works without problems.
However when I publish to the server always gives me the following error:
Could not load type 'System.Collections.Generic.Dictionary `2' from assembly 'mscorlib, Version = 4.0.0.0,
In my local machine I have the following directory that does not exist on the server:
/usr/lib/mono/4.0/
I've tried to install gtk-sharp-2.12.11 but in the end gives the following error:
Requested 'gtk + -2.0> = 2.12.0' but version of GTK + is 2.10.4
Please help me
Thanks
Paulo Santos
The gtk# binding, in its version 2.12, simply depends on gtk+ version 2.12.
You need to upgrade your Fedora if you want to use that version.
However, take in account that the gtk platform is only useful for desktop development, not web development, so I think you're mixing things up.
Try installing the "dmcs" compiler in Fedora. (You may have a very old version of Mono that doesn't include this 4.0-profile compiler, what version of Mono do you have installed?)