Linux (Ubuntu)
Ubuntu: Installing Java
by admin on Oct.06, 2010, under Linux (Ubuntu)
I had multiple issues concerning one of my gameservers performance, so I decided to code a simple Java application which would be used to monitor the behaviour of my machine. However, I found that it’s not as easy to install Java as I expected it would be, but after researching for a while, I finally found a working solution.
First of all I performed a scan for available JDK’s for my distribution by using the following command:
apt-cache search jdk
This command returned a list of available JDK’s as well as JRE’s for my version of linux.
I used the below command to install the OpenJDK Development Kit (JRE), which basically contains all functions you’d get with a Sun-Java. The reason why I didn’t use the other version was, that I had massive memory problems with it, but that’s another story.
apt-get install openjdk-6-jre
You can verify a successful installation by typing:
java -version
The installation used around 94 MB of my server’s hard disk drive. In case you want to uninstall it again, simply use the following command :
apt-get autoremove openjdk-6-jre
And if you’re also having memory problems like I had with my old Java installation, you can try using the following parameter to start your applications :
java -Xmx64m Main