LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 01-18-2004, 11:20 AM   #1
mohapi
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 208

Rep: Reputation: 30
/.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 /
 
Old 01-18-2004, 12:34 PM   #2
wampfler
Member
 
Registered: Nov 2003
Location: switzerland
Distribution: Fedora Core 1.0/Gentoo
Posts: 35

Rep: Reputation: 15
looks alright. what's the error?
 
Old 01-18-2004, 03:26 PM   #3
mohapi
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 208

Original Poster
Rep: Reputation: 30
neuros]# java -jar /neurosjar/NeurosDBM.1.23.jar
bash: java: command not fou
 
Old 01-19-2004, 01:14 AM   #4
wampfler
Member
 
Registered: Nov 2003
Location: switzerland
Distribution: Fedora Core 1.0/Gentoo
Posts: 35

Rep: Reputation: 15
if you do
echo $PATH
in a console you should see
/opt/j2sdk_nb/j2sdk1.4.2/bin
somewhere? is this true?
 
Old 01-19-2004, 10:07 AM   #5
mohapi
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 208

Original Poster
Rep: Reputation: 30
]# 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.
 
Old 01-20-2004, 06:54 AM   #6
wampfler
Member
 
Registered: Nov 2003
Location: switzerland
Distribution: Fedora Core 1.0/Gentoo
Posts: 35

Rep: Reputation: 15
where do you installed it? under /root/j2re1.4.2_03 or /opt/j2sdk_nb/j2sdk1.4.2? something seems to be wrong....
 
Old 01-20-2004, 10:11 AM   #7
mohapi
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 208

Original Poster
Rep: Reputation: 30
I installed it in /root. That was wrong ?
 
Old 01-20-2004, 12:43 PM   #8
wampfler
Member
 
Registered: Nov 2003
Location: switzerland
Distribution: Fedora Core 1.0/Gentoo
Posts: 35

Rep: Reputation: 15
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
 
Old 01-22-2004, 12:05 PM   #9
rocannon
LQ Newbie
 
Registered: Apr 2003
Location: hanish worlds
Distribution: fedora & windows XP
Posts: 23

Rep: Reputation: 15
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?
 
Old 01-22-2004, 12:18 PM   #10
krdp
LQ Newbie
 
Registered: Apr 2003
Distribution: Gentoo, Slackware
Posts: 25

Rep: Reputation: 15
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.
 
Old 01-22-2004, 07:43 PM   #11
mohapi
Member
 
Registered: Mar 2003
Distribution: Debian
Posts: 208

Original Poster
Rep: Reputation: 30
thanks
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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



Similar Threads
Thread Thread Starter Forum Replies Last Post
How to compile and run a java program in linux !!!! jmax24 Programming 7 08-06-2010 03:56 AM
Can't run two instances of a java program audibel Linux - Software 0 02-19-2005 04:01 PM
error when run java program vanhelsing Programming 8 12-24-2004 02:23 AM
How to run a command through a Java program kernelvn Programming 3 12-02-2004 09:25 PM
how to run linux command from java program? ranger225 Linux - Newbie 1 11-10-2004 06:55 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 05:57 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration