Hi guys,
i am new at this world and i ve downloaded the felix framework, jdk and
sdk... well after that i ve started the apache tutorials with N°1: Apache
Felix Tutorial Example
1<http://felix.apache.org/site/apache-felix-tutorial-example-1.html>:
A bundle that listens for OSGi service events.
it was great i ve learned much as i was writing the code and things, but
when i went to the cmd so i can compile it i just got lost!
first off what did they mean when they say to have felix.jar in the class
path?
second off this is what i get if i try to compile:
c:\classes\tutorial\exp1>javac -d c:\classes *.java
Activator.java:7: error: package org.osgi.framework does not exist
import org.osgi.framework.BundleActivator;
^
Activator.java:8: error: package org.osgi.framework does not exist
import org.osgi.framework.BundleContext;
^
Activator.java:9: error: package org.osgi.framework does not exist
import org.osgi.framework.ServiceListener;
^
Activator.java:10: error: package org.osgi.framework does not exist
import org.osgi.framework.ServiceEvent;
^
Activator.java:16: error: cannot find symbol
public class Activator implements BundleActivator, ServiceListener
^
symbol: class BundleActivator
Activator.java:16: error: cannot find symbol
public class Activator implements BundleActivator, ServiceListener
^
symbol: class ServiceListener
Activator.java:24: error: cannot find symbol
public void start(BundleContext context){
^
symbol: class BundleContext
location: class Activator
Activator.java:32: error: cannot find symbol
public void stop(BundleContext context){
^
symbol: class BundleContext
location: class Activator
Activator.java:42: error: cannot find symbol
public void serviceChanged(ServiceEvent event){
^
symbol: class ServiceEvent
location: class Activator
Activator.java:45: error: cannot find symbol
if(event.getType() == ServiceEvent.REGISTRED)
^
symbol: variable ServiceEvent
location: class Activator
Activator.java:49: error: cannot find symbol
else if (event.getType() == ServiceEvent.UNREGISTRED)
^
symbol: variable ServiceEvent
location: class Activator
Activator.java:53: error: cannot find symbol
else if (event.getType() == ServiceEvent.MODIFIED)
^
symbol: variable ServiceEvent
location: class Activator
12 errors
c:\classes\tutorial\exp1>
it s obvious that i have an issue with the dependencies but how to fix that
?
i dunno if this would help, but my tutorial java file is saved under
c:/classes/... while my felix-framework is under
d:/felix-framework-4.0.2... does this have anything to do with it? am i
supposed to have the tutorial under felix for instance or something?
cheers,