[Eclipse@Linux] Fehler beim kompilieren

Status
Nicht offen für weitere Antworten.

Umut

Neues Mitglied
Hallo,
ich verwende Eclipse unter Linux, und wenn ich versuche, folgendes zu kompilieren und zu starten:

Code:
// Projektname: project_java
// Dateiname: Test.java
//

import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.SwingUtilities;
import javax.swing.UIManager; 

public class Test
{
    /*
     * Erstellt die grafischen Komponenten und zeigt
     * sie an. 
    */
    private static JFrame frame;
 
    private static void createAndShowGUI() 
    {
        //Erstellt das Fenster
        frame = new JFrame("HalloWeltSwing");
        frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); 

        //Fügt den "Hallo Welt"-Text hinzu
        JLabel label = new JLabel("Hallo Welt");
        frame.add(label);

        //Zeigt das Fenster an
        frame.setSize(300, 200);
        frame.setVisible(true);
    } 
 
    public static void main(String[] args) 
    {
        /*
        //Diesen Code einkommentieren, um das Motif-Look-And-Feel zu verwenden
        
        //Versucht das Motif-Look-And-Feel zu laden
        try {
            UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
        } catch (Exception e){
            System.out.println("Das Motif-Look-And-Feel kann nicht geladen werden");
        }
        */
       
        //Führt den Code im "event dispatch thread" (EDT) aus
        SwingUtilities.invokeLater(new Runnable() 
        {
            public void run() 
            {
                createAndShowGUI();
            }
        });
    }
}


..bekomm ich die folgenden Fehlermeldungen:

Exception in thread "main" java.awt.AWTError: Cannot load AWT toolkit: gnu.java.awt.peer.gtk.GtkToolkit
at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
at java.awt.EventQueue.invokeLater(libgcj.so.70)
at javax.swing.SwingUtilities.invokeLater(libgcj.so.70)
at Learning.main(Learning.java:46)
Caused by: java.lang.UnsatisfiedLinkError: libgtkpeer: libgtkpeer.so: cannot open shared object file: No such file or directory
at java.lang.Runtime._load(libgcj.so.70)
at java.lang.Runtime.loadLibrary(libgcj.so.70)
at java.lang.System.loadLibrary(libgcj.so.70)
at gnu.java.awt.peer.gtk.GtkToolkit.<clinit>(libgcj.so.70)
at java.lang.Class.initializeClass(libgcj.so.70)
at java.lang.Class.forName(libgcj.so.70)
at java.awt.Toolkit.getDefaultToolkit(libgcj.so.70)
...3 more

und unten (bei Problems), wo die Warnungen angezeigt werden, steht dann folgendes:

The import javax.swing.UIManager is never used project_java Test.java line 7 1178804455494 17



ich hab bereits die folgenden Java-Pakete installiert:
j2re1.4
j2sdk1.4
java-common
java-gcj-compat
sun-java6-bin
sun-java6-jdk
sun-java6-jre
sun-java6-plugin


Ich hab jetzt keine Idee mehr, was ich noch tun könnte, um es zum laufen zu bringen..
hoffentlich kann mir jemand weiterhelfen..



MfG
Umut
 

Umut

Neues Mitglied
danke, es hat geholfen :D
ich musste noch zusätzlich Eclipse anpassen und den Pfad zum neuen java (sun version) umändern,
jetzt funktioniert aber alles super!!

Vielen Dank!!



MfG
Umut
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
sambalmueslie Eclipse Linux Fehler IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
N Erstellen einer ausführbaren jar Datei in Eclipse (Linux Mint) IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 17
windl Probleme mit Eclipse unter Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
I Eclipse Tastenkürzel unter Linux: STRG+SHIFT+U IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
ruutaiokwu zugriff auf die freigabe mit dem svn-repo scheitert unter eclipse / linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
S OpenJDK: mit Eclipse auf Windows für Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
ruutaiokwu eclipse unter linux mit openjdk 6 ??? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 18
B Eclipse Funktioniert nicht: eclipse-jee-galileo-SR1-linux-gtk.tar.gz IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
G Eclipse und SVN sowie Windows und Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
T Eclipse FTP und WebDAV Linux. Unable to load . IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
B Eclipse - Projekt von Windows nach Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
T Eclipse-Prblem mit Zeichenkodierung Windows-Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
K Eclipse unter Windows und unter Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 20
M Eclipse unter Linux - Performance IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 17
W Eclipse und Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
B Eclipse, CVS und Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
W Eclipse unter Linux + Sonderzeichen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 17
S Eclipse 3.2 unter Suse Linux 10.1 IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 17
O Eclipse Linux Start Problem IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
B Eclipse startet unter Linux nicht IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
C Eclipse: Problem mit Slime unter Linux IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
R Eclipse beim Ausführen zur Eingabe in die Konsole springen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
T Eclipse Java Projekt funktioniert in Eclipse, aber nach export kein Dateizugriff IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
M Eclipse oder IntelliJ? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
JonasM Gibt es eine Libary in Eclipse mit der ich Daten per USB an einen Microkontroller Senden kann? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
O Eclipse stürzt beim Autovervollständigen ab IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 17
C In Eclipse Einrückung im Java-Editor einstellen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
Avalon html ist nicht html in eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
A Docker im Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
Robertop Eclipse resolved Target-Platform nicht wegen automatischem HTTPS IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
C Eclipse englisch, deutsche Kommentare leider rot unterkringelt IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
T Eclipse von Java 1.8 auf 17 IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
S [Eclipse] Zwei verschiedene Konfigurationen erstellen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
A Eclipse Projekt-Umzug mit Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
D Eclipse Eclipse und OpenGL IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
M Ausführbares Programm aus Eclipse exportieren IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
Java00User00 Eclipse Theme IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
F Eclipse für Java 1.8 ARM einrichten IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
D Crawler funktioniert in intellij aber in Eclipse nicht IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
U Problem mit Eclipse - WindowBuilder - memoryLeak? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 15
F Eclipse - Änderung am Code ohne Applikation Neustart IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
E Hilfe mit Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
B Eclipse version control System das ohne Internet funktioniert/nur lokal auf Computer? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
B Eclipse Problem mit jar Datei? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
N Eclipse erzeugt plötzlich keine (default package) mehr IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 24
F alle Eclipse Projekte auf git hochladen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
O Java Eclipse Umlaute werden nicht richtig dargestellt in Konsole IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 10
B .exe Datei für Eclipse Java Programm erstellen? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
Eclipse Build path duplication entry IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 11
B Wie nicht-java Datei mit Eclipse benutzen (Excel Datei einlesen)? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 16
T GlassFish mit Eclipse, Dynamic Web Projekt IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
nbergmann Eclipse Eclipse-Concole: Ergebnis-Zahlenfolge erscheint kurz und verschwindet dann wieder IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 21
berserkerdq2 Eclipse Eclipse führt nicht dei Klasse aus, bei der ich bin, muss das immer manuell ändern, was tun? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
MiHimbert Eclipse + Wildfly26 + primefaces11 + openjdk18 IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 22
S Eclipse Umlaute IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
S Fehlermeldung bei Nutzung Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
LimDul IDEA IntelliJ Tipps für den Umstieg von Eclipse auf intelliJ IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
Robertop Maven Warnung "'version' contains an expression but should be a constant" in Eclipse verstecken IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
J Eclipse - kein Server verfügbar zum ausführen meines Java Projektes IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 12
P PHP Skript wird nicht mit highlights markiert(Eclipse) IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
B Eclipse Autovervollständigung zeigt nicht alle Methoden einer Klasse an IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
P Eclipse- Zip Datei als Prgramm IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
T Eclipse scheint awt Libary nicht zu besitzen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
G eclipse mit neuestem JDK einrichten IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
P Cucumber Plugin Installation . Eclipse Warnmeldung IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
J Eclipse CDT Library einbinden IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
J Javac File generieren Eclipse oder IntellJ (JNI) IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
sham5 Eclipse-Remote-Debugging von Java mit mehreren Prozessen oder Ports oder Netzen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 0
Eichi1979 Eclipse Fehler in Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 10
Arita wie kann man die automatische erstellte Ordner von Eclipse in D Drive ziehen? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
nonickatall paho.client.mqttv3 in Eclipse installieren/einbinden IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 8
A Einbindung von FXML-Dateien in Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
A JavaFX in Eclipse einbinden IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 22
nonickatall Remote Debugging Eclipse/Raspberry IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 12
H Outline Fenster (Gliederung) wird mit deutschem Sprachpaket nicht angezeigt, Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
M Kann EGit nicht auf Eclipse installieren? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
Tobero Eclipse Eclipse zeigt mir alles als Warnung an IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
B Versionen kontrollieren / dokumentieren mit Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
keinLebenNurCode Eclipse Eclipse: Gelbes Hilfsfenster für Funktionen und Methoden anzeigen lassen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
H Eclipse Fehler beim starten des Projekts IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
B Kompilieren in Eclipse ( 2 Klasse ohne main()-Methode) IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
N Eclipse debug Gradle-Projekt IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
R Eclipse-Fehler IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
M Eclipse - Fehlermeldung bei JavaFX-Projekt "java.lang.module.FindException: Module javafx.controls not found" IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 23
P ERROR: org.eclipse.equinox.p2.engine code=0 session context was:(profile=C__Users_birgit_eclipse_java-2020-124_eclipse, phase=org.eclipse.equinox.inte IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
H eclipse Fehler: Hauptklasse konnte nicht gefunden - bei Umwandlung in git IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
H Eclipse - Refactoring - mehrere Pakete geleichzeitig verschieben IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
T Eclipse, Console gibt Fragezeichen zurück. IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
N Eclipse aus Java-Application JavaFX machenModule javafx.controls not found IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 7
K Eclipse Einstellung "kaputt" IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 3
G Java Eclipse IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1
M Einzelne Java-Dateien mit Eclipse compilieren - Wie geht das? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 5
Robertop Eclipse Eclipse Startprobleme "Java was started but returned exit code=1" IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 6
Splayfer Problem mit der Eclipse Autovervollständigung... IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
ruutaiokwu Eclipse inkonsistent?? IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 4
T Eclipse - Keine Vorschläge außerhalb main-Methode IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 9
S Java8 Eclipse Nutzer will auf Java14 wechseln IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 13
H kann in Eclipse org.junit nicht importieren IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 2
C Eclipse Plugin ClassLoader IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 0
T Eclipse: Projekt aus meinem Workspace als Library auswählen IDEs - Eclipse, IntelliJ IDEA, BlueJ & mehr 1

Ähnliche Java Themen

Neue Themen


Oben