Fedora Linux Support Community & Resources Center

Go Back   FedoraForum.org > Fedora 17/18 > Using Fedora
FedoraForum Search

Forgot Password? Join Us!

Using Fedora General support for current versions. Ask questions about Fedora and it's software that do not belong in any other forum.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 19th November 2004, 04:08 PM
Satriani Offline
Registered User
 
Join Date: Nov 2004
Posts: 6
Java 5.0 SDK paths not set

I'm using FC3.
I've installed the J2SDK 5.0 as described in http://www.fedorafaq.org/custom_java.html, and also created a file called java.sh in /etc/profile.d and set the +x on it.

The rpm is installed as you can see, [x1@localhost ~]$ rpm -qa | grep jdk
jdk-1.5.0-fcs

But when i try to start java or javac, [x1@localhost ~]$ java
libgcj-java-placeholder.sh

This script is a placeholder for the /usr/bin/java
master link required by jpackage.org conventions. libgcj's
rmiregistry, rmic and jar tools are now slave symlinks to these
masters, and are managed by the alternatives(8) system.
[...]

What must I do to set the paths correct?
Thx
Reply With Quote
  #2  
Old 19th November 2004, 04:21 PM
SharedMedia's Avatar
SharedMedia Offline
Registered User
 
Join Date: Nov 2004
Location: Ontario Canada
Age: 41
Posts: 85
Exclamation Trouble in JVM Paradise

Java Beans ROASTED over the FC Coals..

Don't know if this helps the readers, I came across this bit-bucket info.. maybe we should dream of someone very skilled to create an FC3 RPM for Java SDK, JDE etc..

Link Me: http://home.bredband.no/gaulyk/java/...avaredhat.html
__________________
Shared Media
Linux Redhat OpenSource Contributor
" Have you hugged a Penguin today.."
Reply With Quote
  #3  
Old 19th November 2004, 04:32 PM
Satriani Offline
Registered User
 
Join Date: Nov 2004
Posts: 6
Thx for the link, I've followed the instructions there (made new java.sh, and used source /etc/profile.d/java.sh).
I get [x1@localhost profile.d]$ echo $PATH
/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/usr/java/jdk1.5.0/bin/

It looks good, the path is correct, but still when trying to start java or javac:

[x1@localhost profile.d]$ java
libgcj-java-placeholder.sh

This script is a placeholder for the /usr/bin/java
master link required by jpackage.org conventions. libgcj's
[...]

It seems as if FC3 has a kind of overriding script for the java placeholders...
Reply With Quote
  #4  
Old 19th November 2004, 04:38 PM
Pegasus Offline
Registered User
 
Join Date: Apr 2004
Posts: 208
Code:
$ java -version
... placeholder message ...
$ su -
# alternatives --remove java /usr/share/java/libgcj-java-placeholder.sh
# alternatives --remove javac /usr/share/java/libgcj-javac-placeholder.sh
# alternatives --remove jar /usr/bin/fastjar
# alternatives --remove jar.1.gz /usr/share/man/man1/fastjar.1.gz
# cd /usr/bin
# ln -s /usr/java/jre1.5.0/bin/java java
... also set the links for javac etc ...
# exit
$ java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)
$
Procedure of JDK is similar to J2RE...
__________________
Distro Killer Test System:
Intel Pentium II 400 Mhz - 256 MB Ram, MS6151 Mainboard with ESS 1371 Onboard Sound, Ati Radeon 9200se AGP, Adaptec 2940 PCI SCSI Controller, SCSI Zip Drive 100 internal, HP Scanjet 4C SCSI, RealTek PCI Ethernet Card (for DSL connection), PM = 10GB HDD, PS = LG GSA4081B, SM = 4 GB HDD (vfat), SS = LiteOn 40x CD-Rom
------------
RH9 -> Success, Suse 8.2/9/9.1 -> Failed, MDK9 -> Failed, FC2 -> Failed, MDK10 -> Success, FC3 -> Success
Reply With Quote
  #5  
Old 19th November 2004, 04:48 PM
Satriani Offline
Registered User
 
Join Date: Nov 2004
Posts: 6
Thx Pegasus, now it works.
Reply With Quote
  #6  
Old 20th November 2004, 11:00 PM
sfan Offline
Registered User
 
Join Date: Oct 2004
Posts: 1
I had the same problem, but I figured it out in another way:
uninstall those two packages:
libgcj-devel-3.4.2-6.fc3
libgcj-3.4.2-6.fc3
Reply With Quote
  #7  
Old 22nd November 2004, 07:09 AM
elvenkind Offline
Registered User
 
Join Date: Nov 2004
Posts: 24
I'm having probelms with the procedure, please some assistance appreciate;

# rpm -iv jdk-1_5_0-linux-i586.rpm
# rpm -e jdkgcj
... package not installed ...

# java -version
... placeholder message ...

/etc/profile.d/java.sh file created with single line
export PATH=$PATH:/usr/java/jdk*/bin

#source /etc/profile.d/java.sh
... verified path update ...

# alternatives --remove java /usr/share/java/libgcj-java-placeholder.sh
# alternatives --remove javac /usr/share/java/libgcj-javac-placeholder.sh
... has not been configured as an alternative for javac ...

# alternatives --remove jar /usr/bin/fastjar
# alternatives --remove jar.1.gz /usr/share/man/man1/fastjar.1.gz
# cd /usr/bin
# ln -s /usr/java/jre1.5.0/bin/java java

... don't know how to set the links for javac ??? ...

# java
bash: java: command not found

# /usr/java/jdk1.5.0/bin/java -version
java version "1.5.0"
Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0-b64)
Java HotSpot(TM) Client VM (build 1.5.0-b64, mixed mode, sharing)


# set
PATH='/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin:/usr/java/jdk*/bin/:/root/bin:/usr/java/jdk*/bin/'

I have two entries in my path for the java bin, but cannot run java from any folder?

I don't know how to set the links for javac as described above?
Reply With Quote
  #8  
Old 24th November 2004, 07:36 PM
crackers's Avatar
crackers Offline
Retired Community Manager
 
Join Date: Feb 2004
Location: Seattle, WA, USA
Age: 56
Posts: 3,423
You have to specify a single path to the Java directory - in other words, do not use "*" in your path statement. Secondly, you've installed the JRE (runtime), not the SDK - you have to install the SDK in order to be able to compile (javac).

You might also be interested in this thread: http://fedoraforum.org/forum/showthread.php?t=26505
__________________
Linux User #28251 (April '93)
Professional Java Geek :cool:
Reply With Quote
Reply

Tags
java, paths, sdk, set

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
preupgrade paths greno Using Fedora 6 27th May 2009 06:02 AM
How to switch paths to Java voipfc Using Fedora 4 1st December 2006 03:06 PM


Current GMT-time: 10:31 (Wednesday, 22-05-2013)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat