You must have a working installation of JDK 1.5 before you install Red Hat Developer Studio. Currently it will only fully work with a 32-bit JVM, not a 64-bit JVM. On a 64-bit JVM the visual editor will fail to launch. Thus in this guide we will show you how to install a 32-bit Sun JDK 5.0 on a Linux Platform and Microsoft Windows Platform.
Download the Sun JDK 5.0 (Java 2 Development Kit) from Sun's website. Choose "JDK 5.0 Update <x>" (where x is the latest update number) for download and then select "RPM in self-extracting" file for Linux. Read the instructions on Sun's website for installing the JDK.
If you don't want to use SysV service scripts you can install the "self-extracting file" for Linux instead of choosing the "RPM in self-extracting" file. In that case you can skip the next step mentioned here. But it is recommended to use the SysV service scripts for production servers.
Download and install the appropriate -compat RPM from JPackage here. Please ensure you choose a matching version of the -compat package to the JDK you installed.
Create an environment variable that points to the JDK installation directory and call it JAVA_HOME. Add $JAVA_HOME/bin to the system path to be able to run java from the command line. You can do this by adding the following lines to the .bashrc file in your home directory.
#In this example /usr/java/jdk1.5.0_11 is the JDK installation directory. export JAVA_HOME=/usr/java/jdk1.5.0_11 export PATH=$PATH:$JAVA_HOME/bin
When you add $JAVA_HOME/bin to $PATH, you should add it before the old $PATH not after it. This way, the machine will pick up the new JVM first. You only need to run "alternative" as a safe guard for the right JVM.
Set this variable for the user account doing the installation and also for the user account that will run the server.
If you have more than one version of JVM installed in your machine, make sure you are using the JDK1.5 installation as the default java and javac. You can do this using the alternatives system. The alternatives system allows different versions of Java, from different sources to co-exist on your system.
As root, type the following command at the shell prompt and you should see something like this:
[root@vsr ~]$ /usr/sbin/alternatives --config java There are 2 programs which provide 'java'. Selection Command ----------------------------------------------- 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java *+ 2 /usr/lib/jvm/jre-1.5.0-sun/bin/java Enter to keep the current selection[+], or type selection number:
Make sure the Sun version [jre-1.5.0-sun in this case] is selected (marked with a '+' in the output), or select it by entering its number as prompted.
Repeat the same for javac and java_sdk_1.5.0.
[root@vsr ~]$ /usr/sbin/alternatives --config javac There are 1 programs which provide 'javac'. Selection Command ----------------------------------------------- *+ 1 /usr/lib/jvm/java-1.5.0-sun/bin/javac Enter to keep the current selection[+], or type selection number: [root@vsr ~]$ /usr/sbin/alternatives --config java_sdk_1.5.0 There are 1 programs which provide 'java_sdk_1.5.0'. Selection Command ----------------------------------------------- *+ 1 /usr/lib/jvm/java-1.5.0-sun Enter to keep the current selection[+], or type selection number:
You should verify that java, javac and java_sdk_1.5.0 all point to the same manufacturer and version.
You can always override this step by setting the JAVA_HOME environment variable as explained in the previous step.
Make sure that the java executable is in your path and that you are using an appropriate version. To verify your Java environment, type java -version at the shell prompt and you should see something like this:
[root@vsr ~]$ java -version java version "1.5.0_11" Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03) Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)
Download the Sun JDK 5.0 (Java 2 Development Kit) from Sun's website. Choose "JDK 5.0 Update <x>" (where x is the latest update number) for download and then select your Windows Platform options to perform the installation.
Create an environment variable called JAVA_HOME that points to the JDK installation directory, for example:
C:\Program Files\Java\jdk1.5.0_11\
In order to run java from the command line add the jre\bin directory to your path, for example:
C:\Program Files\Java\jdk1.5.0_11\jre\bin
To do this, open the Control Panel from the Start Menu, switch to Classic View if necessary, open the System Control Panel applet, select the Advanced Tab, and click on the Environment Variables button.
Download the appropriate installation file for your platform from http://www.redhat.com/developers/rhds/
Run install.jar and follow the instructions presented by the installation wizard
Installation process includes all required platforms to run Red Hat Developer Studio:
Eclipse 3.3
JBoss J2EE Application Server
The installer will install JBoss J2EE Application Server for running your applications if you select this option during the installation process. If you want to use a different server than ours, you can change the setting in Red Hat Developer Studio.
If you have comments or questions, you can discuss them at our Red Hat Developer Studio Forum.
When writing to the forum for questions, please include the following information:
Red Hat Developer Studio version
Exact error message
Steps to reproduce the issue
For easy reference to Red Hat Developer Studio related questions, our FAQ provides answers to our most "popular" questions. The sections of questions are organized by type.
Visual Editor does not start under Linux
Linux users may need to do the following to get the visual editor to work correctly on their machines.
eclipse -debug
Do I need to have JBoss server installed to run Red Hat Developer Studio?
No. Red Hat Developer Studio already comes bundled with JBoss server. We bundle it together so that you don't need to download any additional software and can test your application in a Web browser right away.
If you want to use a different JBoss server installation, after Red Hat Developer Studio is installed open Servers View (select Window > Show View > Others > Server > Servers), then right click on this view > New > Server and follow the wizards steps to point to another Jboss server installation.
Red Hat Developer Studio works with any servlet container, not just JBoss. For more information on deployment, please see the Deploying Your Application section.
I have an existing Struts or JSF project. Can I open the project in RHDS?
Yes. From main menu select File > Import > Other > JSF Project (or Struts Project) and follow wizards steps.
Can I import a .war file?
Yes. Select File > Import > Web > WAR file. Then follow importing steps.
Is it possible to increase the performance of Eclipse after installing your product? My Eclipse now crawls.
Red Hat Developer Studio preconfigures eclipse via the eclipse.ini file to allocate extra memory, but if you for some reason are using your own version of Eclipse then by default, Eclipse allocates only 128 Mb of memory whatever physical memory you actually have installed. You can significantly increase performance if you allocate more memory. For example:
-vmargs -Xms128m -Xmx512m -XX:MaxPermSize=128m
How can I add my own tag library to the Red Hat Palette?
See Adding Tag Libraries in JBossJSFTools Guide.
I see the Oracle ADF Faces component library tags in the Red Hat Palette, but I can't seem to find the libraries for ADF. How do I use this component library with RHDS?
See Adding Support for the Oracle ADF Components Library in the RHDS User Guide.