Solved

changing from gcj to sun-java

Posted on 2006-10-22
3
272 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

What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

In this tutorial I will explain how to make squid prevent malwares in five easy steps: Squid is a caching proxy for the Web supporting HTTP, HTTPS, FTP, and more. It reduces bandwidth and improves response times by caching and reusing frequently-…
Linux users are sometimes dumbfounded by the severe lack of documentation on a topic. Sometimes, the documentation is copious, but other times, you end up with some obscure "it varies depending on your distribution" over and over when searching for …
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

707 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now