My Build server has Open JDK 8 installed and my production server has oracle JRE 8 installed . Is it possible to compile the code in open JDK and deploy the artifact in Oracle JRE 8 ?
Asked
Active
Viewed 2,030 times
0
-
8Did you encounter a problem when you simply tried it? – f1sh Mar 13 '17 at 16:47
-
You can compile it in any Java 1.1+ and run it on any Java 8. The code base for OpenJDK 8 and Oracle JRE is almost the same, so you are highly unlikely to see a difference. – Peter Lawrey Mar 13 '17 at 16:48
-
1It would be a pretty poor return for all the hassle of compiling to bytecode if at the end the result wouldn't even be compatible with other vendors' JREs. (Explicit `javac` bugs notwithstanding.) – biziclop Mar 13 '17 at 16:56
-
1theoretically yes. in practice these are both software that might have bugs (or features) that *might* make them incompatible. – Eugene Mar 13 '17 at 18:08
-
there are many more JVMs than just those two. and since they are standardized platforms code should generally be compatible between them, although some minor differences may exist – the8472 Mar 13 '17 at 21:08