Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7541259
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T07:50:48+00:00 2026-05-30T07:50:48+00:00

I am trying to integrate some pre-existing code that relies on the com.sun.crypto.provider.SunJCE class

  • 0

I am trying to integrate some pre-existing code that relies on the
com.sun.crypto.provider.SunJCE class into our Equinox based
application (version 3.7.1). Now I know by default the com.sun
packages are not accessible to bundles, so I made a fragment with the
idea of extending the framework to export the package. Here is its
manifest:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Extension
Bundle-SymbolicName: extension
Bundle-Version: 1.0.0.qualifier
Fragment-Host: system.bundle; extension:=framework
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Export-Package: com.sun.crypto.provider

Clue 1: The PDE marks the Export-Package line and says that
com.sun.crypto.provider does not exist in this plugin.

I created a sample bundle that just instantiates the class in question
in the bundle activator. That bundle’s manifest is:

Manifest-Version: 1.0
Bundle-ManifestVersion: 2
Bundle-Name: Cryptotest
Bundle-SymbolicName: cryptotest
Bundle-Version: 1.0.0.qualifier
Bundle-Activator: cryptotest.Activator
Bundle-ActivationPolicy: lazy
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.sun.crypto.provider,
 org.osgi.framework;version="1.3.0"

Clue 2: The PDE marks the instantiation with an access restriction.

Despite the two errors, the project does compile and I am able to
start debugging. When starting the sample bundle, I receive a class
not found exception. However, when I do a “packages 0” in the console, it appears
Equinox is claiming to export this package:

com.sun.crypto.provider;
version="0.0.0"<org.eclipse.osgi_3.7.1.R37x_v20110808-1106 [0]>
 cryptotest_1.0.0.qualifier [2] imports

Now, I have found an ugly work around that appears to work in my minimal example. It is to basically wrap Java’s jce provider jar in a separate plugin and include that with my application, but that just seems wrong.

Could somebody please provide some insight into what’s going on? Is
there something obvious I am missing?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T07:50:50+00:00Added an answer on May 30, 2026 at 7:50 am

    This looks like a package that is present in your JVM, but only when running on a Sun one. These are not exposed by the system bundle by default, because OSGi is not built solely for Sun VMs.

    You can, however, instruct the framework to expose this package. To do so, you set the org.osgi.framework.system.packages.extra property to a list of packages, which includes your com.sun.crypto.provider package. There are several ways to do this, but you could, for instance start Equinox with a system property,

    -Dorg.osgi.framework.system.packages.extra=com.sun.crypto.provider
    

    By the way, this is not Equinox-specific, but a standard OSGi-construct.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am trying to integrate some third party tracking code into one of my
I am trying to integrate the code from this demo: http://code.google.com/p/gwt-spring-starter-app/ into my main
I am trying to integrate some external code into my application. My code was
I'm currently trying to integrate some animation drawing code of mine into a third
Okay, I am trying to integrate some C code into a C++ project, and
I'm really new to ASP.NET MVC, and I'm trying to integrate some Javascript into
We've got some problems with an external company trying in integrate into a WCF
I'm trying to integrate a public message board service into an existing web site.
I was wondering if someone could help me. Im trying to integrate some code
I am trying to integrate some OpenCV functionality into my application. Currently I have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.