简体   繁体   中英

java compilation

我不是一个java开发人员,所以我可以在Windows上开发java代码,然后将windows编译的.class文件部署到solaris服务器......它会运行吗?

是的,这是Java的Write Once Run Anywhere座右铭背后的前提

Yes, it should.

However, watch out for the most common pitfalls like:

  • version incompatibility (eg class file version, runtime environment)
  • system dependent resource descriptors (eg file paths)

是的,java字节代码(类文件)与平台无关。

Yes, 99.9% of the time this is the case. There are some hiccups with non-Sun (read, IBM) JVMs that aren't perfectly cross-platform compatible.

as the others already said, it will most likely work. Id suggest you read some info on the Java Virtual Machine as this wonderful virtual device allows running java byte code on (nearly) any machine...

In general, It should. Mind it that class file don't run by themselves, you need to have java installed on the machine. It should also be compatible version.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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