Antbuild - Problem bei OSGi Anfängertutorial

Shams

Aktives Mitglied
Ich mache gerade meine ersten versuche in OSGi und habe mich dabei an ein Tutorial im Internet gehalten, weit gekommen bin ich allerdings nicht, weil ich, obwohl ich knopflerfisch gestartet habe und die relevanten jars als externe Jars dem Buildpath hinzugefügt habe, immer wenn ich nun das Antbuild laufen lassen will, die Fehlermeldung bekomme, dass die Jar nicht vorhanden ist, und zwar:

[javac] C:\Users\ICH\Documents\testworkspace\ASimplebundle\build.xml:13: warning: 'includeantruntime' was not set, defaulting to build.sysclasspath=last; set to false for repeatable builds
[javac] Compiling 2 source files to C:\Users\ICH\Documents\testworkspace\ASimplebundle\classes
[javac] C:\Users\ICH\Documents\testworkspace\ASimplebundle\src\de\vpe\simplebundle\impl\Activator.java:3: error: package org.osgi.framework does not exist
[javac] import org.osgi.framework.BundleContext;

Ich habe im Anhang mal einen screenshot meiner Verzeichnisstruktur gemacht.

Hier meine build.xml:

HTML:
<?xml version="1.0"?>

<project name="ASimplebundle" default="all">
	<target name="all" depends="init,compile,jar"/>
	<target name="init">
		<mkdir dir="./classes"/>
		<mkdir dir="./build"/>
	</target>

	<target name="compile">
		<javac destdir = "./classes"
		debug = "on"
		srcdir = "./src">
</javac>
</target>
	
<target name="jar">
	<jar basedir = "./classes"
		jarfile = "./build/ASimplebundle.jar"
		compress = "true"
		includes = "**/*"
		manifest = "./META-INF/manifest.mf"/>
</target>
	
<target name="clean">
	<delete dir = "./classes"/>
	<delete dir = "./build"/>
</target>

</project>

Hier ist meine Activator.class:

Java:
package de.vpe.simplebundle.impl;

import org.osgi.framework.BundleContext;

/**
* @author Sven Haiges | [email]sven.haiges@vodafone.com[/email]
*/
public class Activator {

	public static BundleContext bc = null;
	
	private HelloWorld thread = null;
	
	public void start(BundleContext bc) throws Exception {
	    
		Activator.bc= bc;
		
	    this.thread = new HelloWorld();    
	    this.thread.start();
	}
	public void stop(BundleContext bc) throws Exception {
	    
		this.thread.stopThread();
		this.thread.join();
		
		Activator.bc=null;
	
	}
	
}

Hier ist meine Manifestdatei:
Manifest-Version: 1.0

Name: ASimplebundle
Bundle-SymbolicName: ASimplebundle
Bundle-Version: 1.0.0
Bundle-Description: Demo Bundle
Bundle-Vendor: Vodafone Pilotentwicklung GmbH
Bundle-Activator: de.vpe.ASimplebundle.impl.Activator
Bundle-Category: example
Import-Package: org.osgi.framework
 

Anhänge

  • 2014-12-09 15_30_48-Java - ASimplebundle_build.xml - Eclipse.png
    2014-12-09 15_30_48-Java - ASimplebundle_build.xml - Eclipse.png
    20,6 KB · Aufrufe: 29
Zuletzt bearbeitet:
Ähnliche Java Themen
  Titel Forum Antworten Datum
K Problem bei Einbinden einer DLL in Java-Projekt Plattformprogrammierung 4
Wurstsemmel RCP SWT-Problem: Programm sucht Cocoa-Bibliothek unter Windows Plattformprogrammierung 6
D Problem mit eclipse Plattformprogrammierung 2
J JNA Implimentierungs Problem Plattformprogrammierung 0
Shams Problem bei der Knopflerfischinstallation Plattformprogrammierung 2
J Charset-Problem nach Plugin-Export Plattformprogrammierung 1
TheWhiteShadow RCP Problem mit Plugin Interaktion Plattformprogrammierung 6
D Eclipse_Visual Editor Problem Plattformprogrammierung 2
J Eclipse Plug-In für UML-Diagramme Problem Plattformprogrammierung 4
O Eclipse Plugin - Einfachstes Problem, das es gibt. Plattformprogrammierung 2
dzim OSGi Problem beim Verwenden von Declaratice Services Plattformprogrammierung 18
T netbeans problem? Plattformprogrammierung 4
dzim RCP Problem mit MenuManager Plattformprogrammierung 3
H RCP Problem mit Extension Schema Plattformprogrammierung 10
R JFace Databinding Problem Plattformprogrammierung 5
F Ecilpse plugin und MWE Workflow: classpath Problem Plattformprogrammierung 12
W Wahrscheinlich triviales Problem, aber komm nicht weiter Plattformprogrammierung 7
K SelectionListener / SelectionProvider Problem Plattformprogrammierung 2
M Xpand Anfäger Problem Plattformprogrammierung 3
K Eclipse RCP, EMF, Hibernate Problem Plattformprogrammierung 7
dzim RCP Problem mit Umsetzen des Workspace unter Win Plattformprogrammierung 4
B PreferencesService Problem Plattformprogrammierung 2
K EMF/Teneo EMap Problem Plattformprogrammierung 6
K Problem mit EMF/Teneo, GregorianCalendar, Date, Hibernate Timestamp Plattformprogrammierung 6
L RCP TreeViewer Listener Problem Plattformprogrammierung 12
C target platform problem Plattformprogrammierung 2
K NoClassDefFoundError Problem Plattformprogrammierung 24
F Eclipse: Plug-In mit Ecoding Problem Plattformprogrammierung 7
O Problem mit relativen Pfaden in einem RCP-Plugin Plattformprogrammierung 5
dzim Problem beim neuanlegen von Composites Plattformprogrammierung 4
hdi Problem bei Eclipse Plugin Export Plattformprogrammierung 9
K Bild Problem in exportierter RCP Anwendung Plattformprogrammierung 5
M Problem beim Zugriff auf Klasse aus Fragment in einem anderen Plugin Plattformprogrammierung 3
D Problem mit Synth Painter und OSGi (Equinox) Plattformprogrammierung 8
G plugin.xml Problem Plattformprogrammierung 4
I SWT Popup-Menu Problem (Position) Plattformprogrammierung 4
F OSGi und root rechte Plattformprogrammierung 2
Z MySQL-Treiber in RAP-Anwendung für Jetty im OSGI- Equinox- Maven-Dschungel Plattformprogrammierung 0
T OSGi OSGI bundle bauen org.apache.xerces Plattformprogrammierung 3
G OSGi Bundle-ClassPath Plattformprogrammierung 3
P OSGi registerService Plattformprogrammierung 3
H OSGi OSGi + Logback + slf4j - Eclipse Run Configuration Plattformprogrammierung 7
G OSGI bundleChanged Plattformprogrammierung 2
E OSGi Equinox HttpService only supports servlet 2.1 specification. Plattformprogrammierung 2
X Probleme mit dem OSGi-Framework Plattformprogrammierung 3
S OSGi Declarative Service Cardinality Plattformprogrammierung 6
Kr0e OSGI - Anfängerfragen Plattformprogrammierung 3
K OSGi Verteilte Anwendung? Plattformprogrammierung 9
B OSGi Einsteiger OSGi-Applikation Plattformprogrammierung 9
S (OSGI - EQUINOX) Welche Eclipse IDE? Plattformprogrammierung 3
N OSGi: Ressourcen gezielt aus bestimmten Modulen laden? Plattformprogrammierung 4
borobudur OSGi OSGi Blueprint Integrationstests Plattformprogrammierung 6
S OSGi Filter Syntax Plattformprogrammierung 2
N OSGi Dependency Loading Plattformprogrammierung 2
S OSGi Bibliothek für alle Plattformprogrammierung 5
H OSGI mit Eclipse und Maven Plattformprogrammierung 5
X OSGi Splash ohne product Plattformprogrammierung 2
G OSGi: Service registrieren Plattformprogrammierung 2
lumo OSGI Service - ServiceReference Plattformprogrammierung 3
G [osgi] bundle spezifische properties Plattformprogrammierung 5
DEvent [osgi] Services implementieren Plattformprogrammierung 2
C RCP Applikation starten als OSGi Bundle Plattformprogrammierung 2
B equinox OSGi EclipseStarter.startup NullPointerException Plattformprogrammierung 3
B OSGi, Euqinox, innherhalb vom Bundle Pfad des zugehörigen jar-files ermitteln Plattformprogrammierung 6
B OSGi, Equinox, Exceptions werden "ignoriert" Plattformprogrammierung 21
C OSGi, Hibernate und welche Datenbank? Plattformprogrammierung 4
astralarse Custom OSGi Launcher mit config.ini Plattformprogrammierung 6
C Eclipse - Externe OSGi bundles adden Plattformprogrammierung 7
F OSGi Anwendungsdesign Plattformprogrammierung 3
N OSGI in Netbeans? Plattformprogrammierung 5
X OSGi und RCP Plattformprogrammierung 15
C OSGi shutdown Plattformprogrammierung 4
D OSGi JSR296 (Swing Application Framework) - Konzeptionsfrage Plattformprogrammierung 2
G Osgi Plattformprogrammierung 5
A Plugin konzepte: OSGI oder JPF? Plattformprogrammierung 5
S OSGI Framework Knopflerfish Plattformprogrammierung 11

Ähnliche Java Themen

Neue Themen


Oben