I've debugged a problem with my application into the trivial example
below. I have created an osgi bundle that runs just fine under the
Eclipse IDE, but fails to run when exported and installed in an osgi
framework. When running in the IDE, I create an OSGi launch
configuration that includes my bundle along with org.eclipse.osgi.
When I run outside the IDE, I use the following commands:
java -jar org.eclipse.osgi_3.3.0.v20070530.jar -console
osgi> install file:test_1.0.0.jar
Bundle id is 1
osgi> start 1
Starting test ... Failed - java.lang.NoClassDefFoundError:
sun/io/ByteToCharASCII
Any ideas would be greatly appreciated. This problem is currently
gating my production code.
Bryan
package test;
import org.osgi.framework.BundleActivator;
import org.osgi.framework.BundleContext;
import sun.io.ByteToCharASCII;
public class Activator implements BundleActivator
{
public void start(BundleContext context) throws Exception
{
System.out.print("Starting test ... ");
try
{
new ByteToCharASCII();
System.out.println("Passed");
}
catch (Throwable e)
{
System.out.println("Failed - " + e);
}
}
public void stop(BundleContext context) throws Exception
{}
}