NetBeans Not Working, New Projects On Linux - java

I installed Netbeans today, and downloaded java JDK yesterday.
When i try to create a new project it douse nothing. I checked if i have java JDK in the terminal by typing
#Terminal
java -version.
#Output
openjdk version "10.0.2" 2018-02-17
openJDK Runtime Environment (build 10.0.2+13-Debian-1)
openJDK 64-bit Server VM (build 10.0.2+13-Debian-1, mixed mode)
I have:
#NetBans File
netbeans-8.2-linux.sh
#Java JDK
jdk-11.0.1_linux-x64_bin.tar.gz

Netbeans 8.2 isn't compatible with Java 10. Download the latest version. The support to Java 9 and 10 was added in Netbeans 9. You can see more here:
http://netbeans.apache.org/download/nb90/

Related

Ubuntu 18 downgrade openjdk 8 version

Hello I'm using Ubuntu LTS 18.04 and my java version is
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (build 1.8.0_275-8u275-b01-0ubuntu1~20.04-b01)
OpenJDK 64-Bit Server VM (build 25.275-b01, mixed mode)
I want to downgrade 1.8.0_275 to 1.8.0_265 how can ı do this ?
You need to download a zip with the version you are looking,unzip the content and add the path to the bin folder in your PATH environment, here is a repo with the oldest you mention:
https://github.com/AdoptOpenJDK/openjdk8-binaries/releases/tag/jdk8u265-b01
Also I'll recomend you to use https://sdkman.io/
And if you download a version that loses support is still listed in your machine and you can change your version easily.

Eclipse: "Could not find Java SE Runtime Environment"

I have just downloaded Eclipse and tried to run it, and it gave me this error message:
Error: opening registry key 'Software\JavaSoft\Java Runtime Environment
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment.
After closing the errors, it sends me to this site:
https://download.eclipse.org/oomph/jre/?vm=1_1_8_0_64_0&pn=Eclipse%20Installer&pu=http://wiki.eclipse.org/Eclipse_Installer&pi=http://download.eclipse.org/oomph/jre/128x128.png
I have already reinstalled the jdk multiple times.
After following some other posts i saw, i have also made sure that %JAVA_HOME% was included in PATH
(%JAVA_HOME% = C:\Program Files\Java\jdk-13.0.1)
to java -version i got:
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
Thank you in advance for the help!
Edit:
I had both jdk-13.0.1 and jre 1.8.0 installed
After reinstalling only jdk 13.0.1 (and uninstalling jre 1.8.0), java -version gave me:
java version "13.0.1" 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
I'm using Windows 10 Pro
EclipseIDE 2019-12 64bit
According to this answer maybe you messed up with your registry, make sure all java removed first and reinstall JRE.
For me if I want to develop java apps, I would install JDK instead of JRE, after install pls check java & javac command exist
'Software\JavaSoft\Java Runtime Environment
Error: could not find java.dll
Error: Could not find Java SE Runtime Environment. After closing the
errors, it sends me to this site:
https://download.eclipse.org/oomph/jre/?vm=1_1_8_0_64_0&pn=Eclipse%20Installer&pu=http://wiki.eclipse.org/Eclipse_Installer&pi=http://download.eclipse.org/oomph/jre/128x128.png
I have already reinstalled the JDK multiple times. After following some other posts I saw, I have also made sure that %JAVA_HOME% was included in PATH (%JAVA_HOME% = C:\Program Files\Java\jdk-13.0.1)
to java -version I got:
java version "1.8.0_231"
Java(TM) SE Runtime Environment (build 1.8.0_231-b11)
Java HotSpot(TM) 64-Bit Server VM (build 25.231-b11, mixed mode)
Thank you in advance for the help!
Edit:
I had both jdk-13.0.1 and jre 1.8.0 installed
After reinstalling only jdk 13.0.1 (and uninstalling jre 1.8.0), java -version gave me:
java version "13.0.1" 2019-10-15
Java(TM) SE Runtime Environment (build 13.0.1+9)
Java HotSpot(TM) 64-Bit Server VM (build 13.0.1+9, mixed mode, sharing)
I'm using Windows 10 Pro
EclipseIDE 2019-12 64bit
share edit
asked
1 hour ago
Csalagovits Máté
1●11 bronze badge edited
5 secs ago
One thing I noticed is the JAVA_HOME path refers to JDK 13, while the "java -version" command points to 1.8. Specify the version of Windows and Eclipse you have used in this question. Also, make sure you restart the PC after installing Java. – Shankar P S 52 mins ago
#ShankarPS Edited the question to adress your concerns – Csalagovits Máté 2 mins ago

The package is accessible from more than one module problem under VSCode only

I have a project which builds fine under gradle as well as in the IntelliJ IDE run configuration.
But it gives a problem in the VSCode IDE:
The package javax.crypto is accessible from more than one module
The are no module-info.java file in the entire project.
The modules listed are:
~/Desktop/dev/projects/pid2 % java --list-modules
java.*
jdk.*
The VSCode home setting for the JDK is:
"java.home": "/Users/stephane.eybert/.sdkman/candidates/java/current",
and it is the version:
~/Desktop/dev/projects/pid2 % /Users/stephane.eybert/.sdkman/candidates/java/current/bin/java -version (master)pid2
openjdk version "11.0.2" 2019-01-15
OpenJDK Runtime Environment 18.9 (build 11.0.2+9)
OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)
I tried with changing the JDK so as to use the same one as IntelliJ is using, but the problem remained the same.
The IntelliJ JDK version is:
~/Desktop % /Applications/IntelliJ\ IDEA.app/Contents/jbr/Contents/Home/bin/java -version
openjdk version "11.0.4" 2019-07-16
OpenJDK Runtime Environment (build 11.0.4+10-b304.77)
OpenJDK 64-Bit Server VM (build 11.0.4+10-b304.77, mixed mode)
The VSCode version is:
Version: 1.40.0
Commit: 86405ea23e3937316009fc27c9361deee66ffbf5
Date: 2019-11-06T17:09:34.601Z
Electron: 6.1.2
Chrome: 76.0.3809.146
Node.js: 12.4.0
V8: 7.6.303.31-electron.0
OS: Darwin x64 19.0.0
For me the issue is on java.util package.
In each java project there will be .settings folder created by vscode, in that folder open org.eclipse.jdt.core.prefs file, change the org.eclipse.jdt.core.compiler.compliance option from 11 to 1.8 and clean workspace
or
Changing the maven-compiler-plugin source and target to 1.8 worked for me.
Both the ways worked for me.

What is the source of the discrepancy in Java versions: Java 6 (in Terminal, Eclipse) and Java 7 (in Java Control panel)?

Eclipse complains: JRE version is 1.6.0; version 1.7.0 or later is needed to run Google Plugin for Eclipse.
In the Terminal, java concurs:
> java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
But in System Preferences \ Java \ the Java Control Panel says Your system has the recommended version of Java: Java 7 Update 51
and points to /Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java.
Eclipse preferences show that the installed JRE is at:
/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home
To point Eclipse to Java 7 (1.7.0), it's enough to change the preference:
What is the source of the discrepancy in Java versions? Is this an instance of having different PATHs between the command-line Mac and the windowed-Mac?
Edit
If I edit /usr/local/adt-bundle-mac-x86_64/eclipse/Eclipse.app/Contents/MacOS/eclipse.ini by adding
-vm
"/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java"
Eclipse refuses to start.
And yet this is indeed 1.7:
> "/Library/Internet Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java" -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.51-b03, mixed mode)
If you want to be certain of the JVM that is used to run Eclipse, you need to specify it in your eclipse.ini file, according to these instructions.
Installing this update might fix your problem:
http://support.apple.com/kb/dl1572

Can't run webapp on Tomcat, Error 51, although java -version is correct, Mac OS X

I installed Java 7 on my Mac, compiled a web-app, and now I am trying to run it on Tomcat. However, I get the nasty Unsupported major.minor version 51.0 error. Googling showed that it is because Tomcat is using Java 6 to run the app, which is compiled for Java 7.
So I tried setting the path to the Java 7 jre in my "catalina.sh" script, but it didn't help. Moreover, "java -version" returns the correct java version.
dtv$ java -version
java version "1.7.0_10"
Java(TM) SE Runtime Environment (build 1.7.0_10-b18)
Java HotSpot(TM) 64-Bit Server VM (build 23.6-b04, mixed mode)
How can I fix this?
Try setting JAVA_HOME environment variable to point to your JDK 7. Catalina expects to find Java there. See if that tells it how to get JDK 7.

Categories

Resources