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.

Klassenpfad Ecipse setzen

Empfohlene Antworten

Veröffentlicht

Hallo Leute

Ich krieg langsam die Krise.

Ich möchte den Klassenpfad für Eclipse setzen, damit ich eine Klasse auslesen kann.

Die Version welche ich implementiert habe gibt zwar den veränderten Klassenpfad aus, setzt ihn jedoch nicht in Eclipse.

Wie kann ich ihn im .classpath-File abspeichern?

Folgender Code verändert den Pfad speichert ihn jedoch nicht ab:

JarFile jar = null;

		try {

			jar = new JarFile("C:/devworkspace/AEPWorkspace/IPA/Testverzeichnis/TestOrdner/WebWalker.jar");

			System.out.println("Erfolgreiche Instanzierung JarFile");

		} catch (IOException e1) {

			System.out.println("Fehlgeschlagene Instanzierung JarFile");

			e1.printStackTrace();

		}


		// Systempropertys neu setzen

	    String pathSeparator = System.getProperty("path.separator");

	    String javaClassPath = System.getProperty("java.class.path");


	    System.setProperty("java.class.path", javaClassPath + pathSeparator + jar.getName());

	    // set the system properties

	    // display new properties

	    System.out.println("Inhalt gesetzte Properties: " + System.getProperty("java.class.path"));


	    // hier in File schreiben (falls nicht automatisch!)

	    // 

Wäre um eine Antwort wirklich sehr sehr froh :(

Danke

Tinella

Hmm. Wenn Du den Classpath in der Datei .classpath sichern willst, solltest Du auch in die Datei schreiben ...

Servus,

Du änderst in der momentanen VM (beim Programmablauf) den Classpath. Das ist aber etwas komplett Anderes als das, was in der Datei .classpath steht. Dort steht drin, welche jars und Ordner im Classpath des Eclipseprojekts sind.

Peter

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.