网站首页 > java教程 正文
Java 开发环境
- Java Windows 开发环境配置
- Java Linux 开发环境配置
Java Windows 开发环境配置
1、下载JDK
我们直接到管网下载
下载镜像:镜像地址/technetwork/java/javase/downloads/index.html
2、下载文件步骤
2.1选择JDK 版本(Java SE 8u201 / Java SE 8u202)
2.2同步协议选择(Windows x64 jdk-8u201-windows-x64.exe)
2.3点击jdk-8u201-windows-x64.exe 安装
2.4 安装路径的选择
2.5 jre 安装路径的选择
2.6 JDK 环境配置
我的电脑→右键→属性→高级系统设置→环境变量
变量设置
- 新建系统变量【JAVA_HOME】:JDK根路径:D:\mainboot\Java\jdk1.8.0_201
- 新建系统变量【CLASSPATH】:JDK的jar架包路径:.;%JAVA_HOME%\lib\dt.jar;%JAVA_HOME%\lib\tools.jar;
- 【PATH】环境变量中追加Java环境变量: ;%JAVA_HOME%\bin
输入cmd,进入dos命令框中输入javac和java
安装成功
Java Linux 开发环境配置
1、下载JDK
我们直接到管网下载
下载镜像:镜像地址/technetwork/java/javase/downloads/index.html
2、下载文件步骤
2.1选择JDK 版本(Java SE 8u201 / Java SE 8u202)
2.2同步协议选择(Linux x64 jdk-8u201-linux-x64.tar.gz)
2.3选择保存
3、安装 JDK 步骤
3.1打开操作终端用命令安装
3.2创建目录
mkdir -p /mnt/mainboot/env/
3.3把下载文件移到新建目录
mv ../Downloads/jdk-8u201-linux-x64.tar.gz /mnt/mainboot/env/
3.4进入新建目录
cd /mnt/mainboot/env/
3.5解压文件
tar -zxvf jdk-8u201-linux-x64.tar.gz
3.6 设置JDK配置变量,在profile文件后面追加
vim /etc/profile
export JAVA_HOME=/mnt/mainboot/env/jdk1.8.0_201 export PATH=.:$JAVA_HOME/bin:$PATH export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
3.7 执行生效
source /etc/profile
3.8测试安装是否成功
java
Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) where options include: -d32 use a 32-bit data model if available -d64 use a 64-bit data model if available -server to select the "server" VM The default VM is server. -cp -classpath A : separated list of directories, JAR archives, and ZIP archives to search for class files. -D= set a system property -verbose:[class|gc|jni] enable verbose output -version print product version and exit -version: Warning: this feature is deprecated and will be removed in a future release. require the specified version to run -showversion print product version and continue -jre-restrict-search | -no-jre-restrict-search Warning: this feature is deprecated and will be removed in a future release. include/exclude user private JREs in the version search -? -help print this help message -X print help on non-standard options -ea[:...|:] -enableassertions[:...|:] enable assertions with specified granularity -da[:...|:] -disableassertions[:...|:] disable assertions with specified granularity -esa | -enablesystemassertions enable system assertions -dsa | -disablesystemassertions disable system assertions -agentlib:[=] load native agent library , e.g. -agentlib:hprof see also, -agentlib:jdwp=help and -agentlib:hprof=help -agentpath:[=] load native agent library by full pathname -javaagent:[=] load Java programming language agent, see java.lang.instrument -splash: show splash screen with specified image See 镜像地址/technetwork/java/javase/documentation/index.html for more details.
javac
Usage: javac 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 Specify where to find user class files and annotation processors -cp Specify where to find user class files and annotation processors -sourcepath Specify where to find input source files -bootclasspath Override location of bootstrap class files -extdirs Override location of installed extensions -endorseddirs Override location of endorsed standards path -proc:{none,only} Control whether annotation processing and/or compilation is done. -processor [,,...] Names of the annotation processors to run; bypasses default discovery process -processorpath Specify where to find annotation processors -parameters Generate metadata for reflection on method parameters -d Specify where to place generated class files -s Specify where to place generated source files -h Specify where to place generated native header files -implicit:{none,class} Specify whether or not to generate class files for implicitly referenced files -encoding Specify character encoding used by source files -source Provide source compatibility with specified release -target Generate class files for specific VM version -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 Pass directly to the runtime system -Werror Terminate compilation if warnings occur @ Read options and filenames from file
安装成功
希望我的分享可以帮助到你,如果你在内容技术上遇到难题,可以+关注■@主引教程 ,反馈给我们。我们会及时回复,如果有那些内容有误可以直接提出来,我们会及时纠正,谢谢来访。
猜你喜欢
- 2024-09-19 Windows下Java环境变量配置指南(windows java环境变量)
- 2024-09-19 Java:配置Java开发环境(怎么配置java开发环境)
- 2024-09-19 本地Java大数据环境基础配置(java大数据存储方案)
- 2024-09-19 你真的理解Java环境配置(Java免安装)
- 2024-09-19 每日学编程之JAVA(二)—开发环境配置
- 2024-09-19 Java 开发环境配置实操(配置java开发环境及java程序调试)
- 2024-09-19 java环境搭建系列:JDK环境变量详细配置
- 2024-09-19 一起来学大数据|Java环境的安装配置,你没见过的方式
- 2024-09-19 Java开发环境的配置(java开发环境的配置及运行心得和体会)
- 2024-09-19 Java环境搭建,环境变量配置(java的环境变量怎么配置)
你 发表评论:
欢迎- 最近发表
-
- class版本不兼容错误原因分析(class更新)
- 甲骨文Oracle公司为Java的最新LTS版本做出改进
- 「版本发布」Minecraft Java开发版 1.19.4-pre1 发布
- java svn版本管理工具(svn软件版本管理)
- 我的世界1.8.10钻石在第几层(我的世界1.7.2钻石在哪层)
- Java开发高手必备:在电脑上轻松切换多个JDK版本
- 2022 年 Java 开发报告:Java 8 八年不到,开发者都在用什么?
- 开发java项目,选择哪个版本的JDK比较合适?
- Java版本选型终极指南:8 vs 17 vs 21特性对决!大龄程序员踩坑总结
- POI Excel导入(poi excel导入附件)
- 标签列表
-
- java反编译工具 (77)
- java反射 (57)
- java接口 (61)
- java随机数 (63)
- java7下载 (59)
- java数据结构 (61)
- java 三目运算符 (65)
- java对象转map (63)
- Java继承 (69)
- java字符串替换 (60)
- 快速排序java (59)
- java并发编程 (58)
- java api文档 (60)
- centos安装java (57)
- java调用webservice接口 (61)
- java深拷贝 (61)
- 工厂模式java (59)
- java代理模式 (59)
- java.lang (57)
- java连接mysql数据库 (67)
- java重载 (68)
- java 循环语句 (66)
- java反序列化 (58)
- java时间函数 (60)
- java是值传递还是引用传递 (62)
本文暂时没有评论,来添加一个吧(●'◡'●)