Accssesing third party jars from Action class extension. [message #327435] |
Sat, 19 April 2008 10:46 |
Eclipse User |
|
|
|
Originally posted by: automatic.javalobby.org
Hi All,
Please accept my sincere apology if this problem has been already addressed by this group. I read through various threads and forums and am unsuccessful in getting answer to my problem.
I have several third party jars which I try to access through my Action extension implementation. Action thread is silently dies out when I instantiate a class of the third party jar, from the Action class.
Here is my code,
public class PDFImagebyAdobe extends Action {
public void run() {
try{
Shell shell = (Display.getDefault()).getActiveShell();
FileDialog fd = new FileDialog( shell, SWT.OPEN);
String[] extensions = new String[]{"*.pdf"};
fd.setFilterExtensions(extensions) ;
String fname = fd.open();
if(fname == null || fname == "")
throw new com.cobra.util.exceptions.NullFilenameException();
File file = new File(fname);
FileInputStream fis = new FileInputStream(file);
System.out.println("url "+fis);//code works upto this.
com.adobe.acrobat.Viewer viewer = new com.adobe.acrobat.Viewer();
//System printouts does not show up in console after this point.
// there is no exception thrown either.
System.out.println("viewer "+viewer);
..........
.............
}catch(java.lang.Exception ex){ex.printStackTrace();}
}
Somebody please explain to me what am I doing wrong?
Regards,
Thirumal
|
|
|
Powered by
FUDForum. Page generated in 0.03208 seconds