这些参数实际上都表示什么?

huangapple go评论66阅读模式
英文:

What actually all these parameter means?

问题

Sure, here's the translation of the provided text:

最近,我参加了一个在线编程测试,在那里我看到了这个命令。

javac -J-Xms8m -J-Xmx8m -Xlint:none -XDsuppressNotes $file

我知道的只有"-Xlint:none"是用来关闭JIT的,但我想知道其他参数是做什么的。

英文:

Recently, I participated in an online coding test where I saw this command.

javac -J-Xms8m -J-Xmx8m -Xlint:none -XDsuppressNotes $file

Only I know is -Xlint:none is for turning JIT off, but want to know what other parameters do.

答案1

得分: 1

-Joptions:
使用这个选项,你可以传递参数给由javac调用的Java启动器。

  • -J-Xms48m 将启动内存设置为48兆字节。

-Xlint:
此选项用于管理警告。如果不指定选项,它将启用所有推荐的警告。

  • -Xlint:all 启用所有推荐的警告。
  • -Xlint:none 禁用所有警告。
  • -Xlint:name 启用警告名称。
  • -Xlint:-name 禁用警告名称。

-XDsuppressNotes:
禁用注释。编译器生成错误、警告和注释。我无法从javac获取注释的示例,但我从gcc获取了一个示例。

注意: 每个未声明的标识符仅针对其出现的每个函数报告一次。

英文:

-Joptions:
Using this you are passing option to the java launcher called by javac.

  • -J-Xms48m sets the startup memory to 48 megabytes.

-Xlint
This option is for managing warnings. If no option is given it enables all recommended warnings.

  • -Xlint:all Enable all recommended warnings.
  • -Xlint:none Disable all warnings.
  • -Xlint:name Enable warning name.
  • -Xlint:-name Disable warning name.

-XDsuppressNotes
Disables notes. A compiler generates errors, warnings and notes. I could not get a note example from javac. I got one example from gcc

note: each undeclared identifier is reported only once for each function it appears in.

huangapple
  • 本文由 发表于 2020年8月10日 23:54:50
  • 转载请务必保留本文链接:https://go.coder-hub.com/63343632.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定