LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-06-2009, 07:37 PM   #1
cdr0124
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Rep: Reputation: 0
Java Runtime Environment/BGPlay


Hi -

I'm trying to download Java Runtime Environment onto Linux in order to run an application called BGPlay (http://www.ris.ripe.net/bgplay/). Every time I try, and it seems as though everything is downloaded, I cannot find it on my computer anywhere and thus the application will not run. Any suggestions would be greatly appreciated.
 
Old 04-07-2009, 02:45 AM   #2
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,499

Rep: Reputation: 91
Strange... I have the 1.5.0_09 JRE installed on my FC6 and FC10 setups both at home and at work.

All I did was to get the

Code:
jre-1_5_0_09-linux-i586.bin
file from the Sun website. Then, I became root and ran it like this

Code:
# jre-1_5_0_09-linux-i586.bin [enter]
This installed it in

Code:
drwxr-xr-x  7 root  root      4096 Oct 12  2006 jre1.5.0_09
[rylan@development ~]$ pwd
/home/rylan
[rylan@development ~]$
i. e. in my home directory, it created a jre1.5.0_09 folder.

All I then did was to add this to my path variable in BASH, in my .bashrc:

Code:
PATH=$PATH:$HOME/jre1.5.0_09
Then, i was able to run any .jar from the commandline in BASH with

Code:
# java -jar jarname.jar
Hope this helped...
 
Old 04-07-2009, 04:49 AM   #3
cdr0124
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
I download jre1.6.0.13 and I have it installed and in a subdirectory on my desktop. However, everytime I try to run BGPlay (or anything else envolving Java), it says that I do not have the required plugins. I click on the link and install and then a window pops up saying java runtime environment is not available and to click here to download it. Even without that last part, any idea?
 
Old 04-07-2009, 08:00 AM   #4
knudfl
LQ 5k Club
 
Registered: Jan 2008
Location: Copenhagen, DK
Distribution: pclos2016 CentOS6.9 CentOS7.3 + 50+ other Linux OS, for test only.
Posts: 16,634

Rep: Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268Reputation: 3268
Welcome to LQ.

Try with this command : echo $PATH

and probably discover, that java is not in your path.

Which 'Linux' are you using ? ? Name and version, please.

"All" Linux's have a default Sun-java or similar, ready
to be installed with the package manager, a java which
just will work after install.
Please only download things not found in the package
collection for that OS.
.....
 
Old 04-08-2009, 01:58 AM   #5
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,499

Rep: Reputation: 91
See above - the problem you seem to have is that when you try to run a .jar, your system cannot "find" your installed JRE.

As Kundfl suggests, make sure that the path on your desktop where the Java runtime is located, is included in your system-wide $PATH.

Also, I'd suggest rather running the application from a terminal, than trying to run it directly from the desktop with a click on an icon.

This is possible, of course, but then you'd probably have to point the icon to a shell script that first sets up the path to the JRE, and then attempts to run the specified .jar.
 
Old 04-08-2009, 04:11 AM   #6
cdr0124
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
Thanks for the responses! I'm running Linux on Ubuntu 7.04. I had a feeling it was probably something close to that but I don't know how to fix that. I've never worked with moving things from one directory to another that I've downloaded/installed. I can't imagine its too difficult, I'm just not sure how. Knudfl, I tried to get java using apt-get but couldn't find it, that's why I went to the Sun website to download it.

When I run the command 'echo $PATH', I get: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games
 
Old 04-08-2009, 04:41 AM   #7
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,499

Rep: Reputation: 91
Of course, you can also try to run the .jar without changing your path.

Just specify the path in the command, e. g. if you JRE is in /home/myuser/jre1.5.0_09, and your .jar you want to run is in /home/myuser/somejavaprogram, do this in your terminal emulator:

Code:
$ cd somejavaprogram
$ /home/myuser/jre1.5.0_09/bin/java ./somejavaprogram_s_jar.jar
This way, you avoid that the $path environment variable needs to be used, since you use a fully specified location for the "java" executable.
 
Old 04-08-2009, 06:38 AM   #8
cdr0124
LQ Newbie
 
Registered: Apr 2009
Posts: 5

Original Poster
Rep: Reputation: 0
I don't have the .jar file, only an executable and .bin. I would like to know more on how to use PATH if you know how to do that : )
 
Old 04-09-2009, 05:32 AM   #9
rylan76
Senior Member
 
Registered: Apr 2004
Location: Potchefstroom, South Africa
Distribution: Fedora 17 - 3.3.4-5.fc17.x86_64
Posts: 1,499

Rep: Reputation: 91
Well to setup your $PATH in your terminal emulator, try this.

First, open your terminal emulator (xterm or konsole).

I'm assuming you are using BASH in the emulator.

Open the file ~/.bashrc in a text editor. If you assume that your path is /home/rylan/mypath which you want included in the $PATH for your session, add the following line at the BOTTOM of the .bashrc file:

Code:
PATH=$PATH:/home/rylan/mthpath
Then save and close the .bashrc file.

Close your terminal emulator and re-open it.

The path /home/rylan/mypath should now be in your $PATH. I. e. you should be able to be in any directory, and typing a command and pressing enter will cause the $PATH to be searched for the executable / command specified, and this will now include /home/rylan/mypath... i. e. the system will be able to "find" any executable you call from anywhere, that is in /home/rylan/mypath, AND any other directories along with it in your $PATH.

You can see what $PATH you currently have set in your terminal emulator by typing

Code:
$ set | grep PATH
Here's my $PATH, for example:

Code:
[rylan@development ~]$ set | grep PATH
PATH=/usr/lib/qt-3.3/bin:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin:/home/rylan/bin:/usr/sbin:./:/usr/bin:/usr/local/include:/home/rylan/povray-3.5:/usr/local/samba/bin/:/usr/local/mysql-standard-4.0.16-pc-linux-i686/bin/mysqladmin:/home/rylan/jdk1.5.0_09/bin/:/usr/local/lib:/home/rylan/jre1.5.0_09/bin:/usr/lib:/usr/local/kde/bin:/usr/local/k3d/bin:/usr/local/mysql/bin:/usr/local/samba/sbin/:/home/rylan/bin:/home/rylan/bin:/usr/sbin:./:/usr/bin:/usr/local/include:/home/rylan/povray-3.5:/usr/local/samba/bin/:/usr/local/mysql-standard-4.0.16-pc-linux-i686/bin/mysqladmin:/home/rylan/jdk1.5.0_09/bin/:/usr/local/lib:/home/rylan/jre1.5.0_09/bin:/usr/lib:/usr/local/kde/bin:/usr/local/k3d/bin:/usr/local/mysql/bin:/usr/local/samba/sbin/
[rylan@development ~]$
And here, for example, is my .bashrc:

Code:
[rylan@development ~]$ vi ~/.bashrc

# .bashrc

# User specific aliases and functions

alias mv='mv -i'
alias ls='ls -lh'

PATH=$PATH:$HOME/bin:/usr/sbin:./:/usr/bin:/usr/local/include:/home/rylan/povray-3.5:/usr/local/samba/bin/:/usr/local/mysql-standard-4.0.16-pc-linux-i686/bin/mysqladmin:/home/rylan/jdk1.5.0_09/bin/:/usr/local/lib:/home/rylan/jre1.5.0_09/bin:/usr/lib:/usr/local/kde/bin:/usr/local/k3d/bin:/usr/local/mysql/bin:/usr/local/samba/sbin/

LD_LIBRARY_PATH=/usr/local/lib:/usr/local/lib/xine/plugins:/usr/lib
LD_RUN_PATH=/usr/local/lib:/usr/local/lib/xine/plugins

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$HOME/Lightflow
export PYTHONPATH=$PYTHONPATH:/usr/lib/python2.4
export PYTHONHOME=$PYTHONPATH:/usr/lib/python2.4
export LIGHTFLOWPATH=$HOME/Lightflow
export PPMODELER_DIR=/home/rylan/ppModeler

CVSROOT=/usr/local/cvs/; export CVSROOT

CPPFLAGS='-I/usr/local/BerkeleyDB4.3/include'
export CPPFLAGS
LDFLAGS='-L/usr/local/BerkeleyDB4.3/lib'

CFLAGS="-O3 -fomit-frame-pointer -ffast-math -fexpensive-optimizations -fstrict-aliasing -funroll-loops -funroll-all-loops -fforce-addr -finline-functions -frerun-loop-opt -falign-loops=4 -falign-jumps=4 -falign-functions=4 -march=athlon -mmmx -msse -m3dnow"
export CFLAGS
Note the "PATH=" line just under "alias ls='ls -lh'"

Hope this helps,
 
  


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
Java Programming: Java Runtime Environment not found when trying to compile murbz Linux - Software 2 03-26-2009 03:04 AM
Java runtime environment WayneS Linux - Software 2 09-07-2006 04:47 PM
java runtime environment neilcpp Slackware 1 12-21-2005 05:45 AM
Java runtime environment Ab3n Linux - Newbie 5 08-19-2005 03:50 PM
Which Java Runtime Environment to use? r_jensen11 Linux - Software 4 09-13-2003 06:43 PM


All times are GMT -5. The time now is 06:11 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration