Every Flavour Beans

“The time has come…to talk of many [technologies].” –Lewis Carroll(’The Walrus and the Carpenter’)
Development Tools. Web Frameworks. GNU/Linux. Nokia N800. Video Encoding.

March 21, 2006

Java on Gentoo

Filed under: GNU/Linux, Gentoo, Java — tabrez @ 3:36 pm

The simplest way to get started with Java development in Gentoo is to install the Blackdown JDK-1.4.2 along with the Eclipse IDE:

sh# emerge blackdown-jdk eclipse-sdk

If you want to install the sun’s version of the jdk instead of the blackdown jdk, you can get the 1.4.2 version of it using:

sh# emerge sun-jdk java-sdk-docs

To install the 1.5 version of the jdk, you need to unmask it first. Add the following two lines to your /etc/portage/package.keywords file:

>=dev-java/sun-jdk-1.5.0 ~x86
>=dev-java/java-sdk-docs-1.5.0 ~x86

Now do the emerge:

sh# emerge sun-jdk java-sdk-docs

You can also install both of these versions at the same time, and then make one of them as the default jdk. If you need java support in other applications too(like web browser etc), then make sure to add the relevant keywords in the /etc/portage/package.use file:

=dev-java/sun-jdk-1.4.2.10-r2 X alsa browserplugin doc examples jce mozilla nsplugin

This also installs the documentation and the examples - remove these words if you don’t to install them. Also change the version number if you are installing the 1.5 version of the jdk.

If you want to use Eclipse IDE to create C++ programs, you need the eclipse-cdt plugin. First unmask it by placing the following line in /etc/portage/package.keywords file:

>=dev-util/eclipse-cdt-2.0 ~x86

Now do the emerge:

sh# emerge eclipse-cdt

More information on installing java 1.5 and eclipse 3.x on Gentoo OS.


If you want to receive future posts by email, enter your email address here:

Related Posts:

2 Comments »

When I installed these everything worked fine. Tomcat runs fine with blackdown. Eclipse says no java by default. not sure why. I used java-config to set blackdown as my default system jvm.
Probably need a little more setup instructions than this.

Quote

Comment by browe — April 9, 2006 @ 6:26 am

if you have done this:
$ emerge blackdown-jdk eclipse-sdk

Eclipse should already be configured to use the blackdown-jdk. if there is no JRE configured in Eclipse for some reason, you can add one by yourself; instructions on how to do it are here:
http://tabreziqbal.wordpress.com/2006/04/01/java-15-and-eclipse-in-gentoo-part-ii/

look for the second paragraph from the bottom of the post.
though it is for adding sun-jdk-1.5 JRE, the procedure is the same to add blackdown-jdk JRE too. let me know if that helps.

Quote

Comment by tabrez — April 9, 2006 @ 11:42 am

RSS feed for comments on this post. TrackBack URI

Leave a comment

Subscribe without commenting


Copyright (c) 2006, 2007 Tabrez Iqbal.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. Verbatim copying and distribution of this entire article is permitted in any medium without royalty provided this notice is preserved. A copy of the license is included in the section entitled "GNU Free Documentation License".


Powered by WordPress
This website is hosted by Dreamhost


You are viewing a mobilized version of this site...
View original page here

Mobilized by Mowser Mowser
Mobilytics