What you think you need to import and what you actually need to import is often not the same. For instance, the classes in question may appear via classes in the java.* package space, which you don't need to import, but the packages that these references may end being needed.
As for Eclipse, it is likely that you witness the Bootstrap loading being active (i.e. direct delegation to classloader above the framework) which is used in Eclipse but strongly discouraged in regular OSGi systems. Cheers Niclas On Sat, Jan 10, 2009 at 7:50 PM, Miguel <m...@moviquity.com> wrote: > I don't import this class: javax/net/SocketFactory because I thought I didnt > need it. > > In my code, I import the following classes: > > import javax.mail.Message; > import javax.mail.MessagingException; > import javax.mail.PasswordAuthentication; > import javax.mail.Session; > import javax.mail.Transport; > import javax.mail.internet.AddressException; > import javax.mail.internet.InternetAddress; > import javax.mail.internet.MimeMessage; > > and I have them into me manifest. > Actually I dont have any javax.net import in my manifext. > The point is that I have run my application into my eclipse framework and it > works perfectly but when i run the app outside eclipse, i got the commented > error. > > On Sat, 2009-01-10 at 10:49 +0100, Miguel wrote: > > Hello, > > I m running an OSGI platform which send mails. I m using the library > javax/net/SocketFactory which is inside rt.jar but my OSGI platform doesnt > find. > > Exception in thread "SendMailThread" java.lang.NoClassDefFoundError: > javax/net/SocketFactory > at > com.sun.mail.util.SocketFetcher.getSocketFactory(SocketFetcher.java:262) > at com.sun.mail.util.SocketFetcher.getSocket(SocketFetcher.java:150) > at > com.sun.mail.smtp.SMTPTransport.openServer(SMTPTransport.java:1359) > > how can include this library in runtime enviroment? > > thank you , > > M > > _______________________________________________ > OSGi Developer Mail List > osgi-dev@mail.osgi.org > https://mail.osgi.org/mailman/listinfo/osgi-dev > _______________________________________________ OSGi Developer Mail List osgi-dev@mail.osgi.org https://mail.osgi.org/mailman/listinfo/osgi-dev