1

I installed j2ee with j2sdk on my Ubuntu 12.04 computer. It is installed at /mallika/glassfish3/jdk7/.

I am able to run any of my Java programs in Netbeans using this JDK.

Since Netbeans 7 does not support RMI programs, I tried to compile these from command prompt, but then I get the following error on giving the following command:

..~$ javac rmiclient/LoginGUI.java 
The program 'javac' can be found in the following packages:  
 * default-jdk  
 * ecj  
 * gcj-4.6-jdk  
 * openjdk-6-jdk  
 * gcj-4.5-jdk  
 * openjdk-7-jdk  
Try: sudo apt-get install <selected package>  

My system now has both OpenJDK (I do not know where) and JDK 7 as I mentioned above. How do I set path or something so that I can compile Java sources from command prompt.

1
  • Which Java versions did you installed through the package-management-system?
    – BuZZ-dEE
    Feb 6, 2013 at 12:12

1 Answer 1

1

You could install the OpenJDK versions (openjdk-6-jdk or openjdk-7-jdk):

sudo apt-get install openjdk-6-jdk
sudo apt-get install openjdk-7-jdk

If you need the Oracle Java JDK have a look at:

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .