java: comando não encontrado no cygwin bash

0

Estou tentando executar uma série de programas no Cygwin.

Meu dilema atual está executando um arquivo java. Minha entrada e o erro estão abaixo.

Gaius@Ellislab2015 ~/muTect-1.1.4-bin
$ java -jar muTect-1.1.4.jar
-bash: java: command not found

Como posso corrigir isso?

    
por Gaius Augustus 23.05.2015 / 00:24

2 respostas

0

-bash: java: comando não encontrado

Você precisa adicionar o Java à sua variável bash PATH .

Isso normalmente é feito editando as linhas apropriadas em ~/.bash_profile .

# User dependent .bash_profile file

...

# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
#   PATH="${HOME}/bin:${PATH}"
# fi

Outras leituras

por 23.05.2015 / 00:56
0

Eu adicionei o seguinte ao meu arquivo em home / .bash_profile (~ / .bash_profile), como sugerido por DavidPostill, e depois de examinar os documentos que ele referenciou:

Antes:

# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
#   PATH="${HOME}/bin:${PATH}"
# fi

Depois:

# Set PATH so it includes user's private bin if it exists
# if [ -d "${HOME}/bin" ] ; then
# PATH=/cygdrive/c/Program\ Files\ (x86)/Java/jre1.8.0_45/bin/:${PATH}
# fi
    
por 26.05.2015 / 20:51