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.

Konfigurationsdatei nicht gefunden

Empfohlene Antworten

Veröffentlicht

Hallo zusammen,

zur Konfiguration eines Kassenprogramms für einen Kiosk, habe ich eine Konfigurationsdatei "kiosk.conf" geschrieben.

Zum Auslesen benutze ich folgende Zeilen:

props = new Properties(); 

dateiStreamInput = new FileInputStream("kiosk.conf"); 

props.load(dateiStreamInput); 

dateiStreamInput.close(); 

Das Auslesen klappt auch und das Programm ist in Eclipse ausführbar...

Wenn ich jedoch jetzt eine Jar-Datei exportiere und ausführe bekomme ich eine: FileNotFoundException für meine kiosk.conf.

kiosk.conf und kiosk.jar liegen im gleichen Verzeichniss. Auch ein einbinden in das jar hat nicht funktioniert.

Auch new FileInputStream("/kiosk.conf"); hat Nichts gebracht.

Hat jemand von euch eine Idee, was ich falsch machen könnte?

Gruß

Stefan

Ich habe mit einer festen Verdrahtung des Dateipfades (dateiStreamInput = new FileInputStream("C:/kiosk.conf"); ) Erfolg gehabt. Auch wenn das nicht sehr schön ist, ist es immernoch besser, als wenn es nicht funktioniert

Das hier könnte helfen: Class.getResourceAsStream(String)

entweder Class.getResourceAsStream("..");

oder du baust die den Pfad zur Datei zusammen.

Pfad zu ner Datei innerhalb ner Jar lautet

c:\pfad\zur\jar\datei.jar!datei_im_jar.conf

Danke für eure Vorschläge.

Ich habe es jetzt mit

dateiStreamInput = new FileInputStream("./kiosk.conf");

lösen können.

Archiv

Dieses Thema wurde archiviert und kann nicht mehr beantwortet werden.

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.