kd.
kd.

Reputation: 292

java compilation

i am not a java developer so is it possible for me to develop java code on windows and then deploy the windows compiled .class files to a solaris server...would it run..

Upvotes: 4

Views: 291

Answers (6)

CatholicEvangelist
CatholicEvangelist

Reputation: 375

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...

Upvotes: 1

fastcodejava
fastcodejava

Reputation: 41127

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.

Upvotes: 0

Dieter
Dieter

Reputation: 1154

Yes, it should.

However, watch out for the most common pitfalls like:

  • version incompatibility (e.g. class file version, runtime environment)
  • system dependent resource descriptors (e.g. file paths)

Upvotes: 5

Michael Krauklis
Michael Krauklis

Reputation: 3954

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.

Upvotes: 2

tangens
tangens

Reputation: 39753

Yes, java byte code (class files) is platform independent.

Upvotes: 2

Kevin
Kevin

Reputation: 30449

Yes, that is specifically the premise behind Java's Write Once Run Anywhere motto

Upvotes: 5

Related Questions