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.

Prüfen ob ein Netzlaufwerk vorliegt.

Empfohlene Antworten

Veröffentlicht

Hallo Leute,

gibt es unter Java die möglichkeit zu prüfen ob es sich bei x:/xxx/xxx um ein Netzlaufwerk handelt? Und evtl. noch die Ausgabe des Netzpfades z.B.:

//10.10.10.10/xxx/xxx

Gruß

Ich kann mir nicht vorstellen, dass JAVA als Platformunabhängige Sprache irgend ein interesse daran hat so ein Microsoft-Zeugs zu unterstützen.

Mir persönlich ist keine Schnittstelle bekannt mit der man so etwas abfragen könnte.

Es gibt jedoch die Möglichkeit so etwas C oder C++ mit der Windows-API abzufragen und diese Abfrage über JNI in einem Java-Programm zu verwenden.

Aber falls es mit JAVA Möglich ist dann solltest du dir mal die Methode toURI von File anschauen. Habs grade mal ausprobiert, die Methode getHost liefert leider nur null zurück.

Wie speedi bereits erwähnt hat macht, macht es nicht wirklich Sinn wenn Java eine solche Plattform spezifische Funktionalität anbieten würde.

Ich habe es in einem früheren Projekt einfach durchs Parsen vom "net use" Output gelöst. Ist zwar etwas Handgestrickt aber für einfachere/kleinere Applikationen durchaus sinnvoll. Wenn es jedoch stabil und sicher laufen soll, ist der Weg über JNI sicher besser geeignet!

P.S: Für viele andere Plattform nahe Funktionen gibt es gute Projekte für die Integration wie z.B. jdic.

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.