Netbeans IDE 13 won't create a new project on Mac - netbeans-13

I am running java 8 on my Mac, but when I try to create a new project it gives me this error saying it cannot enable Maven. I never had this problem on windows.

The Apache NetBeans 13 binary releases require JDK 11+, and officially
support running on JDK 11 and JDK 17.
Source: https://netbeans.apache.org/download/nb13/nb13.html
Therefore try to upgrade your JDK.

Related

Codename one version 1.0 is installed even though I install version 6.0 from Eclipse Marketplace

I am using Eclipse 2020-06 (I have made a fresh install of Eclipse instead of upgrading it from an earlier version of Eclipse) and JDK 8 (1.8.0_261). My OS is Windows 10.
JAVA_HOME is set to C:\Program Files\Java\jdk1.8.0_261
When I download "Codename One" plugin from Eclipse Marketplace it shows the version as 6.0 and it says "Installed" at the end of the installation process.
However, when I go to "Help -> Eclipse IDE -> Installation Details" under Eclipse, CodenameOneFeature version is listed as: 1.0.0.201409151325
When I select CodenameOneFeature from this list and hit Update, it says "No updates found". So basically I cannot force it to update to 6.0.
I can confirm that I have the earlier version installed also from the setting of the Codename One projects I create: when I go to Properties -> Java Compiler, the compliance level is set to 1.5 (also 1.5 is used in build.xml file).
BTW, I have also tried installing Eclipse 2019-06 (instead of 2020-06) and/or installing JDK 10 (instead of JDK 8) and/or modifying the eclipse.ini (by adding -vm option) so that it uses the version of JDK I want (instead of setting JAVA_HOME). But no combination of those has solved the problem.
Updated answer:
I found the problem. I broke the update site with a commit a couple of weeks ago. This should be fixed in a couple of hours once server caches refresh.
Original answer:
With Eclipse at this time we only support JDK 8. We're experiencing issues in updating the eclipse plugin to the latest version. Once installed I think you can also use JDK 11 but it doesn't matter since we don't support JDK 11 features.
Once a reasonably new version of the plugin is installed you can press update in Codename One Settings and it will update our libraries to the latest version equivalent to the other IDEs.

Solr-solj 6.5.0 in websphere 8 JDk

In the eclipse, my jre System library is WebSphere 8 JDK, I have added following files to the library:
commons-io-2.5
httpclient-4.4.1
httpcore-4.4.1
httpmine-4.4.1
jcl-over-slf4j-1.7.7
noggit-0.6
slf4j-api-1.7.7
stax2-api-3.1.4
woodstox-core-asl-4.4.1
zookeeper-3.4.6
solr-solrj-6.5.0
I have import org.apache.solr.client.solrj.impl.HttpSolrClient;, but the statement SolrClient solr = new HttpSolrClient.Builder(urlString).build(); still got error before I try to compile it. Can solr 6.5.0 run in WebSphere 8 JDK?
The solr 6.5.0 is not supported java 1.6 JDk , it can not compile.

Running app in IDE stops working

Last week I finished development on a test app and ran it successfully in all simulators.
Today I decided to look at publishing the app and used "Sent Android Build". Build status "Successful".
Then tried running jar from command line and got:
peter#PeteSuse:~> java -jar "/home/peter/NetBeansProjects/mobile-apps/pGame/dist/pGame.jar"
java.lang.ArrayIndexOutOfBoundsException: 0
at com.codename1.impl.javase.Executor$1.run(Executor.java:84)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
So tried to run from GUI and got:
run:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: javafx/embed/swing/JFXPanel
at com.codename1.impl.ImplementationFactory.createImplementation(ImplementationFactory.java:69)
at com.codename1.ui.Display.init(Display.java:566)
at com.codename1.impl.javase.Executor$1.run(Executor.java:112)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:311)
Java version:
peter#PeteSuse:~> java -version
openjdk version "1.8.0_121"
OpenJDK Runtime Environment (IcedTea 3.3.0) (suse-23.1-x86_64)
OpenJDK 64-Bit Server VM (build 25.121-b13, mixed mode)
I am using Netbeans (new to this) on Suse Linux 42.1 64b.
Have I lost a library somewhere? or something else?
Thanks guys. I fixed the problem by adding jfxrt.jar to the Libraries in NetBeans.
JFXPanel is in the JavaFX library.
See: JavaFX and OpenJDK for info on why JavaFX is not available by default in your OpenJDK distribution.
If your linux distribution makes an open JavaFX package available (like ubuntu does: Why is JavaFX is not included in OpenJDK 8 on Ubuntu Wily (15.10)?), then you can use that.
Otherwise you can build from source (for the adventurous yak shaver).
Or, easiest, is just to an Oracle Java distribution.
I don't know codenameone or have any idea how it works. Possibly whatever it is, you could ask the creators to package their thing as a self-contained application, so that it ships with a compatible Java runtime, which would (potentially) avoid issues such as you are encountering. Not knowing codenameone, I don't know if that would make sense or not.
I also don't know the cause of your original ArrayIndexOutOfBoundsException as that looks internal to codenameone or your use of it.
With regards to NetBeans, you might need to set the Java platform to one with JavaFX installed (in case you have multiple Java platforms installed on your machine).
You can run a Codename One application in the simulator by pressing the play button in the IDE. It won't work for you from Command Line and shouldn't since the app shouldn't have a main() method.
You can execute the Codename One simulator from Command Line using:
java -jar JavaSE.jar:dist/MyApp.jar
Notice this assumes your project is the working directory.

Unsupported major.minor version 51.0

I'm developing with CodenameOne in the IntelliJ IDE. When I choose "Send MacOS Desktop Build", I get this error message:
Unsupported major.minor version 51.0
My project SDK says 1.5 (Java Version 1.6.0_65)
My Language level is set to 5.0
I've done a rebuild, which should recompile everything, but I still get this error. Version 51 refers to Java 7. Can anyone tell me how to fix this?
Does your project have any 3rd party cn1libs? It is possible some of them have been compiled with Java 7.
A workaround in that case would be to change your project to use Java 8. (I think that is supported in IntelliJ, but not 100% sure). For changing the project to Java 8 there are a few settings you need to change. It is usually just easier to start a new project and check "Java 8" in the wizard. Then copy your sources over.
Please find the list of major minor version related issue.
J2SE 8 = 52,
J2SE 7 = 51,
J2SE 6.0 = 50,
J2SE 5.0 = 49,
JDK 1.4 = 48,
JDK 1.3 = 47,
JDK 1.2 = 46,
JDK 1.1 = 45
We can change the required compatible JDK Version from Configuration Page and it should work out.
This is a problem because we require a minimum of JDK 1.7 and now recommend JDK 8. You need to set IntelliJ to use that JDK and configure it to use it.
I had this issue while running cxf soap client.
Server: apache-tomcat-7.0.33
Error: java.lang.UnsupportedClassVersionError: org/apache/cxf/jaxws/JaxWsProxyFactoryBean :
Unsupported major.minor version 51.0
Resolution: Resolved this by compiling the app using jdk1.8.0_65. Earlier i was using jdk1.7.

Unbale to start tomcat 6 after RAM + JVM upgradation

I have upgraded Windows XP - PC RAM from 1GB to 3GB. Since JVM had some problem Eclipse Helios, I had to reinstall it and I did clean installation.
I have installed jdk7( jdk-7-ea-bin-b88-windows-i586-08_apr_2010.exe ).
Now my tomcat( Apache Tomcat Version 6.0.16 ) doesn't start.
Log says
java.lang.UnsupportedClassVersionError:
javax/management/MalformedObjectNameException :
Unsupported major.minor version 51.3
So I installed latest version of Tomcat i.e. Tomcat-6.0.29. Log says
java.lang.ClassFormatError:
Incompatible magic value 1853108037 in class file javax/management/MXBean
Thanks a lot for help.
Yeah it looks like Tomcat isn't compatible with JDK7 This to me says there are bugs

Resources