Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
sun-jdk env.d problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Portage & Programming
View previous topic :: View next topic  
Author Message
rob3rt
n00b
n00b


Joined: 18 Apr 2002
Posts: 12
Location: Prague, Czech Republic

PostPosted: Sat Apr 20, 2002 9:04 pm    Post subject: sun-jdk env.d problem Reply with quote

Hello there,

I am trying to use sun-jdk but I am having problem with enviroment setting. When I installed and rebooted (for sure) sun-jdk, theres was no JAVA_HOME, JAVAC stuff set. In /etc/env.d i found another directory java and in it 20sun-jdk-1.4.0. I copied that file up one directory and rerun env-update. Upss everything in /etc/profile.env seems to be ok. So I did reboot and it was not set as I expect. JAVAC is /bin/javac instead of /opt/sun.../bin/javac.
I tried manualy env-update again. OK, until next reboot.
Can anybody help me? I cannot compile PHP with USE java.

thank you
Back to top
View user's profile Send private message
lk42pro
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2002
Posts: 114
Location: New Jersey, USA

PostPosted: Sun Apr 21, 2002 8:47 pm    Post subject: Reply with quote

i have the same problem....any help would be appreciated
Back to top
View user's profile Send private message
trolocsis
Guest





PostPosted: Sun Apr 21, 2002 8:54 pm    Post subject: Fix Reply with quote

have you guys tried to run:

java-config --list-available-vms
java-config --set-system-vm=sun-jdk-1.4.0

env-update
source /etc/profile

The last two commands are only needed for the current shell session.

-ryan
Back to top
Stalione
Guru
Guru


Joined: 21 Apr 2002
Posts: 335

PostPosted: Sun Apr 21, 2002 9:24 pm    Post subject: Reply with quote

I ran into the same problem and even after i did the whole
java-config --list-available-vms
java-config --set-system-vm=blabh blah.... I ran into the same problem with PHP install. I tried this with blackdown and suns java and still didn't work. When I do a emerge php it always complaints about java vm libraries not found or something similar to that.
Back to top
View user's profile Send private message
Stalione
Guru
Guru


Joined: 21 Apr 2002
Posts: 335

PostPosted: Sun Apr 21, 2002 9:30 pm    Post subject: Got it working Reply with quote

Ok this is extremely strange.... last night i did the following:
t-rex root # java-config --list-available-vms
[blackdown-jdk-1.3.1] Blackdown JDK 1.3.1 (/etc/env.d/java/20blackdown-jdk-1.3.1)
[blackdown-jre-1.3.1] Blackdown JRE 1.3.1 (/etc/env.d/java/20blackdown-jre-1.3.1)
t-rex root # java-config --help
Usage: java-config [OPTIONS] [LIBRARIES]
Options:
[--javac]
[--java]
[--jar]
[--jdk-home]
[--jre-home]
[--java-version]
[--classpath[=package1,package2,...]]
[--full-classpath=package1,package2,...]
[--exec=filename]
[--list-available-packages]
[--list-available-vms]
[--set-system-vm=<vm-id>]
[--set-user-vm=<vm-id>]
[--set-system-classpath=package1,package2,...]
[--set-user-classpath=package1,package2,...]
Using /opt/blackdown-jdk-1.3.1
t-rex root #

As you can see my java-vm is set to blackdown-jdk. Last night I tried to emerge php and it didn't work. But today i did:
emerge rsync
emerge php
and looks like its actually compiling.....the gentoo guys must have updated the php package....thanks dudes!!!!
Back to top
View user's profile Send private message
lk42pro
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2002
Posts: 114
Location: New Jersey, USA

PostPosted: Sun Apr 21, 2002 9:49 pm    Post subject: Re: Fix Reply with quote

trolocsis wrote:
have you guys tried to run:

java-config --list-available-vms
java-config --set-system-vm=sun-jdk-1.4.0

env-update
source /etc/profile

The last two commands are only needed for the current shell session.

-ryan

yah i typed all of that...still same problem..have to go to /opt/jdkblah/bin/ and type ./java to run it...
Back to top
View user's profile Send private message
rphillips
Retired Dev
Retired Dev


Joined: 18 Apr 2002
Posts: 92

PostPosted: Mon Apr 22, 2002 7:11 am    Post subject: Reply with quote

try source /etc/env.d/20java

Could be an error in the script java-config creates.

-ryan
Back to top
View user's profile Send private message
zerogeny
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2002
Posts: 85

PostPosted: Mon Apr 22, 2002 10:06 am    Post subject: Reply with quote

i just added the paths for jre and sdk in the profile.
_________________
Searched the web for zerogeny.
Results 1 - 1 of 1. Search took 0.05 seconds
Back to top
View user's profile Send private message
lk42pro
Tux's lil' helper
Tux's lil' helper


Joined: 21 Apr 2002
Posts: 114
Location: New Jersey, USA

PostPosted: Mon Apr 22, 2002 2:26 pm    Post subject: Reply with quote

zerogeny wrote:
i just added the paths for jre and sdk in the profile.

in /etc/profile? can you tell me exactly what u added in there?

thanks
Back to top
View user's profile Send private message
rob3rt
n00b
n00b


Joined: 18 Apr 2002
Posts: 12
Location: Prague, Czech Republic

PostPosted: Mon Apr 22, 2002 3:13 pm    Post subject: working Reply with quote

well I did it this way.

in /etc/env.d I created this file I (used the oen from java directory:
20sun-jdk-1.4.0:

# Copyright 1999-2002 Gentoo Technologies, Inc.
# Distributed under the terms of the GNU General Public License, v2 or later
# Author: Karl Trygve Kalleberg
# Maintainer: Tools Team <tools@gentoo.org>
# /space/gentoo/cvsroot/gentoo-x86/dev-java/sun-jdk/files/sun-jdk-1.4.0,v 1.3 200
2/04/09 22:13:41 karltk Exp

#VERSION="Sun JDK 1.4.0"
JAVA_HOME=/opt/sun-jdk-1.4.0
CLASSPATH=/opt/sun-jdk-1.4.0/lib/rt.jar
JDK_HOME=/opt/sun-jdk-1.4.0
JAVAC=/opt/sun-jdk-1.4.0/bin/javac
PATH=/opt/sun-jdk-1.4.0/bin:/opt/sun-jdk-1.4.0/jre/bin
ROOTPATH=/opt/sun-jdk-1.4.0/bin:/opt/sun-jdk-1.4.0/jre/bin
LDPATH=/opt/sun-jdk-1.4.0/jre/lib/

#ENV_VARS="JAVA_HOME CLASSPATH JDK_HOME JAVAC ADDPATH ADDLDPATH"

I had to manualy replace $JDK_HOME in PATH ROOTPATH and JAVAC. Then I ran env-update, rebooted(maye be not necessary). Since thaht time it is working for me. But this is some black work, so I think there has to be some other better way to do it.
Back to top
View user's profile Send private message
zerogeny
Tux's lil' helper
Tux's lil' helper


Joined: 17 Apr 2002
Posts: 85

PostPosted: Mon Apr 22, 2002 3:23 pm    Post subject: Reply with quote

like so:
Code:
export PATH="/bin:/usr/bin:/opt/sun-jdk-1.4.0/bin/:${PATH}"


however if you want to use some fancy program that runs java/javac from within it you might have problems, im not sure though. i use jedit with its console plugin and its dandy as can be. 8O
_________________
Searched the web for zerogeny.
Results 1 - 1 of 1. Search took 0.05 seconds
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Portage & Programming All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum