Hey Guys I installed netbeans and when starting a java project its giving me error of JDK.
Can someone help me with the same?
Thanks
Hey Guys I installed netbeans and when starting a java project its giving me error of JDK.
Can someone help me with the same?
Thanks
First make sure you really have JDK installed on your system, by typing the following in a terminal:
If you already have it, what should be expected since you installed Netbeans, then probably you haven't set it in the Java Platform Manager in Netbeans. In order to do it just open Netbeans and navigate to Tools -> Java Platforms -> Add Platform... button and specify the path to your JDK folder.Code:dpkg --list | grep -i jdk
Please mark your thread as solved if you get a satisfactory responseUbuntu membership via Forums contributions
ii icedtea-6-jre-cacao:i386 6b24-1.11.5-0ubuntu1~12.10.1 i386 Alternative JVM for OpenJDK, using Cacao
ii icedtea-6-jre-jamvm:i386 6b24-1.11.5-0ubuntu1~12.10.1 i386 Alternative JVM for OpenJDK, using JamVM
ii icedtea-7-jre-jamvm:i386 7u9-2.3.3-0ubuntu1~12.10.1 i386 Alternative JVM for OpenJDK, using JamVM
ii openjdk-6-jre:i386 6b24-1.11.5-0ubuntu1~12.10.1 i386 OpenJDK Java runtime, using Hotspot JIT
ii openjdk-6-jre-headless:i386 6b24-1.11.5-0ubuntu1~12.10.1 i386 OpenJDK Java runtime, using Hotspot JIT (headless)
ii openjdk-6-jre-lib 6b24-1.11.5-0ubuntu1~12.10.1 all OpenJDK Java runtime (architecture independent libraries)
ii openjdk-7-jre:i386 7u9-2.3.3-0ubuntu1~12.10.1 i386 OpenJDK Java runtime, using Hotspot JIT
ii openjdk-7-jre-headless:i386 7u9-2.3.3-0ubuntu1~12.10.1 i386 OpenJDK Java runtime, using Hotspot JIT (headless)
ii openjdk-7-jre-lib 7u9-2.3.3-0ubuntu1~12.10.1 all OpenJDK Java runtime (architecture independent libraries)
Now that you have a confirmation for JDK, you just have to point the Java Platform in Netbeans to your openJDK location like I posted previously.
If you don't know its location (/usr/lib/jvm/ usually) just type at a terminal window:
Code:whereis java
Please mark your thread as solved if you get a satisfactory responseUbuntu membership via Forums contributions
java: /usr/bin/java /usr/bin/X11/java /usr/share/java /usr/share/man/man1/java.1.gz
Also do I have to uninstall openJDK?
By the looks of it your JDK location is at /usr/lib/jvm/ that's the location you have to add to Java Platforms in your Netbeans.
No, if you uninstall it you won't be able to develop in Java since it's the JDK that contains the collection of the Java programming tools.
Please mark your thread as solved if you get a satisfactory responseUbuntu membership via Forums contributions
Bookmarks