Ok I have Netbeans installed and a jdk. All is well inside of the netbeans ide. I can create and run programs just fine. How ever when I try to do so threw my command line I can not (This prevents me from using the geany ide as well). I found out the reason why though. When I run the following command I get the following output

#update-alternatives --config java

There are 2 alternatives which provide `java'.

  Selection    Alternative
-----------------------------------------------
          1    /usr/bin/gij-4.3
*+        2    /usr/lib/jvm/java-gcj/jre/bin/java

These are missing some needed files and both give me errors when I try to run the java command. My netbeans ide how ever uses the path /opt/jdk1.6.0_16. How can I add this path to the alternative path list and make my console use that jdk? Thanks in advance for any and all help.

Ok I fixed the first problem and found a way to add the directory to the list and then changed so the console would use that. Though I get the same error.

Error: could not find libjava.so
Error: could not find Java 2 Runtime Environment.

Though I found /opt/jdk1.6.0_16/jre/lib/i386/libjava.so, and I have a JRE

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.