Solved

changing from gcj to sun-java

Posted on 2006-10-22
3
273 Views
Last Modified: 2013-12-16
Hi,

I am trying to use EPIC with eclipse to develop Perl projects.
I got a lot of error messages when trying to download the sources. After searching a bit I found out that apparently GCJ is not working correctly with Eclipse. So I installed java5.0 from sun and then copied the installation files from eclipse over the ones that came with my FC4. I am still running into problems. Now I want to change to the sun-java version, but don't know how. Can someone please help me?

thanks,

Bernd
0
Comment
Question by:BAJ05
  • 2
3 Comments
 

Author Comment

by:BAJ05
ID: 17785070
I think it works now:
I removed /usr/bin/eclipse and appended /usr/share/eclipse to $PATH. Now starting eclipse from the command line works.
I also downloaded all the relevent files/features for EPIC and pointed the eclipse to that local site. Then I added the specific directory again for download and finally succeeded in installation. So far so good. I can at least see some Perl functionality within eclipse now. Let's see what else I can do...

Bernd
0
 
LVL 30

Accepted Solution

by:
Kerem ERSOY earned 125 total points
ID: 17808773
Hi,

To upgrade your system for SUN Java. Please note that now all java applications are Java 5.0 compatible. Depending on what application you will use on your system you might need to use Java 4.0. In fact the Java comes with gcj is 1.4.xx. not Jav 5.0 !!!


Follow this procedure to install a sun JDK:
- Uninstall gcj with rpm or yum
- Browse to the Sun Java site.
  http://java.sun.com/javase/downloads/index.jsp
- Download a SDK package not JRE. The current version is "Java SDK update 9". Select the self installing file not Self installing RPM.
- Download the package with firefox if you have gui or get the URL from a browser and copy it as a parameter to wget and download.
- Make the newly downloaded file executable like that:
  chmod 500 jdk-1_5_0_09-linux-i586.bin
- Then execute the file:
  ./jdk-1_5_0_09-linux-i586.bin   (./ is important unless your profile includes . as a path.)
- This will create a directory named jdk-1_5_0_09-linux-i586 (the actual name might vary depending on the version you download.)
- issue these commands:
  mv ./jdk-1_5_0_09-linux-i586 /usr/lib     (move the package into appropriate folder)
  cd /usr/lib
  rm -rf java                               (remove the existing empty folder)
  ln -s /usr/lib/jdk-1_5_0_09-linux-i586 java  (link package to java whew most programs look for java)
- Now we need to add it to user paths like that:
  cd /etc
- Edit the file called profile to add the new paths for users be able to access java like that:

# Path manipulation
if [ `id -u` = 0 ]; then
        pathmunge /sbin
        pathmunge /usr/sbin
        pathmunge /usr/local/sbin
        pathmunge /scripts
fi

#JAVA installation start
pathmunge /usr/lib/java
pathmunge /usr/lib/java/bin
JAVA_HOME=/usr/lib/java
export JAVA_HOME
#JAVA installation end

pathmunge /usr/X11R6/bin after

Save and exit.  (just add the lines between "#JAVA installation" comments)

-Leave the current shell and re-login.

-When login enter :
java -version

and the command must output SUN java now not gcj.

This will complete the installation.
0
 
LVL 30

Expert Comment

by:Kerem ERSOY
ID: 17808890
Ooops: There's a typo in the very first line:
Please note that now all java applications are Java 5.0 compatible
must read
Please note that *not* all java applications are Java 5.0 compatible

Sorry for typo :)
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
Setting up Secure Ubuntu server on VMware 1.      Insert the Ubuntu Server distribution CD or attach the ISO of the CD which is in the “Datastore”. Note that it is important to install the x64 edition on servers, not the X86 editions. 2.      Power on th…
Learn how to find files with the shell using the find and locate commands. Use locate to find a needle in a haystack.: With locate, check if the file still exists.: Use find to get the actual location of the file.:
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question