I ended up patching the "default.properties" file in the JAR. Works fine.

Thanks to all!
 Le 12 sept. 2013 18:46, "Christopher BROWN" <[email protected]> a écrit :

> It looks like the list of packages is derived from
> http://download.java.net/jdk8/docs/api/package-list so I'd need to have a
> "config.properties" starting with:
>
> jre-1.8=, \
>
> ..then each subsequent line starting with a space, package name,
> semicolon, space, and a backslash, and terminating with the "version" line.
>  With each subsequent line being derived from "package-list", as above. Is
> that correct?
>
> As the application actually uses Felix in embedded mode, I don't have the
> "conf" directory.  How should I then merge the default properties with the
> Java 8 properties?  I'm guessing that I can't just
> clobber Constants.FRAMEWORK_SYSTEMPACKAGES in the HashMap I pass to the
> Felix constructor (because "default.properties" looks like it contains
> multiple possible values from which a runtime-dependent property is
> selected at some point I haven't yet found, and isn't used as-is for that
> framework property).
>
> I would like to avoid rolling my own build of Felix, and would prefer to
> have some programmatic way where I can process "package-list" (and update
> that file as JDK8 approaches its final release) -- I can deal with that
> part -- and either add it to Felix's "default.properties" (when
> initialising Felix) or just detect JDK8 myself and conditionally override
> Felix's default behaviour.  I'm guessing that merging is possible, because
> that's what's implied by your suggestion of using "conf/config.properties"
> (which I'm assuming Felix merges with "default.properties").  Can I do that
> somehow, or can I define my own "conf" dir (and if I do, will Felix try to
> read or write other files there)?
>
> Alternatively, if I were to modify the "default.properties" file, I guess
> I would need to copy the section starting "jre-1.7=, \" up to
> "version="0.0.0.1_007_JavaSE" (replacing the "7" with "8") and append it
> after a blank line in the same file (or is there anything else to do... I
> see that that file contains other "non-jre" sections).  Is that correct?
>
> Thanks,
> Christopher
>
>
> On 12 September 2013 18:14, Richard S. Hall <[email protected]> wrote:
>
>> On 9/12/13 11:56 , Christopher BROWN wrote:
>>
>>> Hello,
>>>
>>> An application using Felix 3.2.2 on MacOS X has started failing with the
>>> following exception:
>>>
>>> org.osgi.framework.**BundleException: Unresolved constraint in bundle
>>> system.sdk-project [5]: Unable to resolve 5.0: missing requirement [5.0]
>>> package; (package=javax.sql)
>>>
>>> The application is started from a shell script that includes the
>>> following
>>> (standard) MacOS X command:
>>>
>>> /usr/libexec/java_home -d64 -v 1.6+
>>>
>>> It's now locating:
>>> /Library/Java/**JavaVirtualMachines/jdk1.8.0.**jdk/Contents/Home
>>>
>>> Would I be correct in guessing that Felix 3.2.2 has no explicit support
>>> for
>>> JDK8 (would make sense), and that it has no fallback mechanism so that it
>>> can at least export packages from prior Java releases?  As in, now that
>>> there's Java 8, it's not exporting stuff it knew about in Java 6...
>>>
>>> What can I do about that to fix it, apart from adding a hard-coded
>>> dependency on Java 6 (which is EOL) or upgrading Felix?
>>>
>>
>> The default.properties file inside the felix.jar contains the packages
>> that should be exported by the framework for a given Java platform. The
>> issue is that it doesn't have a property for Java 8 so the framework
>> doesn't export any JRE packages.
>>
>> You can just copy the Java 7 property and use it for Java 8. You can copy
>> the value from default.properties, but specify it in conf/config.properties
>> so you don't need to edit the JAR file.
>>
>> -> richard
>>
>>
>>> Thanks,
>>> Christopher
>>>
>>>
>>
>> ------------------------------**------------------------------**---------
>> To unsubscribe, e-mail: 
>> users-unsubscribe@felix.**apache.org<[email protected]>
>> For additional commands, e-mail: [email protected]
>>
>>
>

Reply via email to