Fedora This forum is for the discussion of the Fedora Project. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
01-18-2004, 11:20 AM
|
#1
|
Member
Registered: Mar 2003
Distribution: Debian
Posts: 208
Rep:
|
/.bash_profile setup to run java program
Is my /root/.bash_profile set up properly to run a java program I have for my mp3 player?
# .bash_profile
# Get the aliases and functions
if [ -f ~/.bashrc ]; then
. ~/.bashrc
fi
# User specific environment and startup programs
export JAVA_HOME=/opt/j2sdk_nb/j2sdk1.4.2
export PATH=$PATH:$JAVA_HOME/bin
PATH=$PATH:/opt/j2sdk_nb/j2sdk1.4.2/bin
CLASSPATH=$CLASSPATH:/opt/j2sdk_nb/j2sdk1.4.2/lib:/opt/j2sdk_nb/j2sdk1.4.2/jre/lib
export PATH CLASSPATH
PATH=$PATH:$HOME/bin
BASH_ENV=$HOME/.bashrc
USERNAME="root"
export USERNAME BASH_ENV PATH
The program sits in /
|
|
|
01-18-2004, 12:34 PM
|
#2
|
Member
Registered: Nov 2003
Location: switzerland
Distribution: Fedora Core 1.0/Gentoo
Posts: 35
Rep:
|
looks alright. what's the error?
|
|
|
01-18-2004, 03:26 PM
|
#3
|
Member
Registered: Mar 2003
Distribution: Debian
Posts: 208
Original Poster
Rep:
|
neuros]# java -jar /neurosjar/NeurosDBM.1.23.jar
bash: java: command not fou
|
|
|
01-19-2004, 01:14 AM
|
#4
|
Member
Registered: Nov 2003
Location: switzerland
Distribution: Fedora Core 1.0/Gentoo
Posts: 35
Rep:
|
if you do
echo $PATH
in a console you should see
/opt/j2sdk_nb/j2sdk1.4.2/bin
somewhere? is this true?
|
|
|
01-19-2004, 10:07 AM
|
#5
|
Member
Registered: Mar 2003
Distribution: Debian
Posts: 208
Original Poster
Rep:
|
]# echo $PATH
/usr/kerberos/sbin:/usr/kerberos/bin:/usr/local/bin:/usr/bin:/bin:/usr/X11R6/bin:/root/j2re1.4.2_03/bin/java/bin:/home/booda/bin
Yes. There it is.
|
|
|
01-20-2004, 06:54 AM
|
#6
|
Member
Registered: Nov 2003
Location: switzerland
Distribution: Fedora Core 1.0/Gentoo
Posts: 35
Rep:
|
where do you installed it? under /root/j2re1.4.2_03 or /opt/j2sdk_nb/j2sdk1.4.2? something seems to be wrong....
|
|
|
01-20-2004, 10:11 AM
|
#7
|
Member
Registered: Mar 2003
Distribution: Debian
Posts: 208
Original Poster
Rep:
|
I installed it in /root. That was wrong ?
|
|
|
01-20-2004, 12:43 PM
|
#8
|
Member
Registered: Nov 2003
Location: switzerland
Distribution: Fedora Core 1.0/Gentoo
Posts: 35
Rep:
|
i would'nt install it under root. i'd do it in /opt/java or /usr/local/java, so every other user can use java too. but if you have installed it in /root, your .bash_profile is wrong:
export JAVA_HOME=/root/j2re1.4.2_03
this variable must point on your java installation
|
|
|
01-22-2004, 12:05 PM
|
#9
|
LQ Newbie
Registered: Apr 2003
Location: hanish worlds
Distribution: fedora & windows XP
Posts: 23
Rep:
|
i wouldn't put it in /root... then you'd have to run as root all the time, as the /root directory is locked to non-root users.
and you know you should NOT routinely run as root... right?
|
|
|
01-22-2004, 12:18 PM
|
#10
|
LQ Newbie
Registered: Apr 2003
Distribution: Gentoo, Slackware
Posts: 25
Rep:
|
I think this link will help you get java setup: http://fedora.artoo.net/faq/#Java I would uninstal your current setup of java and start over again.
|
|
|
01-22-2004, 07:43 PM
|
#11
|
Member
Registered: Mar 2003
Distribution: Debian
Posts: 208
Original Poster
Rep:
|
thanks
|
|
|
All times are GMT -5. The time now is 05:57 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|