Zum Inhalt springen
View in the app

A better way to browse. Learn more.

Fachinformatiker.de

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Jar File lässt sich nicht starten

Empfohlene Antworten

Hallo allerseits...

Ich habe ein Jar File gepackt,das meine ganzen Packages und Klassen des zu startenden Programmes enthält.Das sind 3 Packages und die Startklasse mit der Main steht ohne Package im Jar File.

Eine Mani-Datei ist auch im Jar.In ihr ist die Klasse mit der Main angegeben.

So,wenn ich das Jar-File bei mir auf dem Rechner starte,dann funktioniert das Programm ohne Schwierigkeiten.Egal aus welchem Verzeichnis ich starte.

Wenn es von einem anderen Rechner gestartet wir bekomme ich allerdings immer die Fehlermeldung: Can't find Main Class.Program will exit...

Woran kann das liegen?

Ich habe bei mir auf dem Rechner den Classpath nicht verändert.

JDK ist 1.4

Kann mir jemand weiterhelfen?

kann es sein, dass du bei dir auf dem Rechner auch noch die class-files irgendwo im Classpath liegen hast ? Dann würden beim Auruf nämlich die benutzt, und nicht die class-Files aus dem Jar-File.

Das von dir gepackte Jar-File muss IMHO schon mit im Classpath stehen, damit die Klasse gefunden wird.

Gruß

Mirko

Hallo

Danke für die Hilfe,doch es funktioniert leider trotzdem nicht.

Vielleicht kannst du kurz beschreiben, wie du den ClassPath setzt.

Ich habe ihn direkt auf das File.jar gesetzt.

Ist das korrekt?

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

Konto

Navigation

Suchen

Suchen

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.