検索は、JDKインストールすることができます
yum -search java-1.8
インストールされたバージョンを選択します
yum -y install java-1.8.0-openjdk-devel.x86_64
JDKのインストールディレクトリを取得します。
/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64
下部の割り当てを増やします
export JAVA_HOME=/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.212.b04-0.el7_6.x86_64 export PATH=$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar 解释: - 只需要改第一行“export JAVA_HOME=”后的部分为你的JDK路径,注意末尾不要加“/”。其他都无需更改。 - exprot命令用于将shell变量输出为环境变量 - “:”冒号,linux中用于分割路径,Windows中用“;” 分割。,在此分割JAVA_HOME和其他环境变量($PATH) - CLASSPATH中的 “.” 不能丢失。CLASSPATH指引到tools.jar,才可以在任意目录下用“javac”命令 --------------------- 作者:大脑补丁 来源:CSDN 原文:https://blog.csdn.net/x541211190/article/details/74786393 版权声明:本文为博主原创文章,转载请附上博文链接!
すぐに有効にする環境変数
source /etc/profile
環境変数の設定が成功した確認、設定に関する次の情報が成功しました
[root@bogon /]# javac Usage: javac <options> <source files> where possible options include: -g Generate all debugging info -g:none Generate no debugging info -g:{lines,vars,source} Generate only some debugging info -nowarn Generate no warnings -verbose Output messages about what the compiler is doing -deprecation Output source locations where deprecated APIs are used -classpath <path> Specify where to find user class files and annotation processors -cp <path> Specify where to find user class files and annotation processors -sourcepath <path> Specify where to find input source files -bootclasspath <path> Override location of bootstrap class files -extdirs <dirs> Override location of installed extensions -endorseddirs <dirs> Override location of endorsed standards path -proc:{none,only} Control whether annotation processing and/or compilation is done. -processor <class1>[,<class2>,<class3>...] Names of the annotation processors to run; bypasses default discovery process -processorpath <path> Specify where to find annotation processors -parameters Generate metadata for reflection on method parameters -d <directory> Specify where to place generated class files -s <directory> Specify where to place generated source files -h <directory> Specify where to place generated native header files -implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files -encoding <encoding> Specify character encoding used by source files -source <release> Provide source compatibility with specified release -target <release> Generate class files for specific VM version -profile <profile> Check that API used is available in the specified profile -version Version information -help Print a synopsis of standard options -Akey[=value] Options to pass to annotation processors -X Print a synopsis of nonstandard options -J<flag> Pass <flag> directly to the runtime system -Werror Terminate compilation if warnings occur @<filename> Read options and filenames from file
インストールした仮想マシンの後、2つのNICはvmware1とvmware8それは何ですか見えますか?
VMwareのワークステーションに、例えば、仮想ネットワークデバイスの3種類があること:
VMnet0(ブリッジモード)、無仮想NICエンティティが、実際には、唯一のプロトコルの役割に関連して使用される対応するカード上のプロトコルをブリッジのVMwareブリッジプロトコル参加する仮想スイッチ、仮想および物理ネットワーク・カードに接続します。
vmnet1(ホストのみのモード、hostonly)、vmnet1仮想ネットワークカードを生成し、IPアドレスを定義し、専用仮想マシンホストモードが設定され、手動で設定vmnet1サブネットセグメントが、vmnet0アクセスないvmnet1と同様の効果に同じ必要性他のネットワークは、これだけの仮想および物理マシン間でデータを交換します。
vmnet8の(NATモード、ネットワークアドレス変換)は、仮想マシンのNIC VMnet8の生成、およびVMware NATサービスを介してゲートウェイとアドレス翻訳サービスを提供し、VMwareのDHCPサービスは、仮想マシンのIPアドレスが自動的に仮想マシン通信でvmnet8の経由のサービスが割り当てられています。
インターネットルータを使用して、物理マシン環境では、あなたが選択したブリッジモードが
物理マシンスタンドアロンのPPPoEダイヤルアップ、あなたがNATモードを選択し
た仮想マシンにアクセスしたくない、あなただけのホストモードを選択すること
CentOSの7のインストールjdk8
おすすめ
転載: www.cnblogs.com/wen-xin/p/11828230.html
おすすめ
ランキング