Perché la piattaforma Eclipse è dipendente?

0

Quando Eclipse è scritto in Java e Java è indipendente dalla piattaforma, perché Eclipse offre diverse versioni in base alle piattaforme?

Suppongo che dovrebbe essere scritto una sola volta, usare ovunque codice.

    
posta Mohit Kanwar 13.01.2016 - 09:16
fonte

1 risposta

7

Sebbene Eclipse IDE sia scritto in Java, gli elementi di controllo grafico utilizzano Standard Widget Toolkit (SWT) , mentre la maggior parte di Java le applicazioni utilizzano lo standard Java Window Toolkit (AWT) o Swing standard.

To display GUI elements, the SWT implementation accesses the native GUI libraries of the operating system using JNI (Java Native Interface) in a manner that is similar to those programs written using operating system-specific APIs. Programs that call SWT are portable, but the implementation of the toolkit, despite part of it being written in Java, is unique for each platform.

SWT must be ported to every new GUI library that needs supporting. Unlike Swing and AWT, SWT is not available on every Java-supported platform since SWT is not part of the Java release.

Pertanto la distribuzione di Eclipse deve includere diverse implementazioni SWT per ogni piattaforma supportata.

    
risposta data 13.01.2016 - 15:50
fonte

Leggi altre domande sui tag