Netbeans in Ubuntu - Click in "New Project" and nothing happens - java

In Netbeans IDE 8.2, I click in "New Project" and no window shows up.
The same happens when I click in "New File" (But I guess it is because there is no project open).
What could it be?
I installed Netbeans downloading .sh from the official website and running sudo chmod +x <netbeans.sh>.
I use Ubuntu 14.04.

I encounted the same problem when I installed Netbeans 8.2 in Linux Mint 18.
From Netbeans log View > IDE, it reported this error which appears to be a known problem (Bug 258945 - ClassNotFoundException: javax.activation.DataContentHandlerFactory). I noticed the keyword specified for this issue is JDK_9.
SEVERE [global]
java.lang.ClassNotFoundException: javax.activation.DataContentHandlerFactory
at jdk.internal.loader.BuiltinClassLoader.loadClass(java.base#9-ea/BuiltinClassLoader.java:366)
I went in and changed netbeans_jdkhome entry in /usr/local/netbeans-8.2/etc/netbeans.conf from java-9-oracle to java-8-oracle
netbeans_jdkhome="/usr/lib/jvm/java-8-oracle"
This fixed it for me.

Appending
-J--add-modules=java.se.ee
to netbeans_default_options within etc/netbeans.conf fixes the issue.

I saw a solution to this problem in another thread. I was having the same problem as you. The problem you mention is with Ubuntu, but it will work for Windows as well.
The problem is just that the JDK is not compatible with the netbeans (I used version 9). It works once you reinstall Netbeans and use an older version of JDK (I use version 8).

Related

"Cannot run program "cmd"" java maven quote [duplicate]

I've a fresh install of netbean 11.1.
Now I'm trying to build a project but I get the following error output:
Cannot run program "cmd" (in directory "C:\projects\open"): Malformed
argument has embedded quote: "C:\Program
Files\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd"
cd C:\projects\open; "JAVA_HOME=C:\\Program Files\\Java\\jdk-11.0.5" cmd /c "\"\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven\\bin\\mvn.cmd\" -DskipTests=true -Dmaven.ext.class.path=\"C:\\Program Files\\NetBeans-11.1\\netbeans\\java\\maven-nblib\\netbeans-eventspy.jar\" -Dfile.encoding=UTF-8 clean install\"" Cannot run program "cmd" (in directory "C:\projects\open"): Malformed argument has embedded quote: "C:\Program Files\NetBeans-11.1\netbeans\java\maven\bin\mvn.cmd" -DskipTests=true -Dmaven.ext.class.path="C:\Program Files\NetBeans-11.1\netbeans\java\maven-nblib\netbeans-eventspy.jar" -Dfile.encoding=UTF-8 clean install
I've build this project with netbeans 11.1 before but have a new pc.
and a fresh install, tho I'm sure there was no problem last time I tried to install everything.
Although this problem can be fixed by installing jdk1.8.0_221, but actually you don't need to downgrade your JDK. Just try these:
First exit netbeans IDE if it's open, then open netbeans configuration file from here: netbeans-Install-Dir/etc/netbeans.conf
(Note: for me netbeans-Install-Dir is C:\Program Files\NetBeans 8.2\etc)
Add the below arguments
-J-Djdk.lang.Process.allowAmbiguousCommands=true
to the beginning of the string that you find at this line:
netbeans_default_options="-J-client -J-Xss2m -J-Xms32m ......."
Sample screenshot as shown below:
4. Save the change and start your netbeans IDE.
I have checked the release notes for JDK 13.0.1 at https://www.oracle.com/technetwork/java/javase/13-0-1-relnotes-5592797.html#JDK-8221858
This behavior is a regression from a security fix for JDK-8221858 (not public). Follow the link for a full description. The fix is part of JDK 8u231, JDk 11.0.5, 13.0.1 etc.
To resolve this problem, append -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options in <netbeans-dir>\etc\netbeans.conf.
I had this error with adopt8-hotspot (AdoptOpenJDK-1.8.0_232-b09) and sbt-0.13.X for an old project.
Problem solved after setting the environment variable in windows via
set JAVA_TOOL_OPTIONS=-Djdk.lang.Process.allowAmbiguousCommands=true
Did you by any chance install the latest critical update for java? jdk 1.7_241? I installed that today and was having the exact same problem. I downgraded my jdk version and it solved it completely.
EDIT: Apologies, I noticed you're using netbeans 11.1 so you probably have a later java version, in any case, you could try downgrading your java version to a previous release if you happened to update it today as the other version might have the same problem.
At the time that I'm writing, I had only JDK13 installed only on my machine. After unzipped my netbeans I've got the same problem with the internal maven of my netbeans 11.1.
Apparently netbeans 11.1 does not work properly with the JDK13. I just installed the JDK 8 and the problem now is solved, without any additional configuration or parameter change.
Nontheless, since I need the JDK13, I have both installed but my netbeans.conf file is pointing to JDK8. Later, you can define the new Java platform in netbeans project configuration.
I hope this might help.
Cheers!
just add -J-Djdk.lang.Process.allowAmbiguousCommands=true to netbeans_default_options in netbeans.conf
It seems to happen with all recently released jdk version (11.0.5 and 13.0.1 at least), even with the latest Netbeans 11.2vc1 (and witnessed on NB 11.1 too).
Downgrade your jdk to 11.0.4 or 13.0.0. It fixed the issue for me
The problem also occurs in version jdk-8u231. Fixing installing jdk-8u221 version
Apache NetBeans 11.1 does indeed not support JDK 13, that's what the upcoming Apache NetBeans 11.2 is for -- latest beta: bit.ly/apache-netbeans-11-2-beta-3
I had the same problem with oracle jdk 13.0.1 and netbeans 11.1, but it worked for me with openjdk 13.0.1 (https://jdk.java.net/13/).

JetBrains IntelliJ Error launching Intellij Platform - Error invoking main method

I have IntelliJ IDEA and other JetBrains products installed and they worked great (PyCharm, Android Studio, Clion, WebStorm) till today, now I just get opening message:
Error launching Intellij Platform - Error invoking main method
I have installed:
C:\Program Files\Java\jdk1.8.0_25
C:\Program Files\Java\jre1.8.0_25
and JAVA_HOME is pointing to jdk.
I posted at: https://devnet.jetbrains.com/message/5533036#5533036 and https://devnet.jetbrains.com/thread/459951
I installed (clean) Windows 8.1 and now it works, but there should be option to wipe all java configs from Windows to avoid such mess, cause this is not the solution.
I meet this error today. Java update message jump out when I work with AndroidStudio. I accept it but my AS can't display res files after installation. I restart AS and see the error.
I guess new version java produce the error. The updated java part is jre, version is 1.8.0_101, but jdk's version is still 1.8.0_92. So I download and install new version jdk(1.8.0_101, the same as jre).
AndroidStudio successfully starts now.
Maybe this solution can also work to IDEA.
For people who couldn't solve it by having the same version of JDK and JRE.
Uninstall IntelliJ and also clean all the files that are not swept automatically by uninstalling. you can find them in C:\Users\Usuario\AppData on Local and LocalLow find the JetBrains folder and delete all the files related to IntelliJ.
Then proceed to reinstalling it. That solved it for me.

Getting eclipse to use Java 1.7

I'm running Mac OS X 10.9.1 (Mavericks). I was having a problem getting eclipse kepler to recognize Java 1.7 (u45), which I installed from the Oracle site. System Preferences clearly pointed to this version but eclipse couldn't find it.
I reinstalled Mavericks then installed the latest version of Java (051) from Oracle. Then started kepler and got the following popup:
After searching for a solution and not finding one, I tried a backup version of eclipse: juno. Now I get his popup:
Which takes me to Apple software update, which runs successfully.
Now juno starts ok but with kepler, I get:
And I'm back where I started.
How do I get out of this loop?
My first guess is that installing the Apple Java messed up the Oracle installation. Try reinstalling that one.
Secondly you probably need to get Eclipse to use Oracle's JDK at startup. You can do that from the command line using the "-vm" parameter or patch the JDK's Info.plist as described in this post Eclipse Kepler for OS X Mavericks request Java SE 6.
So I went for the nuclear option. I trashed kepler and got a fresh download. Then installed the Google jdks and plugin. Eclipse now recognized my java 1.7 install and Google plugin happily deploys my code.
I'm glad to be back up an running but disappointed that I didn't learn what went wrong in the first place.

Not able to run spoon.bat or any other batch file in Pentaho Data Integration (Kettle)

Tried pdi-ce-4.1.0-stable and pdi-ce-4.2.0-stable
My Machine - Windows 7 64 bit
When I run Spoon.bat cmd line window appears and disappears and then nothing happens.
When I tried to run it from command line, I get
DEBUG: Using JAVA_HOME
DEBUG: _PENTAHO_JAVA_HOME=C:\Program Files\Java\jdk1.5.0_22
DEBUG: _PENTAHO_JAVA=C:\Program Files\Java\jdk1.5.0_22\bin\javaw
C:\pentaho\data-integration>start "Spoon" "C:\Program
Files\Java\jdk1.5.0_22\bin \javaw" "-Xmx512m" "-XX:MaxPermSize=256m"
"-Djava.library.path=libswt\win64" "-D KETTLE_HOME="
"-DKETTLE_REPOSITORY=" "-DKETTLE_USER=" "-DKETTLE_PASSWORD=" "-DKE
TTLE_PLUGIN_PACKAGES=" "-DKETTLE_LOG_SIZE_LIMIT=" -jar
launcher\launcher.jar -li b ..\libswt\win64
But then again the PDI GUI doesn't open. I have run the same on another 32 bit machine and it runs perfectly.
Their are few things which are not supportable by jdk which are 1.6 or lower then that, try to download jsk 1.7 and configure it may be your problem will solved, because i faced few errors in the past which are because of lower version of jdk.
I know it is an old commend, but maybe this can help someone.
you just need to replace all "JAVAW" to "JAVA", inside the .bat file.
It worked for me.
tks.
There seem to be a few folders missing when downloading community edition vs installing EE. Try to install both, and take the "ui" folder from EE and copy it to the CE folder. Running spoon.bat should work now. This worked for me, hope it helps.
I had the same problem yesterday with the same message after updating Java 7 Update 55.
Kettle: pdi-ce-5.0.1.A-stable
Windows 7 32 bits
Solved: I set the PENTAHO_JAVA_HOME variable to jr6 and now the spoon.bat opens.
Thanks for posting the problem and for all the hints above. I was using latest version of spoon with an older version of Java. when I ran spoon.bat in command line without the start.. it told me that the class file major.minor version is not supported. I installed latest version of Java (X64) and pointed my JAVA_HOME folder to the new folder and here you go... In my case the folder path was "C:\Program Files\Java\jre1.8.0_111". I copied UI folder too from EE to CE.
If you are using latest version of spoon then use the latest version of Java. I needed to add JAVA_HOME or JAVA_JRE variable pointing to the java's latest version folder on my system.

Eclipse crashes at startup; Exit code=13

I am trying to work with Eclipse Helios on my x64 machine (Im pretty sure now that this problem could occur with any eclipse) but it just doesn't cooperate.
When I try to run eclipse I get the following:
I have installed
Helios EE x64 (latest version)
JDK 1.6.025 (x64)
I have linked my Environment Variables up correctly and tried to compile a Java file through cmd and have succeeded.
Whenever I tried running eclipse i get exit code=13 (required java version=1.5)
I tried running the following in cmd:
-vm "mypath\jdk1.6.025\jre\bin"
command as forums suggested
as well as other paths
-vm "mypath\jdk1.6.025\bin"
-vm "mypath\jdk1.6.025\jre\bin\javaw.exe"
even
-vm "mypath\jre6\bin" out of desperation
to no avail.
I am all out of ideas and I wonder if anybody had this problem. I even downloaded the helios x86 version and x86 JDK version yet it did not fix the problem. (I changed the environment variables)
I changed everything back but I'm stuck...
Related Question: Cannot Run Eclipse
It turns out that a directory had an ! in its name and eclipse had a problem with that.
Once I switched the directory (from Desktop which is located in the user directory which had ! in it to C:/ ) everything worked fine. (look at the Djava.class.path in the image located in my the question above for the whole path - it should make it clear what the problem was)
Vista allows you to create a username that contains ! character and then a lot of programs have issues with it
Update
If somebody is still getting this problem even though their path is ok I suggest
trying to look at the Environment Variables
then try uninstalling the Helios EE ( or any other version of ee you are running ) and JDK and then reinstalling the 86x versions of both (they should still work on the 64x platform).
for further explanation look here
Thank you everybody that tried to help
Please, check that your have downloaded the x64 version. ;)
And your installed Java, is x86. Use Eclipse x86 if you use Java x86.
Because your eclipse's env-arch was not matched with java-arch, for instance: eclipse-64bit run in java-32bit or vice versa.
In Windows: Set correct env path to the specific 32 or 64bit java acording to eclipse.
In Linux:
Try run: [path-to-eclipse]/eclipse -vm [jdk-path]/bin
What version of java is on your path when you start eclipse? Try entering java -version on a command prompt. You will want Sun java 1.5 or higher. See http://www.ehow.com/how_4784069_terminated-exit-code-error-eclipse.html
This turned out to be a permissions error for me. I change the kepler folder, eclipse root directory to have permissions set to everyone all. This is going to be a security risk so I will need to set the permissions to be program specific. using procmon.exe I found that javaw.exe was getting write permissions denied. The programmers of eclipse and javaw.exe did not give those programs elevated permissions to run as trustedinstaller.
I faced the same problem
Turned out my Java version in the PATH had been updated to 1.8
Once I changed this back to 1.7, my Eclipse started without issues

Categories

Resources