LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Java Problem (https://www.linuxquestions.org/questions/linux-newbie-8/java-problem-654153/)

keyboard1973 07-07-2008 03:05 PM

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

Mega Man X 07-07-2008 03:22 PM

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>

keyboard1973 07-08-2008 02:14 AM

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

Mega Man X 07-08-2008 05:32 AM

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,

keyboard1973 07-08-2008 06:59 AM

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

keyboard1973 07-09-2008 03:13 AM

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 about:plugins 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


All times are GMT -5. The time now is 02:43 AM.