LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 07-07-2008, 03:05 PM   #1
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Rep: Reputation: 15
Java Problem


I have tried to uninstall, reinstall put a symbolic link in the firefox plugin directory, all the plugin directories I could find for mozilla and firefox. When I do a test it states java is installed and working. The issue I am having when I try it on www.pogo.com the site says I have to install java but when I test it on their site it states jave is installed and working. I have tried the version that was installed with centos5 which is the OS I am running and the latest version. When I type java to see if its running this is all I get. Any help on troubleshooting would be appreciated since I am fairly green to linux. I have googled and tried various things also followed the install instructions for java, I don't know if I missed something or there is an issue with the site I am trying to run it with.

Usage: gij [OPTION] ... CLASS [ARGS] ...
to invoke CLASS.main, or
gij -jar [OPTION] ... JARFILE [ARGS] ...
to execute a jar file
Try `gij --help' for more information.

Thanks again,

Keith
 
Old 07-07-2008, 03:22 PM   #2
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
I think the problem you are having is because you are using the Gnu Interpreter for Java (GIJ) instead of using the Sun's Java Runtime Environment (JRE). Go to http://java.sun.com/ and grab the official Java RE from Sun themselves. There is some good info on Sun's page describing how to install the official runtime. If you still have troubles, please search the forums for my nickname and Java. I've answered similar questions regarding Sun's runtime environment for Java a could of times =)

<rant>
I think it is cool that we have so many options for runtimes and compilers for Java today, but in my experience, they don't work and cause the end user a lot of trouble. Most distros out there should stop forcing software not yet ready for usage just because it is open source. I think it is a better idea to just leave the distro without support for Java alltogether than a half-ass'd support if you can't ship with the Sun's runtime.
</rant>

Last edited by Mega Man X; 07-07-2008 at 03:24 PM.
 
Old 07-08-2008, 02:14 AM   #3
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Java JRE SUN installed

Hello,

I must have installed this along the way so im not sure but it appears the Java JRE may not be running?? I tried to install Java JRE from suns web site

Do you agree to the above license terms? [yes or no]
yes
Unpacking...
Checksumming...
Extracting...
UnZipSFX 5.50 of 17 February 2002, by Info-ZIP (Zip-Bugs@lists.wku.edu).
inflating: jre-6u2-linux-i586.rpm
Preparing... ########################################### [100%]
package jre-1.6.0_06-fcs (which is newer than jre-1.6.0_02-fcs) is already installed

When I run java -version I get this output

java version "1.4.2"
gij (GNU libgcj) version 4.1.2 20071124 (Red Hat 4.1.2-42)

Copyright (C) 2006 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

I don't understand how to remove this or if I should, I have the jre version installed as an rpm.

I also found in /etc/alternatives

lrwxrwxrwx 1 root root 26 Jun 27 18:56 jre -> /usr/lib/jvm/jre-1.4.2-gcj
lrwxrwxrwx 1 root root 26 Jun 27 18:56 jre_1.4.2 -> /usr/lib/jvm/jre-1.4.2-gcj
lrwxrwxrwx 1 root root 34 Jun 27 18:56 jre_1.4.2_exports -> /usr/lib/jvm-exports/jre-1.4.2-gcj
lrwxrwxrwx 1 root root 34 Jun 27 18:56 jre_exports -> /usr/lib/jvm-exports/jre-1.4.2-gcj
lrwxrwxrwx 1 root root 26 Jun 27 18:56 jre_gcj -> /usr/lib/jvm/jre-1.4.2-gcj
lrwxrwxrwx 1 root root 34 Jun 27 18:56 jre_gcj_exports -> /usr/lib/jvm-exports/jre-1.4.2-gcj

Can I point the system to use jre-1.6.0_06-fcs? this is where I get lost.



Thanks again,

Keith

Last edited by keyboard1973; 07-08-2008 at 02:45 AM.
 
Old 07-08-2008, 05:32 AM   #4
Mega Man X
LQ Guru
 
Registered: Apr 2003
Location: ~
Distribution: Ubuntu, FreeBSD, Solaris, DSL
Posts: 5,339

Rep: Reputation: 65
Hmmm, looks like it is still pointing to your old gij. In Ubuntu, all we did to change the java enviroment, was to run:

update-alternatives --config java

on a console as root/sudo. I recommend you to try that first if that works. If that does not work and since I am not familiar with your distribution, I will pass the torch for somebody else =).

Regards,
 
Old 07-08-2008, 06:59 AM   #5
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
Java suggestion

Hello,

I tried what you suggested and this is the output

1$ update-alternatives --config java

There is 1 program that provides 'java'.

Selection Command
-----------------------------------------------
*+ 1 /usr/lib/jvm/jre-1.4.2-gcj/bin/java

Enter to keep the current selection[+], or type selection number:

I only have 1 selection there, any idea how I can add the other java rpm?

Thanks again,

Keith
 
Old 07-09-2008, 03:13 AM   #6
keyboard1973
Member
 
Registered: Jun 2008
Posts: 52

Original Poster
Rep: Reputation: 15
java update

Hello,

I was doing some research and I found out it is not to have more then 1 symbolic link for the java plug in. I had it in multiple locations so I removed all that I could find and placed a new link in /home/keith/.mozilla/plugins. I am running Firefox version 3.0b5, when I enter aboutlugins in the address bar it states no plugins are installed but I put a sym link in the plugins dir for

libjavaplugin_oji.so -> /usr/java/jre1.6.0_07/plugin/i386/ns7/libjavaplugin_oji.so

As far as I can tell everything should be working. When I type java - version I get

[root@Cent plugins]# java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06)
Java HotSpot(TM) Client VM (build 10.0-b23, mixed mode, sharing)

I installed the latest update rpm for java as well which is 1.6.0_07

Any suggestions or help would be appreciated.

Thanks again,

Keith
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
java problem wererabit Ubuntu 1 11-15-2006 02:22 PM
JAVA problem madhatter3 Linux - Software 3 01-31-2006 03:37 AM
x-java-vm problem phamtranquocvie Linux - Software 0 06-15-2005 05:42 PM
Problem with JAVA SpiderIRE Linux - Software 3 05-18-2005 03:30 PM
Java problem Oliver Linux - Software 0 10-01-2003 04:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 07:36 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration