-bash: java: command not found 解决方法

-bash: java: command not found

在卸载jdk之后,会报错

就是配置环境变量出了问题,

JAVA_HOME=/usr/java/jdk1.8.0_25

PATH=$PATH:$JAVA_HOME/bin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/X11R6/bin

CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib/dt.jar

export  JAVA_HOME  PATH  CLASSPATH

source /etc/profile 生效设置

时间: 2024-08-28 16:16:57

-bash: java: command not found 解决方法的相关文章

【转】bash: ssh: command not found解决方法(linux)

原文转自:http://www.cnblogs.com/ahauzyy/archive/2013/04/25/3043699.html 今天在搭建hadoop的开发环境中,用的是centsos6.0的操作系统,由于选安装时选的是最小安装.在配置Master无密码登录时,敲ssh命令时出现 1 -bash: ssh: command not found 最后在网上找到的解决方法为 1 yum -y install openssh-clients

bash: ifconfig: command not found解决方法

1.问题: #ifconfig bash: ifconfig: command not found 2.原因:非root用户的path中没有/sbin/ifconfig ,其它的命令也可以出现这种情况,解决的方法是一样的. # whereis ifconfig #ifconfig位置 ifconfig: /sbin/ifconfig /usr/share/man/man8/ifconfig.8.gz # echo $PATH /usr/kerberos/sbin:/usr/kerberos/bi

linux -bash: ipconfig: command not found 解决方法

问题: ipconfig: command not found [[email protected] root]# ipconfig -bash: ipconfig: command not found 方法: 1.安装好CentOS5.5后,ipconfig找不到那说明没有将ipconfig命令配置到环境变量. 2.测试下结果echo $PATH,果然/sbin这个主要目录不在PATH. [[email protected] network-scripts]# echo $PATH /usr/

bash: pip: command not found... 解决方法

下载安装wget "https://pypi.python.org/packages/source/p/pip/pip-1.5.4.tar.gz#md5=834b2904f92d46aaa333267fb1c922bb" --no-check-certificate tar -axf pip-1.5.4.tar.gz cd pip-1.5.4/ python setup.py install 安装完后,使用 pip -V 报错,如下:bash: pip: command not fou

lsb_release: command not found 解决方法(转)

问题:通过lsb_release -a 是查看linux系统版本时报错,具体的解决办法如下: [[email protected] ~]# lsb_release -a-bash: lsb_release: command not found 解决方法:yum install redhat-lsb -y 安装完之后再查看版本信息: [[email protected] upload]# lsb_release -aLSB Version: :core-4.0-amd64:core-4.0-noa

3、Ora_Q3_bash: sqlplus: command not found 解决方法

bash: sqlplus: command not found 解决方法 环境变量已经配好,但是仍报错: # vi  .bash_profile # .bash_profile # Get the aliasesand functions if [ -f ~/.bashrc ];then . ~/.bashrc fi # User specificenvironment and startup programs PATH=$PATH:$HOME/bin #AddORACLE_SID ,ORAC

bash: java: command not found

[[email protected] ~]# java -version -bash: java: command not found 出现上面问题,解决方法: [[email protected] ~]# source /etc/profile 最后在测试是否安装成功: [[email protected] ~]# java -version java version "1.8.0_241" Java(TM) SE Runtime Environment (build 1.8.0_2

Tomcat 优化 java.lang.OutOfMemoryError: Java heap space 的解决方法

java.lang.OutOfMemoryError: Java heap space 的解决方法 关键字: tomcat outofmemoryerror permgen space java heap space 最近在熟悉一个开发了有几年的项目,需要把数据库从mysql移植到oracle,首先把jdbc的连接指向mysql,打包放到tomcat里面,可以跑起来,没有问题,可是当把jdbc连接指向oracle的时候,tomcat就连续抛java.lang.OutOfMemoryError的错

sun.reflect.generics.reflectiveObjects.TypeVariableImpl cannot be cast to java.lang.Class异常解决方法

package com.wzs; import java.lang.reflect.ParameterizedType; public class T1<T> {     private Class classt;     public T1() {         ParameterizedType type = (ParameterizedType) this.getClass().getGenericSuperclass();         this.classt = (Class)