online 1
gast (50)

/ Forum / Skripte(PHP,ASP,Perl...)

Skripte(PHP,ASP,Perl...)Skripte(PHP,ASP,Perl...)

Fragevon Zyasha vom 12.04.2019, 14:49 Options

Exception in thread "main" java.lang.NoClassDefFoundError:

Hi Lete

will ein einfaches Hallo Welt Programm programmieren. Aber es wierd immer der Fehler:

Exception in thread "main" java.lang.NoClassDefFoundError:

angezeigt. Was mache ich falsch?


Antwort schreiben

Antwort 1 von Supermax vom 12.04.2019, 14:51 Options

Wie sieht denn dein Programm (Quellcode) aus?

Antwort 2 von disco vom 12.04.2019, 14:52 Options

Zitat:
Was mache ich falsch?


sollte man da nicht vorher klären, was du überhaupt machst?

quellcode?
aufruf?

Antwort 3 von Zyasha vom 12.04.2019, 14:53 Options

Der Quellcode sieht so aus:

import java.applet.*;
import java.awt.*;

public class MyApplet extends Applet
{
private Label MyLabel = new Label();

public void init()
{
MyLabel.setText("Hallo, Welt!");
add(MyLabel);
}
}

Bei MS-DOS gebe ich javac MyApplet.java ein.

Antwort 4 von Supermax vom 12.04.2019, 14:55 Options

müßte das
private Label MyLabel = new Label(); 

nicht auch in die init()-Methode?

Antwort 5 von Zyasha vom 12.04.2019, 14:58 Options

wie jetzt init()-Methode? ich hab vom programmieren keine ahnung will das grad lernen.

muss jetzt auch weg komme in 2 stunden wieder.

Antwort 6 von disco vom 12.04.2019, 15:01 Options

ist alles richtif.
ich kanns compilieren.
wirs wohl den classpath nicht richtig gesetzt haben.

Antwort 7 von Zyasha vom 12.04.2019, 17:10 Options

und was ist der classpath bzw. wie setze ich den richtig?

Antwort 8 von Zyasha vom 12.04.2019, 20:23 Options

kommt schon. ich möcht doch nur wissen wo man den classpath setzt. und was ich da hinschreiben muss.

Antwort 9 von Zyasha vom 14.04.2019, 14:58 Options

ok hab da jtzt noch den pfad von javac.exe angegeben. aber mir wierd immer noch der fehler

Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/javac/Main

angezeigt.

Ähnliche Themen

java hilfe
Zyasha  28.06.2007 - 148 Hits - 1 Antwort

Mehrere Packages in Java kompilieren
yasserino83  30.06.2007 - 85 Hits - 1 Antwort

"unhandled exception"
maverick83  11.08.2007 - 71 Hits -

staroffice 8
staroffice  04.03.2008 - 8 Hits -

EPLUS MMS FEHlERmeldung
schmetterlin2008  21.03.2008 - 284 Hits -

Hinweis

Diese Frage ist schon etwas älter, Sie können daher nicht mehr auf sie antworten. Sollte Ihre Frage noch nicht gelöst sein, stellen Sie einfach eine neue Frage im Forum..

Neue Einträge

Version: supportware 1.9.150 / 10.06.2022, Startzeit:Thu Jan 8 21:07:44 2026