Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Portage & Programming
  • Search

sun-jdk env.d problem

Problems with emerge or ebuilds? Have a basic programming question about C, PHP, Perl, BASH or something else?
Post Reply
Advanced search
11 posts • Page 1 of 1
Author
Message
rob3rt
n00b
n00b
User avatar
Posts: 12
Joined: Thu Apr 18, 2002 2:31 pm
Location: Prague, Czech Republic

sun-jdk env.d problem

  • Quote

Post by rob3rt » Sat Apr 20, 2002 9:04 pm

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
Top
lk42pro
Tux's lil' helper
Tux's lil' helper
Posts: 114
Joined: Sun Apr 21, 2002 4:19 pm
Location: New Jersey, USA

  • Quote

Post by lk42pro » Sun Apr 21, 2002 8:47 pm

i have the same problem....any help would be appreciated
Top
trolocsis

Fix

  • Quote

Post by trolocsis » Sun Apr 21, 2002 8:54 pm

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
Top
Stalione
Guru
Guru
Posts: 335
Joined: Sun Apr 21, 2002 6:06 pm

  • Quote

Post by Stalione » Sun Apr 21, 2002 9:24 pm

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.
Top
Stalione
Guru
Guru
Posts: 335
Joined: Sun Apr 21, 2002 6:06 pm

Got it working

  • Quote

Post by Stalione » Sun Apr 21, 2002 9:30 pm

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!!!!
Top
lk42pro
Tux's lil' helper
Tux's lil' helper
Posts: 114
Joined: Sun Apr 21, 2002 4:19 pm
Location: New Jersey, USA

Re: Fix

  • Quote

Post by lk42pro » Sun Apr 21, 2002 9:49 pm

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...
Top
rphillips
Retired Dev
Retired Dev
Posts: 92
Joined: Thu Apr 18, 2002 2:18 am

  • Quote

Post by rphillips » Mon Apr 22, 2002 7:11 am

try source /etc/env.d/20java

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

-ryan
Top
zerogeny
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 85
Joined: Wed Apr 17, 2002 3:02 pm

  • Quote

Post by zerogeny » Mon Apr 22, 2002 10:06 am

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
Top
lk42pro
Tux's lil' helper
Tux's lil' helper
Posts: 114
Joined: Sun Apr 21, 2002 4:19 pm
Location: New Jersey, USA

  • Quote

Post by lk42pro » Mon Apr 22, 2002 2:26 pm

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
Top
rob3rt
n00b
n00b
User avatar
Posts: 12
Joined: Thu Apr 18, 2002 2:31 pm
Location: Prague, Czech Republic

working

  • Quote

Post by rob3rt » Mon Apr 22, 2002 3:13 pm

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.
Top
zerogeny
Tux's lil' helper
Tux's lil' helper
User avatar
Posts: 85
Joined: Wed Apr 17, 2002 3:02 pm

  • Quote

Post by zerogeny » Mon Apr 22, 2002 3:23 pm

like so:

Code: Select all

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
Top
Post Reply

11 posts • Page 1 of 1

Return to “Portage & Programming”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Authors
Gentoo is a trademark of the Gentoo Foundation, Inc. and of Förderverein Gentoo e.V.
The contents of this document, unless otherwise expressly stated, are licensed under the CC-BY-SA-4.0 license.
The Gentoo Name and Logo Usage Guidelines apply.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy