Win a copy of Spring Boot in Practice this week in the Spring forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Ron McLeod
  • Jeanne Boyarsky
  • Paul Clapham
Sheriffs:
  • Liutauras Vilda
  • Henry Wong
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Al Hobbs
  • Carey Brown
Bartenders:
  • Piet Souris
  • Mikalai Zaikin
  • Himai Minh

eclipse: not platform independent ???

 
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi to all:

Didn't Eclipse use to be platform independent ??? Same binaries for windows, linux, solaris......?

After all it is written in Java isn't it?

So how come they now have different downloads for each operating system?
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
They always had. SWT needs different native libraries for different operating systems.
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
But can it not do this with the same bytecode?
Or should it not be able to.
 
Ilja Preuss
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Joseph Sweet:
But can it not do this with the same bytecode?
Or should it not be able to.



No. The native libraries are, by definition, not bytecode, but platform dependent machine code.

That's the biggest drawback of using SWT instead of Swing/AWT. Obviously the Eclipse team thinks that the advantages are worth it. (Swing and AWT are using native libraries, too. They are just already installed with the correct version of the JRE.)
 
Joseph Sweet
Ranch Hand
Posts: 327
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
So the code of Eclipse is the same for all OS's, only the binaries (byte code) are different for each OS?
 
author and iconoclast
Posts: 24204
44
Mac OS X Eclipse IDE Chrome
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Joseph Sweet:
So the code of Eclipse is the same for all OS's, only the binaries (byte code) are different for each OS?



Sigh.

No, the byte code is the same (generally, but more on this below.) But SWT, the window toolkit Eclipse uses, isn't written all in Java. There's Java code, but also platform-dependent native code mostly written in C/C++. An Eclipse installation contains the platform-independent Java bytecode, plus some platform-dependent libraries written in another language, which implement the parts of SWT that aren't written in Java.

(Now, why did I say that the bytecode is only "generally" the same on all platforms? Because there's some special-purpose code to handle platform differences. All this code is installed on all platforms, though, as far as I know.)
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic