good_ingredient
good_ingredient

Reputation: 41

Platform-independent programmming with Java native code or C++ (QT, WxWidgets etc.)

I am asking myself if it would be easier and more flexible to program a multiplatform application in Java and compile it to native binaries (the way Eclipse was written) or to use a cross-platform C++ framework like QT. Where are the advantages/disadvantages?

Upvotes: 1

Views: 406

Answers (3)

Christian Rau
Christian Rau

Reputation: 45968

It depends on your preferences. If you have much experience with C++, then stay to it. Platform-independence alone is not an argument, as Qt does an excellent job on guaranteeing platform-independent code and everybody can recompile a program on another system (that's actually what you want to do with your Java programs, too).

Upvotes: 1

gpeche
gpeche

Reputation: 22524

You will find less platform specific problems with Java, but:

  • Some less commons platforms have C++ compilers/toolkits available but no JRE.
  • With C/C++ you can usually access all native resources. With Java that is not always the case.

Upvotes: 2

Peter Lawrey
Peter Lawrey

Reputation: 533870

I would just let the JVM do the compiling to native code.

You might assume its better to pre-compile it but for 98% of the time its not, it just harder and more complicated.

Upvotes: 0

Related Questions