简体   繁体   English

Mac 和 Window 用户可以使用 Eclipse 与 openJDK8 一起工作吗?

[英]Can Mac and Window users work together with openJDK8 using Eclipse?

Our team wants to use openJDK 8 (javac 1.8.0_265) on both mac and windows using Eclipse(2018-09).我们的团队希望使用 Eclipse(2018-09) 在 mac 和 windows 上使用 openJDK 8 (javac 1.8.0_265)。

Will there be any problems when sharing files etc?共享文件等会不会有什么问题?

You could run into problems if you use the tab (HT) character for indentation.如果使用制表符 (HT) 字符进行缩进,可能会遇到问题。 The default tab width on Mac OS is 8 spaces, but on Windows it is default. Mac OS 上的默认选项卡宽度为 8 个空格,但在 Windows 上为默认值。 If you don't necessary steps, code written on Mac OS will look mis-indented on Windows and vice versa.如果您没有必要的步骤,在 Mac OS 上编写的代码在 Windows 上看起来会错误缩进,反之亦然。

A solution: Make it part of your coding conventions that only space (SP) characters shall be used for indentation.解决方案:将仅空格 (SP) 字符用于缩进作为编码约定的一部分。 Get everyone to adjust their IDE / editor settings to do this automatically.让每个人调整他们的 IDE/编辑器设置以自​​动执行此操作。

Java is compile once run anywhere compilation depends upon JDK. Java 编译一次,在任何地方运行编译取决于 JDK。 As it's same there won't be any issues因为是一样的 不会有任何问题

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM