You are not logged in.

#1 2008-01-05 19:07:04

WernerL
Member
Registered: 2007-07-03
Posts: 161

jre installed with pacman, but still can't run an java archive file

Hello,

I just installed the jre with the command: pacman -S jre
after it was finished I did this: java -rar file.jar
"bash: java: command not found"

Did I forget something? :-) Can't find anything in the wiki sad

Offline

#2 2008-01-05 19:21:04

lenni
Member
From: London, UK
Registered: 2007-09-21
Posts: 95

Re: jre installed with pacman, but still can't run an java archive file

try

java -jar file.jar

Offline

#3 2008-01-05 19:28:42

skymt
Member
Registered: 2006-11-27
Posts: 443

Re: jre installed with pacman, but still can't run an java archive file

Try logging out and back in. smile

Arch's Java package installs a script in /etc/profile.d that sets up a few environment variables, including adding the directory java is in to your $PATH.

Offline

#4 2008-01-05 19:54:45

WernerL
Member
Registered: 2007-07-03
Posts: 161

Re: jre installed with pacman, but still can't run an java archive file

Such a simple solution, log out and back in... lol big_smile It worked ! great.

lennl: yes jar insteed of rar.. lol :-)

Offline

#5 2008-01-05 23:37:31

nDray
Member
From: Portugal
Registered: 2007-01-21
Posts: 143
Website

Re: jre installed with pacman, but still can't run an java archive file

from now on use

$. /etc/profile

or

$source /etc/profile

it's actually the same thing... '.' (dot) and 'source' do the same thing... no need for loggin off/on...

Offline

#6 2008-01-06 00:56:04

Zer0
Member
From: Windsor, ON, Canada
Registered: 2006-08-25
Posts: 299

Re: jre installed with pacman, but still can't run an java archive file

OMG I didn't know about the dot trick..  I know about using source but a dot.. smile  The command line always has nice little tricks up it's sleeve.

Offline

Board footer

Powered by FluxBB