当前位置:网站首页>命令行的一些常用操作命令及常见错误的解决办法
命令行的一些常用操作命令及常见错误的解决办法
2022-07-17 18:24:00 【山野都有雾灯-Meico】
命令行的常用操作
- win+r打开命令行运行窗口。
- 输入d:可以将盘符切换到d盘,切换到其余盘符也是类似操作
- 输入dir,可以查看当前盘符的目录,就相当于在此电脑中双击文件夹
- 输入cd 目标文件,可以打开进入到当前文件(夹)里去
- 输入javac +.java文件,是编译java文件,编译后会生成字节码文件
- java+文件名是运行该java文件
注意:运行java文件和编译java文件的区别
编译java文件命令是javac,后面跟的是文件的全称包括文件类型,例如
javac HelloWorld.java
运行java文件命令是java,后面直接跟文件名,不需要加类型,例如:
java HelloWorld
- 输入cd . . 跳转到上一层目录(
.是当前目录,. .是父目录)
命令行常见错误
用命令行编译java文件时出现错误,如下:
这是因为编码方式不同,大部分记事本默认的编译方式是utf-8,javac编译的方式是GBK,为了解决这种问题我们只需在编译时设定特定的编码方式即可。如下图:

javac -encoding utf-8 HelloWorld.java
输入特定的编码方式后就不会报错。
运行结果如下:
有什么错误之处,还望大家指出,我也会及时修改,
大家对于本篇文章有什么疑惑之处,可以私信我,我会一一为大家解答。
欢迎私信!!!
边栏推荐
- Solutions to the failure of dedecms dream weaving to save the current column changes
- Li Kou 70 - climbing stairs - Dynamic Planning
- Onvif protocol related: common class description
- LeetCode 0565. Array nesting: convert to graph + modify in place の optimization
- codeforce:A. Difference Operations【数学思维】
- Onvif protocol related: 3.1.2 get the token list in digest mode
- Transphorm's surface mount packaging product series adds industry standard to-263 (D2Pak) packaging products to expand the advantages of supergan platform
- Framework construction of business card management
- 实现自动记录日志
- Onvif protocol related: 3.1.4 get the stream address in digest mode
猜你喜欢

XML建模(简单易学)

时序逻辑与组合逻辑的reg

onvif协议相关:3.1.3 Digest方式获取截图url
![[error record /selectpicker] the display position of dropdown menu is offset](/img/92/78787b33b941f09d753f0f747f8c72.png)
[error record /selectpicker] the display position of dropdown menu is offset

响应式织梦模板酒窖类网站

Qiyue supplies cumof nanocrystals loaded with methylene blue | femof nanosheets grown in situ on foam nickel | oxide nanowires /zif MOFs sugar gourd like Composites

onvif協議相關:4.1.3 WS-Username token方式獲取截圖url
![[Tencent blue whale] the seventh 7.24 operation and maintenance day holiday greetings ~ come and make a wish~](/img/60/ab96abd599230078b19abad0aecba2.png)
[Tencent blue whale] the seventh 7.24 operation and maintenance day holiday greetings ~ come and make a wish~

LeetCode 0565.数组嵌套:转换为图 + 原地修改の优化

2.三数之和
随机推荐
如何在MFC中添加一个线程
sqli-labs(less-11)
npm err! ant-design- [email protected] build: `umi build`
时序逻辑与组合逻辑的reg
【腾讯蓝鲸】第七届 7·24 运维日节日祝福送上~ 快来许愿~
Chitosan coated pcn224 nanoparticles | metal organic skeleton fe-mil-88nh2 | nickel based MOF material (Ni MOF / NF)
[pyGame learning notes] 6 Cursor mouse cursor
关于TCP/IP协议漏洞的安全措施
Framework construction of business card management
【Pygame 学习笔记】5.rect对象的碰撞检测
onvif协议相关:3.1.1 Digest方式获取Authorization
忘掉Postman,Apifox更好用
565.数组嵌套
动手学深度学习(第二版)注释后代码【持续更新】
What are the pain points of collaborative tools collaborative office management
Health prevention guide 3: health care
面试官:可以接受转Go吗?
Codeforce:a. doremy's IQ [reverse greed]
perl 命令批量替换文件中的一些内容
力扣64-最小路径和——动态规划入门题型







