目录
JDK
简介
JDK:java development kit (java开发工具)
JDK / JRE / JVM 区别
- JRE:java runtime environment (java运行时环境)
- JVM:java virtuak machine (java虚拟机)
- 一般来讲
- JDK 会包含 JRE 和 JVM
- JRE 会包含 JVM
环境
- ubuntu - 20.04
- Win11
- JDK - 17.0.2
官网下载
- https://www.oracle.com/java/
- 如图即可找到jdk的下载
- linux系统
- 后缀为tar.gz的下载后上传到linux(建议使用WinSCP),然后解压
- linux解压tar.gz命令:tar -zxvf 压缩包名.tar.gz
- 其他类型的根据对应系统的安装命令执行即可
- linux的JAVA环境变量配置
- 后缀为tar.gz的下载后上传到linux(建议使用WinSCP),然后解压
- Win
- 后缀为zip的压缩包下载后需要同Linux的tar.gz类型的操作一致(见本文的上文)
- 后缀是exe的就是有图形界面的安装程序,新手可以用这个,安装比较简单
- 像我的习惯是在win也使用zip压缩包,因为这个在同时安装多个java版本时,配置环境变量挺简单的,安装程序的环境变量配置没试过。
- 如果你使用的是压缩包,则需要:win的JAVA环境变量配置
- 如果你使用的是安装程序,则跟着安装程序走就可以了。
配置环境变量
当我们在cmd命令行敲命令时,cmd如何知道这个命令对应的可执行文件在哪里?这就要配置环境变量来告诉cmd去哪里找。当然环境变量还有其他用途,比如我们下面配置的CLASSPATH就关系到javac的编译。
Linux
- 修改配置文件 /etc/profile
- # vi /etc/profile
- 然后按大写的 G,就会跳到文件末尾
- 按 i,进入编辑模式
- 配置JAVA_HOME
- 输入:
- JAVA_HOME = 刚刚解压的java文件夹目录
- 比如:JAVA_HOME=/home/0Acoolight/java/jdk-17.0.1
- 注意:这个java路径的下一级就包含bin,conf等目录和文件,千万不能搞错了。
- 配置这个可以让你在cmd的任意目录下都可以执行 java / javac 命令。
- 比如:java -version ;javac -version 等。
- 输入:
- 配置CLASSPATH
- 这个是固定的,你也可以在这里加附加的jar包,新手复制下面的内容进去就可以了。
- CLASSPATH=.:$JAVA_HOME/lib/tools.jar:$JAVA_HOME/lib
- 配置这个是给 javac 编译时用的。
- 配置PATH
- 直接复制进去即可
- PATH=$JAVA_HOME/bin:$PATH
- 最后设置PATH生效:
- export PATH
- 完成后就是这个样子:
- 保存退出
- 按英文的冒号 :
- 输入wq,然后回车即可保存退出vi并回到cmd。
- 令配置文件生效:
- # source /etc/profile
- 测试是否成功
Win
- 按 win + i 打开设置
- 点 高级系统设置
- 点 环境变量
- 点 新建
- 输入变量名:JAVA_HOME
- 输入变量值:刚刚的java压缩包解压后的目录
- 注意:这个变量值的目录的下一级就包含着bin conf等目录,千万不能错
- 再点一次新建:
- 输入变量名:CLASSPATH
- 输入变量值:.;%JAVA_HOME%\lib;%JAVA_HOME%\lib\tools.jar
- 强烈建议复制进去,注意变量值的最前面,是有一个英文的句号 . 和分号 ;
- 修改Path
- 在系统变量里找变量名为 Path 的那一行
- 选中它,然后点编辑
- 点 新建
- 输入 %JAVA_HOME%\bin
- 点上移,直到刚刚新建的那一行到第一行
- 最后点确定即可
- 至此环境变量配置就完成了
- 测试是否成功:
- 如果你已经打开cmd,请关掉重开或者重新开一个,然后进行下面的测试。
测试是否成功
- 在cmd输入 java -version,然后回车
- 在cmd输入 javac -version,然后回车
- 如果配置成功,效果如图:
- 由于你的java版本号不一定和我一样,所以只要提示信息不是报错就行。
多个JAVA版本的配置
由于有些软件对JAVA版本有要求,所以可以会要安装多个JAVA版本。
- 思路:
- 还记得我们之前配置的环境变量 JAVA_HOME 吗
- 我们只需要搞一个多个中间变量去指向各自的java版本的路径,然后想启动哪个版本就让JAVA_HOME指向哪个中间环境变量即可。
- 实践:
win环境:
- 比如我同时安装了 JAVA8 和 JAVA17:
- 那么就先新建两个中间环境变量:JAVA8_HOME 和 JAVA17_HOME ,并输入对应的JAVA所在路径。
- 然后修改环境变量:JAVA_HOME
- 比如我现在想要使用JAVA17,那就把JAVA_HOME的变量值改为 %JAVA17_HOME%
- 如果我又想用回JAVA8,则把JAVA_HOME的变量值改为 %JAVA8_HOME%
- 到这里就完成了,打开cmd,输入:java -verison 查看java版本
linux环境
- linux和win基本一致,不过要注意:
- 变量值引用变量时,win下写%JAVA17_HOME%,linux要写$JAVA17_HOME
- 路径分隔在win下是分号 ; ,在linux是冒号 :
- 路径在win下是反斜杠 \ ,在linux是斜杠 /
- 保存并退出vi后,在cmd执行命令让配置文件生效:
- # source /etc/profile
- 如图是使用JAVA17。如果想使用JAVA8:
- 把 JAVA_HOME=$JAVA17_HOME
- 改为JAVA_HOME=$JAVA8_HOME
cytotec online https://lisinopril.guru/# lisinopril cheap price
lasix online
http://furosemide.win/# furosemide 40 mg
https://lipitor.guru/# lipitor generic brand
buy lisinopril 20 mg without a prescription: Lisinopril online prescription – cost of brand name lisinopril
where can i buy lisinopril: Buy Lisinopril 20 mg online – zestoretic generic
Cytotec 200mcg price https://lisinopril.guru/# can i buy lisinopril online
furosemide 40mg
lasix 100mg: cheap lasix – lasix for sale
buy nolvadex online buy tamoxifen online tamoxifen rash pictures
https://furosemide.win/# lasix
buy cytotec in usa https://furosemide.win/# lasix online
lasix generic name
buy misoprostol over the counter http://lisinopril.guru/# zestoretic 20 25mg
lasix 40mg
Abortion pills online https://lipitor.guru/# generic lipitor 20 mg
lasix 100 mg
http://lipitor.guru/# buying lipitor from canada
lasix 40mg: furosemide 40mg – lasix 20 mg
purchase cytotec: purchase cytotec – п»їcytotec pills online
BTC USD – Gráfico diario The daily chart reveals the BTC USD market tends to move down more if the price has to consolidate near the $20,000 support level in the long-term run. The SMA trend lines are far above the current trading spot. The 50-day SMA indicator is above the 14-day SMA indicator. The Stochastic Oscillators are in the oversold region with their lines conjoined within. That portends a falling force is playing out currently. From a crypto perspective, we note the perception of the market for cryptos as riskier assets, so anything in the decision that could turn the market sentiment towards a more risk-oriented approach could support cryptos and vice versa. Hence breaking down the three prementioned remaining elements, we note that should the accompanying sentiment and Fed Chairman Powell’s press conference, be characterised by a hawkish tone, contradicting market expectations, we may see the market turning more cautious, thus exercising a bearish pressure on cryptos, while should the bank allow for some innuendos that rate cuts are nearing we may see cryptos getting some support.
http://www.le-projet.cc/bio/?malicowhip1987
¿Buscas una forma sencilla pero sin renunciar a nada para pasar de BTC a EUR? Tenemos lo que necesitas. Nuestra herramienta de Bitcoin a Euro hace exactamente eso. Utilice el convertidor de criptomonedas y la calculadora de Bitsgap para actualizaciones 24 7 de los tipos de cambio entre las criptomonedas y las monedas fiduciarias, incluyendo BTC, ETH, XRP a USD, EUR, GBP. En los últimos 7 días, la tasa de cambio ha disminuido en un -1.68%. Mientras que en las últimas 24 horas, la tasa ha cambiado en un 1.34%. El mes pasado en estas fechas, el valor de 1 ETH era de 0.0490947 BTC, que es un 5.80% de aumento respecto a su valor actual. Si vemos un año atrás, el ETH ha cambiado en un -0.0203371 BTC. Vale la pena señalar que CoinMarketCap calcula los datos semanalmente. En cuanto a los datos de 24 horas de Rango criptográfico El 12 de mayo, el dominio de BTC había caído a alrededor del 50%.
buying prescription drugs in mexico: Best online Mexican pharmacy – mexican pharmaceuticals online
best online pharmacies in mexico: Purple pharmacy online ordering – mexican online pharmacies prescription drugs
pharmacy website india: Online medicine home delivery – indian pharmacy online
indianpharmacy com: Indian pharmacy international shipping – Online medicine order
buying prescription drugs in mexico online: mexican pharmacy – buying from online mexican pharmacy
buy ed medication online: get ed prescription online – where can i get ed pills
Zulubet has you covered if you’re looking for a means to sharpen your football analysis, calculate your chances of scoring a goal or stopping one, etc. It displays the chances of various outcomes based on previous results! That’s why the Zulubet prediction correct score is one of the most accurate. Overall, Zulubet prediction correct score is a great way to choose the best individual event for each game, and I highly recommend using it. Open an account with bet365 to bet on a huge range of markets with the world’s favourite online sports betting company. Use bonus code FP365. Click for more info. Instruction on how to install Zulubet vitibet Betting tips – correct score on Windows 10 Windows 11 PC & Laptop We have a number of bookmakers integrated into our site, meaning you can pick and choose which would suit you. To place a correct score bet using a bookmaker’s free bet or sign up offer, take a look at our free bets.
https://www.hiddenbridgegolf.com/forum/general-discussions
The John Deere Classic is the location of several notable first career victories, including Bryson DeChambeau’s and Jordan Spieth’s. With the Open Championship next week, you won’t see names like that returning, but there’s a whole new group of young, talented golfers looking to earn their first win on Tour. I bet on golf for fun. You should too. Life is too short to bet favorites! Therefore, I don’t get the betting erection I crave betting guys at 18 1 or 9 1. I realize that may be the sharper way to do things, but F that. I’ve felt the rush of have a big triple digit winning golf bet hit…and Daddy likes! If you’re an avid reader of my column, you probably am sensing a bit of apathy towards this tournament. You’re correct. TPC Deere Run is…fine. There’s nothing remarkable about TPC Deere Run. The (few) viewers that watch the John Deere certainly won’t be riveted by the canvas that the golfers are painting on.
erectile dysfunction online: Best ED pills non prescription – best online ed meds
ed online pharmacy: cheap ed medicine – ed meds on line
buying prescription drugs in mexico: Medicines Mexico – mexico drug stores pharmacies
reputable mexican pharmacies online: purple pharmacy mexico price list – mexican pharmaceuticals online
top online pharmacy india: Top online pharmacy in India – п»їlegitimate online pharmacies india
top online pharmacy india: indian pharmacy online – india pharmacy
https://edpillpharmacy.store/# boner pills online
pharmacy website india: indian pharmacy – best online pharmacy india
cheap ed medication: online ed prescription same-day – online ed medication
http://edpillpharmacy.store/# cheap ed pills online
https://mexicopharmacy.win/# mexico drug stores pharmacies
affordable ed medication: cheap ed pills online – cheapest online ed treatment
mexico pharmacies prescription drugs: Purple pharmacy online ordering – mexican border pharmacies shipping to usa
https://edpillpharmacy.store/# what is the cheapest ed medication
https://mexicopharmacy.win/# medication from mexico pharmacy
http://edpillpharmacy.store/# online ed treatments
http://mexicopharmacy.win/# medication from mexico pharmacy
mexico drug stores pharmacies: Best pharmacy in Mexico – medication from mexico pharmacy
online pharmacy india: Top mail order pharmacies – indian pharmacy online
http://mexicopharmacy.win/# buying from online mexican pharmacy
https://edpillpharmacy.store/# ed prescription online
best online pharmacies in mexico: Medicines Mexico – mexican rx online
indianpharmacy com: Top online pharmacy in India – indian pharmacies safe
cheap erection pills: cheap ed – best online ed meds
https://mexicopharmacy.win/# mexican pharmaceuticals online
http://edpillpharmacy.store/# ed prescription online
best online ed pills: ED meds online with insurance – online ed medications