Hallo!
Ich arbeite auf einem Linux Suse 9.3 rechner und verwende Eclipse 3.1 (JDK1.5.0.05). Ich wollte mir ein testbundle (für OSGi) "HelloWorld" erstellen um mich in die OSGi-Umgebung einzuarbeiten. Hatte gestern ziemliche Probleme mit dem JDK.Update von 1.5.0.04, deswegen kann sein dass ich hier was verstellt oder gelöscht habe.
Auf alle Fälle habe ich gestern mit echo $JAVA_HOME keinen Pfad angezeigt gekriegt, was ich durch das erzeugen von einer profile.local beseitigt habe. (JAVA_HOME=/usr/java/j2sdk1.5.0 usw.)
Mein Java-Projekt in Eclipse sieht so aus:
1) package "de.vpe.simplebundle.impl"
(beinhaltet Activator.java und Helloworldthread.java)
2) ein "build"-package
3) ein "src"-package
4) ein "classes"-package
5) implementation der Bibliotheken JRE System library und framework.jar
6) Ordner meta-inf (with the bundle MANIFEST.MF inside)
7) und build.xml
Die Dateien stammen alle aus eínem Tutorial(https://www.knopflerfish.org/tutorials/), also bei denen passt alles(hab es schon mal ausprobiert) aber jetzt funktioniert es nicht mehr... :bloed:
Die einzelnen java-Dateien in Eclipse melden mir keinen Fehler, also eclipse findet diese Pfade bzw. Bibliotheken, nur wenn
ich die build.xml- Datei als ant-build ausführe, so erhalte ich eigenartigerweise diese Fehlermeldung:
//****************************************+
Buildfile: /home/ogu/eclipse_workspace/simplebundle/build.xml
init:
compile:
[javac] Compiling 2 source files to /home/ogu/eclipse_workspace/simplebundle/classes
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:3: package org.osgi.framework does not exist
[javac] import org.osgi.framework.BundleActivator;
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:4: package org.osgi.framework does not exist
[javac] import org.osgi.framework.BundleContext;
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:8: cannot find symbol
[javac] symbol: class BundleActivator
[javac] public class Activator implements BundleActivator {
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:9: cannot find symbol
[javac] symbol : class BundleContext
[javac] location: class de.vpe.simplebundle.impl.Activator
[javac] public static BundleContext bc = null;
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:11: cannot find symbol
[javac] symbol : class BundleContext
[javac] location: class de.vpe.simplebundle.impl.Activator
[javac] public void start(BundleContext bc) throws Exception {
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:17: cannot find symbol
[javac] symbol : class BundleContext
[javac] location: class de.vpe.simplebundle.impl.Activator
[javac] public void stop(BundleContext bc) throws Exception {
[javac] ^
[javac] 6 errors
BUILD FAILED
/home/ogu/eclipse_workspace/simplebundle/build.xml:12: Compile failed; see the compiler error output for details.
Total time: 14 seconds
//******************************************
Ich bin Anfänger in der Programmierung, deshalb verzeihht, wenn es sich hier um einen Anfängerfehler handelt...aber es ist seltsam, dass er die Bibliotheken nicht findet, obwohl ich sie ja eingefügt(!) habe. Wenn ich andere ganz normale Java-Test-Programme compliere, so funktionieren diese auch.
Kann mir bitte jemand helfen?
glg
Ich arbeite auf einem Linux Suse 9.3 rechner und verwende Eclipse 3.1 (JDK1.5.0.05). Ich wollte mir ein testbundle (für OSGi) "HelloWorld" erstellen um mich in die OSGi-Umgebung einzuarbeiten. Hatte gestern ziemliche Probleme mit dem JDK.Update von 1.5.0.04, deswegen kann sein dass ich hier was verstellt oder gelöscht habe.
Auf alle Fälle habe ich gestern mit echo $JAVA_HOME keinen Pfad angezeigt gekriegt, was ich durch das erzeugen von einer profile.local beseitigt habe. (JAVA_HOME=/usr/java/j2sdk1.5.0 usw.)
Mein Java-Projekt in Eclipse sieht so aus:
1) package "de.vpe.simplebundle.impl"
(beinhaltet Activator.java und Helloworldthread.java)
2) ein "build"-package
3) ein "src"-package
4) ein "classes"-package
5) implementation der Bibliotheken JRE System library und framework.jar
6) Ordner meta-inf (with the bundle MANIFEST.MF inside)
7) und build.xml
Die Dateien stammen alle aus eínem Tutorial(https://www.knopflerfish.org/tutorials/), also bei denen passt alles(hab es schon mal ausprobiert) aber jetzt funktioniert es nicht mehr... :bloed:
Die einzelnen java-Dateien in Eclipse melden mir keinen Fehler, also eclipse findet diese Pfade bzw. Bibliotheken, nur wenn
ich die build.xml- Datei als ant-build ausführe, so erhalte ich eigenartigerweise diese Fehlermeldung:
//****************************************+
Buildfile: /home/ogu/eclipse_workspace/simplebundle/build.xml
init:
compile:
[javac] Compiling 2 source files to /home/ogu/eclipse_workspace/simplebundle/classes
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:3: package org.osgi.framework does not exist
[javac] import org.osgi.framework.BundleActivator;
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:4: package org.osgi.framework does not exist
[javac] import org.osgi.framework.BundleContext;
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:8: cannot find symbol
[javac] symbol: class BundleActivator
[javac] public class Activator implements BundleActivator {
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:9: cannot find symbol
[javac] symbol : class BundleContext
[javac] location: class de.vpe.simplebundle.impl.Activator
[javac] public static BundleContext bc = null;
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:11: cannot find symbol
[javac] symbol : class BundleContext
[javac] location: class de.vpe.simplebundle.impl.Activator
[javac] public void start(BundleContext bc) throws Exception {
[javac] ^
[javac] /home/ogu/eclipse_workspace/simplebundle/src/de/vpe/simplebundle/impl/Activator.java:17: cannot find symbol
[javac] symbol : class BundleContext
[javac] location: class de.vpe.simplebundle.impl.Activator
[javac] public void stop(BundleContext bc) throws Exception {
[javac] ^
[javac] 6 errors
BUILD FAILED
/home/ogu/eclipse_workspace/simplebundle/build.xml:12: Compile failed; see the compiler error output for details.
Total time: 14 seconds
//******************************************
Ich bin Anfänger in der Programmierung, deshalb verzeihht, wenn es sich hier um einen Anfängerfehler handelt...aber es ist seltsam, dass er die Bibliotheken nicht findet, obwohl ich sie ja eingefügt(!) habe. Wenn ich andere ganz normale Java-Test-Programme compliere, so funktionieren diese auch.
Kann mir bitte jemand helfen?
glg