Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » JDIC in RCP application
JDIC in RCP application [message #546590] Tue, 13 July 2010 13:46 Go to next message
Jacek  is currently offline Jacek Friend
Messages: 4
Registered: April 2010
Junior Member
Hi,

I try to use JDIC (jdic.dev.java.net) library in my Eclipse RCP application to send a email with attachment via default email client on Windows only. First I made a small test as normal Java project in Eclipse. I put jdic.jar and jdic_stub_windows.jar in lib folder on my project and jdic.dll in lib/windiws/x86. Both jars I set in "Java Build Path", in the tab "Libraries", so both are on my classpath. Everything works fine. Next I tried the same with RCP application. Both jars in MANIFEST.MF:

Bundle-ClassPath: .,
lib/jdic.jar,
lib/jdic_stub_windows.jar

The application is based on template with one view. The view is very simple, it has only one button and when I push the button I launch the following code:

Message msg = new Message();

List<String> toList = new ArrayList<String>();
toList.add("first@email.com");
msg.setToAddrs(toList);

List<String> ccList = new ArrayList<String>();
ccList.add("second@email.com");
msg.setCcAddrs(ccList);

msg.setSubject("Hello");
msg.setBody("Test");

List<String> attachList = new ArrayList<String>();
attachList.add("C:\\test.pdf");
try {
msg.setAttachments(attachList);
} catch (IOException e1) {
e1.printStackTrace();
}

try {
// Send mail in UI mode.
Desktop.mail(msg);
} catch (DesktopException error) {
error.printStackTrace();
}

In Desktop.mail I get a exception:

java.lang.ClassNotFoundException: org.jdesktop.jdic.desktop.internal.impl.ServiceManagerStub_w indows
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301 )
at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
at org.jdesktop.jdic.desktop.internal.ServiceManager.getService (Unknown Source)
at org.jdesktop.jdic.desktop.Desktop.mail(Unknown Source)

I think I have a problem with native library...

Any help?

Regards,
Jacek
Re: JDIC in RCP application [message #655519 is a reply to message #546590] Mon, 21 February 2011 14:42 Go to previous message
Thomas D is currently offline Thomas DFriend
Messages: 2
Registered: February 2011
Junior Member
I do have the same problem when using JDIC in an RCP application; Just some sort of classloading issue.
Did you found any hint how to use JDIC in RCP?
Thank you very much in advance for helping me
best regards

Thomas L
Previous Topic:Disabling some new file wizard?
Next Topic:Customize the about dialog screen to include about text .
Goto Forum:
  


Current Time: Fri Apr 26 09:15:41 GMT 2024

Powered by FUDForum. Page generated in 0.02912 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top