Enviado em 26/02/2016 - 16:43h
Estou tendo problemas par compilar o java no terminal, nã olembro como ativar a a máquina virtual.
root@hotpc:/home/mbrainiac/NetBeansProjects# javac Teste.java
bash: javac: comando não encontrado
Fiz este procedimentos no Bash:
# locate javac
#/usr/share/bash-completion/completions/javac
# nano ~/.profile
Add the following lines to whichever file:
PATH=/path/to/java/bin:$PATH
JAVA_HOME=/path/to/java
export PATH
export JAVA_HOME
in Debian 8
PATH=/usr/share/bash-completion/completions/javac
JAVA_HOME=/path/to/java
export PATH
export JAVA_HOME
where /path/to/java is wherever you installed it (Such as /usr/local/java)
I am not sure, but you may need to set the CLASSPATH as well in order to compilte a java program. This will be /path/to/java/lib. (With the same syntax as above)
When you have added the above lines to .bash_profile, enter the command:
Code:
source .bash_profile
Ao final tentei:
root@hotpc:/home/mbrainiac/NetBeansProjects# source .bash_profilebash: .bash_profile: Arquivo ou diretório não encontrado
Segui esta dica:
http://www.linuxquestions.org/questions/linux-newbie-8/bash-javac-command-not-found-253914/
Alguém pode me ajudar?
root@hotpc:/home/mbrainiac/NetBeansProjects# javac Teste.java
bash: javac: comando não encontrado
Fiz este procedimentos no Bash:
# locate javac
#/usr/share/bash-completion/completions/javac
# nano ~/.profile
Add the following lines to whichever file:
PATH=/path/to/java/bin:$PATH
JAVA_HOME=/path/to/java
export PATH
export JAVA_HOME
in Debian 8
PATH=/usr/share/bash-completion/completions/javac
JAVA_HOME=/path/to/java
export PATH
export JAVA_HOME
where /path/to/java is wherever you installed it (Such as /usr/local/java)
I am not sure, but you may need to set the CLASSPATH as well in order to compilte a java program. This will be /path/to/java/lib. (With the same syntax as above)
When you have added the above lines to .bash_profile, enter the command:
Code:
source .bash_profile
Ao final tentei:
root@hotpc:/home/mbrainiac/NetBeansProjects# source .bash_profilebash: .bash_profile: Arquivo ou diretório não encontrado
Segui esta dica:
http://www.linuxquestions.org/questions/linux-newbie-8/bash-javac-command-not-found-253914/
Alguém pode me ajudar?