Dies ist eine statische Kopie unseres alten Forums. Es sind keine Interaktionen möglich.
This is a static copy of our old forum. Interactions are not possible.

Rick

Mädchen

  • "Rick" is male

Posts: 1,266

Date of registration: Mar 17th 2004

Location: ::1/128

Occupation: Forentroll

21

Sunday, April 11th 2010, 2:08pm


C:\Programme\Java\jdk1.6.0_19\bin>java sum
Exception in thread "main" java.lang.NoClassDefFoundError: sum


das sind lower case esse. Probier upper case S stattdessen?

Sometimes you've got to ask yourself: Is xkcd shitty today?

ice-cream

Junior Schreiberling

  • "ice-cream" is female
  • "ice-cream" started this thread

Posts: 237

Date of registration: Oct 29th 2009

22

Sunday, April 11th 2010, 2:10pm


C:\Programme\Java\jdk1.6.0_19\bin>java sum
Exception in thread "main" java.lang.NoClassDefFoundError: sum


das sind lower case esse. Probier upper case S stattdessen?
was heit das auf gut deutsch :S

Rick

Mädchen

  • "Rick" is male

Posts: 1,266

Date of registration: Mar 17th 2004

Location: ::1/128

Occupation: Forentroll

23

Sunday, April 11th 2010, 2:11pm

kleines s.
großes S.

Sometimes you've got to ask yourself: Is xkcd shitty today?

ice-cream

Junior Schreiberling

  • "ice-cream" is female
  • "ice-cream" started this thread

Posts: 237

Date of registration: Oct 29th 2009

24

Sunday, April 11th 2010, 2:12pm

kleines s.
großes S.
funktioniert beides nicht...

Salz

Opa

  • "Salz" is male

Posts: 144

Date of registration: Dec 3rd 2009

25

Sunday, April 11th 2010, 2:12pm

Nachdem ich die class datei nun erzeugt habe will ich das programm mit java Sum starten erhalte aber folgenden Fehler:
C:\Programme\Java\jdk1.6.0_19\bin>java sum
Exception in thread "main" java.lang.NoClassDefFoundError: sum
Caused by: java.lang.ClassNotFoundException: sum
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: sum. Program will exit.

Irgendwie sehe ich hier ständig ein kleines s in den Fehlermeldungen.

Falls Java mit einem großen S auch Fehler wirft kopiere diese Fehler bitte ins Forum, das sollten andere Fehler sein.
Damals…

Rick

Mädchen

  • "Rick" is male

Posts: 1,266

Date of registration: Mar 17th 2004

Location: ::1/128

Occupation: Forentroll

26

Sunday, April 11th 2010, 2:14pm

die .class hast du sicher in ...\jdk\bin rumliegen?
sonst probier's mal mit nem absoluten pfad.

Sometimes you've got to ask yourself: Is xkcd shitty today?

ice-cream

Junior Schreiberling

  • "ice-cream" is female
  • "ice-cream" started this thread

Posts: 237

Date of registration: Oct 29th 2009

27

Sunday, April 11th 2010, 2:17pm

C:\Programme\Java\jdk1.6.0_19\bin>java Sum
Exception in thread "main" java.lang.NoClassDefFoundError: Sum
Caused by: java.lang.ClassNotFoundException: Sum
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
Could not find the main class: Sum. Program will exit.

ice-cream

Junior Schreiberling

  • "ice-cream" is female
  • "ice-cream" started this thread

Posts: 237

Date of registration: Oct 29th 2009

28

Sunday, April 11th 2010, 2:23pm

die .class hast du sicher in ...\jdk\bin rumliegen?
sonst probier's mal mit nem absoluten pfad.
ja hab ich...
wenn ich den ganzen pfad eingebe macht er gar nix...

Salz

Opa

  • "Salz" is male

Posts: 144

Date of registration: Dec 3rd 2009

29

Sunday, April 11th 2010, 2:28pm

Er schmeisst nicht mal einen Fehler? Dann läuft Dein Programm doch.
Entweder es kommt überhaupt keine Ausgabe mehr, dann hast Du eine Endlosschleife programmiert.
Oder es kommt gleich wieder das Prompt "C:\Programme\Java\jdk1.6.0_19\bin>", dann läuft Dein Programm, beendet sich korrekt und gibt lediglich nichts aus.
Damals…

ice-cream

Junior Schreiberling

  • "ice-cream" is female
  • "ice-cream" started this thread

Posts: 237

Date of registration: Oct 29th 2009

30

Sunday, April 11th 2010, 2:30pm

Er schmeisst nicht mal einen Fehler? Dann läuft Dein Programm doch.
Entweder es kommt überhaupt keine Ausgabe mehr, dann hast Du eine Endlosschleife programmiert.
Oder es kommt gleich wieder das Prompt "C:\Programme\Java\jdk1.6.0_19\bin>", dann läuft Dein Programm, beendet sich korrekt und gibt lediglich nichts aus.
wo kann ich den das ergebniss den dann sehen?

ice-cream

Junior Schreiberling

  • "ice-cream" is female
  • "ice-cream" started this thread

Posts: 237

Date of registration: Oct 29th 2009

31

Sunday, April 11th 2010, 2:33pm

arbeite übrigens mit jgrasp

Salz

Opa

  • "Salz" is male

Posts: 144

Date of registration: Dec 3rd 2009

32

Sunday, April 11th 2010, 2:34pm

wo kann ich den das ergebniss den dann sehen?

Du kannst es am Ende vom Programm mit System.out.println(Ergebnis); ausgeben. Da ich Dein Programm nicht kenne müsste ich hellsehen, um den Fehler zu finden.
Damals…

CrissCross

Erfahrener Schreiberling

  • "CrissCross" is male

Posts: 282

Date of registration: Feb 15th 2005

33

Sunday, April 11th 2010, 2:49pm

Versuch mal Folgendes:

Leg mal unter C:\ eine neue Datei mit dem Namen "Testklasse.java" an und kopiere folgenden Code hinein:

Java source code

1
2
3
4
5
class Testklasse{
	public static void main(String []args){
		System.out.println("Java-Testprogramm funktioniert.");
	}
}


Dann starte eine Konsole, wechsele zu C:\ und gib folgendes ein:

Source code

1
javac Testklasse.java


und danach:

Source code

1
java Testklasse


Wenn als Ausgabe kommt "Java-Testprogramm funktioniert.", ist alles in Ordnung.
"Technology is easy - people are hard."

(John Gage - Sun Microsystems zum Thema warum IT-Projekte scheitern)

snoopy

Junior Schreiberling

  • "snoopy" is male

Posts: 146

Date of registration: Feb 29th 2004

Location: Hannover

Occupation: Informatik

34

Sunday, April 11th 2010, 3:08pm


Kaos

Lesen, denken, flamen!

  • "Kaos" is male

Posts: 973

Date of registration: Oct 16th 2005

Location: Han. / Vahrenwald Sinnvolle Beiträge: 7

36

Sunday, April 11th 2010, 6:00pm



Top Hilfe. Noch nutzloser ist maximal die Antwort von FragenFrager. Kein Spam hier bitte.


Kaos

Quoted

Man findet immer dort besonders viel Chaos, wo man nach Ordnung sucht. Das Chaos besiegt die Ordnung, weil es besser organisiert ist.

Mac

Papa

  • "Mac" is male

Posts: 645

Date of registration: Oct 17th 2002

Location: Hannover

Occupation: IT Freelancer

37

Sunday, April 11th 2010, 9:54pm

Wenn ich das hier so lese, weiß ich wieder warum ich kein Fan von Telefon Support bin. Eine bebilderter Anleitung hätte wohl schneller zum Ziel geführt.
Ansonsten mein Lieblingsratschlag: Lerngruppen! Kann man auch für Java nutzen um sich ein wenig auf die Sprünge zu helfen. Als herkömmlicher XP Nutzer muss man seltens etwas an der PATH Variable ändern. Damit stößt man schon mal auf Bereiche die ein anderer in der Gruppe schon längst kennt. Wenn der Weg zu deinem Rechner nicht all zu weit ist ;)

Für Java spezifische Probleme empfehle ich einfach mal das Buch vom RRZN: http://www.rrzn.uni-hannover.de/buch.htm…e=1&titel=java6
Oder was dir im Buchladen so ins Auge sticht und gefällt.

edit: hier wäre auch noch mal eine Anleitung zur Java Installation. Nur mal auf die schneller über google: http://www.torsten-horn.de/techdocs/java-install.htm
So kannst du vielleicht auch noch mal deine Installation bereinigen.
Und bevor die Frage kommt: Nein ant brauchst du noch nicht. Kommt vielleicht später im Studium mal.

This post has been edited 1 times, last edit by "Mac" (Apr 11th 2010, 9:59pm)


  • "Schokoholic" is male

Posts: 2,518

Date of registration: Oct 4th 2006

Location: Hannover

Occupation: Haarspaltung

38

Sunday, April 11th 2010, 10:18pm

Um mal wieder zum Thema zurück zu kommen...

die .class hast du sicher in ...\jdk\bin rumliegen?
sonst probier's mal mit nem absoluten pfad.
ja hab ich...
wenn ich den ganzen pfad eingebe macht er gar nix...
Bist du wirklich sicher, dass Sum.class in "C:\Programme\Java\jdk1.6.0_19\bin" liegt? Das wäre ziemlich kontraproduktiv... davon kann ich wirklich nur abraten!

---------------

Abgesehen davon...
BENUTZERVARIABLEN

CLASSPATH:
C:\Programme\Java\jdk1.6\bin;C:\Programme\Java\ant\bin

PATH:
C:\Programme\Java\jdk1.6\bin;C:\Programme\Java\ant\bin
[...]
und
[...]
C:\Programme\Java\jdk1.6.0_19\bin>java sum
Exception in thread "main" java.lang.NoClassDefFoundError: sum
[...]


Da haben wir doch deinen Fehler! In deinem PATH (übrigens, CLASSPATH hat hiermit überhaupt nichts zu tun) steht "C:\Programme\Java\jdk1.6\bin", dein Java liegt aber in "C:\Programme\Java\jdk1.6.0_19\bin"... das sind zwei verschiedene Ordner.

Also: in PATH den richtigen Ordner eintragen => Konsole neu starten => in das Verzeichnis wechseln wo "Sum.java" liegt => "javac Sum.java" eingeben => "java Sum" eingeben => freuen.

Rick

Mädchen

  • "Rick" is male

Posts: 1,266

Date of registration: Mar 17th 2004

Location: ::1/128

Occupation: Forentroll

39

Sunday, April 11th 2010, 10:25pm

CLASSPATH ist aber übrigens dann genauso falsch - aber der hängt eh vom jeweiligen Projekt ab..

Sometimes you've got to ask yourself: Is xkcd shitty today?

ice-cream

Junior Schreiberling

  • "ice-cream" is female
  • "ice-cream" started this thread

Posts: 237

Date of registration: Oct 29th 2009

40

Sunday, April 11th 2010, 11:12pm

so happy end ich habe es geschafft danke :D