PDA

View Full Version : Help installing JVM on FC2



TV-MA
2nd September 2004, 04:36 PM
Hi all, I have searched the forums related to this, and just can't seem to get a grip on what is going on. I am installing a cross-plfatform client specific to an application called starteam. when I try to install the applicaiton I get the error of:


[jchase@alfalfa apps]$ ./StarTeamCP.bin
Preparing to install...
tail: `-1' option is obsolete; use `-n 1'
Try `tail --help' for more information.
./StarTeamCP.bin: line 327: [: `)' expected, found -z
WARNING! The amount of /tmp disk space required and/or available
could not be determined. The installation will be attempted anyway.
Extracting the installation resources from the installer archive...
Configuring the installer for this system's environment...
No Java virtual machine could be found from your PATH
environment variable. You must install a VM prior to
running this program.


okay, so I download the jre and install it, just so anyone reading this knows, I have java at the following installed paths


[root@alfalfa local]# find / -name java
/etc/sysconfig/java
/usr/share/doc/db4-devel-4.1.25/ref/java
/usr/share/java
/usr/share/xemacs/xemacs-packages/etc/jde/java
/usr/share/xemacs/xemacs-packages/etc/xslt-process/java
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include/gnu/java
/usr/lib/gcc-lib/i386-redhat-linux/3.2.3/include/java
/usr/java
/usr/java/j2re1.4.2_05/bin/java
/lib/ssa/gcc-lib/i386-redhat-linux-gnu/3.5-tree-ssa/include/gnu/java
/lib/ssa/gcc-lib/i386-redhat-linux-gnu/3.5-tree-ssa/include/java
/home/jchase/downloads/apps/j2re1.4.2_05/bin/java
/opt/IBMJava2-141/jre/bin/java
/opt/IBMJava2-141/bin/java
/opt/bea/jrockit81sp1rp1_141_05/bin/java
/opt/bea/jrockit81sp1rp1_141_05/jre/bin/java
[root@alfalfa local]#

and here is my .bash_profile



# .bash_profile

# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi

# User specific environment and startup programs

PATH=$PATH:$HOME/bin:/usr/java/j2re1.4.2_05/bin/java
PATH=$PATH:/usr/java/j2re1.4.2_05/bin/java
JAVA_HOME=/usr/java/j2re1.4.2_05/bin/java
export JAVA_HOME
export PATH
unset USERNAME


and I still get the error when installing, can anyone help me with this?

Thanks for your help.

tvma

ilja
2nd September 2004, 05:07 PM
IMHO the best way is : http://fedorafaq.org/#java
try to install it, maybe it will work then

taylor65
3rd September 2004, 12:47 PM
If it's just java you're having trouble with, you can try deleting it and installing via synaptic:

http://fedoranews.org/contributors/tim_taylor/synaptic/

tomwitmer
3rd September 2004, 11:55 PM
I think you need to change

PATH=$PATH:/usr/java/j2re1.4.2_05/bin/java
to
PATH=$PATH:/usr/java/j2re1.4.2_05/bin

circulus
5th September 2004, 09:03 PM
Hi,

these enviroment variables must be set to:

JAVA_HOME=/usr/java/j2sdk1.4.2_05 - if you use SDK
or
JAVA_HOME=/usr/java/j2re1.4.2_05 - if you use JRE

PATH=$PATH:$JAVA_HOME/bin

circulus

see the JAVA installation mini HOWTO for FC2 (http://circulus.czechian.net)

crackers
5th September 2004, 10:12 PM
What tomwitmer said is almost correct. The path for $JAVA_HOME should be


export JAVA_HOME=/usr/java/j2re1.4.2_05

And you've added it to your path twice, by the way.

Here's how I normally do it (I usually use the bin, so the path is different):


export JAVA_HOME=/opt/j2sdk1.4.2_04
export PATH=$PATH:$JAVA_HOME/bin

That's just a little bit tidier - and allows you to change your Java settings in only one place.

TV-MA
8th September 2004, 06:31 AM
What tomwitmer said is almost correct. The path for $JAVA_HOME should be


export JAVA_HOME=/usr/java/j2re1.4.2_05

And you've added it to your path twice, by the way.

Here's how I normally do it (I usually use the bin, so the path is different):


export JAVA_HOME=/opt/j2sdk1.4.2_04
export PATH=$PATH:$JAVA_HOME/bin

That's just a little bit tidier - and allows you to change your Java settings in only one place.



Thanks a lot, that worked perfectly. Thanks a lot you all for your help!

circulus
20th September 2004, 04:35 PM
Hallo,

i repair small bug in my mini howto for installation of j2sdk on FC powered boxes.

document is here (http://circulus.czechian.net) .

circulus

TalonLM
20th September 2004, 05:03 PM
I'm trying to compile this source (http://developers.sun.com/techtopics/mobility/midp/articles/tutorial2/src/HitServlet.java) .

I keep getting:

[root@pcp06497939pcs root]# javac hitservlet.java
error: cannot read: hitservlet.java
1 error

The tutorial (http://developers.sun.com/techtopics/mobility/midp/articles/tutorial2/j2eeri.html) says that in order to compile a servlet I need to:

C:\>set CLASSPATH=\j2sdkee1.3\lib\j2ee.jar

Ok, so my Paths in etc/profile looks like this:

export PATH=/opt/SUNWappserver/jdk/bin:$PATH
export PATH=/opt/SUNWappserver/bin:$PATH
export PATH=/usr/WTK2.1/bin:$PATH # (J2ME)
export PATH=/opt/SUNWappserver/lib/j2ee.jar:$PATH # (This is where it's installed on my system)

But I get the error above. Is it my Paths or ???

crackers I promise I searched for this.... :D

circulus
20th September 2004, 09:17 PM
hi,

It seems to be bad permissions for the file. Check permissions, and try compile with javac.

circulus

crackers
21st September 2004, 03:57 AM
I would also strongly recommend creating and using a user account for all normal tasks instead of "root." This will, among other things, prevent you from really shooting yourself in the foot when you least expect it.

Anyone besides me ever do rm -rf * in / without realizing it? Talk about bad ju-jus... :( Of course, I only had to do it once.

TalonLM
21st September 2004, 08:04 PM
That didn't seem to do it.

Right click - Properties - Permission Tab

Owner, Group and Others i have it all checked.

(banging head against monitor. I tried it in XP and it does the same...did I screw up install on both OS?)