I've been using a linux machine for less than two weeks, so I am extremely new to Linux.
I'd also like to install the Java Developers Kit. How should this be done? Is there an
apt-get command, or should I just click on the download button at Sun's website?
I'm sure there is more than one way to do this, and it probably doesn't matter much, but I was impressed with how smoothly
apt-get install worked when installing PHP and MySQL, so if there is a right way to do this, I'd like to know.
I'm using Ubuntu version 9.04
Preventing delayed_job background jobs from consuming too much CPU on a single server
Interprocess Communication in C++
What are the pros & cons of pre-compiled headers specifically in a GNU/Linux environment/tool-chain?
According to http://stackoverflow.com/a/15543636/192221 , the following ppa can be used:.
select() call not returning when chars on port
If you have OpenJDK installed already, you might need to use .
echo "deb http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list echo "deb-src http://ppa.launchpad.net/webupd8team/java/ubuntu precise main" | tee -a /etc/apt/sources.list apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys EEA14886 apt-get update apt-get install oracle-java7-installer
Possible to build a shared library with static link used library?
to use the Oracle Java by default..
update-alternatives --config java
Retrieving info of a very large directory
MP3 and OGG tags in PHP
Running an applet in Linux?
. On Ubuntu:.
sudo apt-get install sun-java6-jdk
you will then have a .dpg file that you can install using for example gdebi.
sudo apt-get install java-package fakeroot make-jpkg jre-1_5_0_06-linux-i586.bin
Also note that you can have multiple JDKs installed and switch between them using update-alternatives:.
and so on for other java related binaries, have a look in /etc/alternatives to find out which are available..
update-alternatives --config java update-alternatives --config javac
Doesn't matter where you download it.. Click on the link to installation instructions for the corresponding file.. An easier way to set executable permission is to right click on the file in the file browser (Nautilus) and click Properties, then on the Permissions tab, click the Execute checkbox.. To test, open a new terminal and type:.
You should see Java version "1.6.0_18" etc.
. If you don't, you probably need to add some lines, adjusted to suit your installation directories, to .bashrc and .bash_profile which are both hidden files in your home directory..
Add the following:.
Then edit your .bash_profile file and insert the same lines at the end:.
export JAVA_HOME=/opt/java/64/jre1.6.0_18 export PATH=$PATH:$JAVA_HOME/bin
Open a new terminal window and test as above.. If all went well, in the Applications menu > System Tools, you should now have the Sun Java Control Panel.
. You can repeat a similar installation procedure for the JDK and Netbeans where you mark the downloaded .bin file as executable and then execute it from a terminal window in the directory you want to install into, such as /usr/local.. After installing the JDK, add to your .bashrc and .bash_profile files a line similar to this:.
Netbeans 6.8 seems to be able to set itself up ok without any editing and adds itself to the Applications Programming menu..
However, I couldn't find this in my respitory:.
After poking around for a bit, I was able to get this to work..
sudo apt-get install sun-java6-jdk
sudo apt-get install openjdk-6-jdk
Is it openJDK? But in Ubuntu 9.10 It is openJDK.
So It have many problem.. You can do like this to remove and install sun java jdk. sudo apt-get remove openJDK* sudo apt-get install sun-java6*.