[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [equinox-dev] I'm getting null for "org.osgi.framework.version" property from equinox Luna system bundle

Hmm. Open a bug please.
--

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the
OSGi Alliance
hargrave@xxxxxxxxxx

office: +1 386 848 1781
mobile: +1 386 848 3788





From:        Cristiano Gavião <cvgaviao@xxxxxxxxx>
To:        Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Date:        2014/01/18 22:41
Subject:        Re: [equinox-dev] I'm getting null for "org.osgi.framework.version" property from equinox Luna system bundle
Sent by:        equinox-dev-bounces@xxxxxxxxxxx





BJ,

the sentence bellow is still returning null:

frameworkVersion = (String) getSystemBundleContext().getProperty(
                Constants.FRAMEWORK_VERSION);



2014/1/18 BJ Hargrave <hargrave@xxxxxxxxxx>
The FrameworkDTO contains the framework launch properties. Not all of the properties available to BundleContext.getProperty. So unless a property is passed to the FrameworkFactory.newInstance method (the launch properties), it wont be visible in FrameworkDTO. Unless you need a DTO to send the information out of the VM, just use BundleContext.getProperty.
--

BJ Hargrave
Senior Technical Staff Member, IBM
OSGi Fellow and CTO of the
OSGi Alliance
hargrave@xxxxxxxxxx

office:
+1 386 848 1781
mobile:
+1 386 848 3788





From:        
Cristiano Gavião <cvgaviao@xxxxxxxxx>
To:        
Equinox development mailing list <equinox-dev@xxxxxxxxxxx>
Date:        
2014/01/18 11:18
Subject:        
[equinox-dev] I'm getting null for "org.osgi.framework.version" property from equinox Luna system bundle
Sent by:        
equinox-dev-bounces@xxxxxxxxxxx





Hi, I'm trying to get "org.osgi.framework.version" property from
framework DTO, this way:

FrameworkDTO framework = getSystemBundleContext().getBundle().adapt(
                FrameworkDTO.class);

frameworkVersion = (String) framework.properties
                .get(Constants.FRAMEWORK_VERSION);

but the value that I'm receiving is null. Is this a bug?

Btw, how could I know what is the name of the osgi framework?

org.osgi.framework.Constants.FRAMEWORK_VENDOR property contains
"Eclipse". But I couldn't find any reference to Equinox...

 thanks and regards,

Cristiano

_______________________________________________
equinox-dev mailing list

equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev


_______________________________________________
equinox-dev mailing list

equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev




--
"Tudo vale a pena se a alma não é pequena..."
_______________________________________________
equinox-dev mailing list
equinox-dev@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/equinox-dev