The Artima Developer Community
Sponsored Link

Java Answers Forum
Open IE from java

2 replies on 1 page. Most recent reply: Mar 1, 2005 5:49 AM by Angsuman Chakraborty

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 2 replies on 1 page
krishna

Posts: 1
Nickname: krisprasad
Registered: Feb, 2005

Open IE from java Posted: Feb 26, 2005 1:24 AM
Reply to this message Reply
Advertisement
My requirement is as follows:
I have to open a pdf file from java. But this pdf must open inside Internet Explorer.I have tried using the OleControlSite, but does not happen. My code is as follows:

comp = new Composite(shell, SWT.NONE);
FormData fd2 = new FormData();<br>
fd2.top = new FormAttachment(0,0);<br>
fd2.left = new FormAttachment(0,0);<br>
comp.setLayoutData(fd2);<br>
comp.setLayou t(new FormLayout());<br>
OleFrame frame = new OleFrame(comp, SWT.NONE);<br>
OleControlSite oleCtrl = new OleControlSite(frame, SWT.NONE, "Shell.Explorer");<br>
oleCtrl.doVerb(OLE.OLEIVERB_SHOW | OLE.OLEIVERB_OPEN );<br>

Is there anything wrong with the code. The IE does not open.
Also, if it opens, how do i give the path of the pdf to be opened inside it.
This is a urgent requirement for me!!!


perry anderson

Posts: 10
Nickname: anderson
Registered: Feb, 2005

Re: Open IE from java Posted: Feb 28, 2005 3:21 PM
Reply to this message Reply
no, i'm afraid it simply cannot be done

looks like you are screwed

tough

- perry

Angsuman Chakraborty

Posts: 19816
Nickname: angsuman
Registered: Dec, 2003

Re: Open IE from java Posted: Mar 1, 2005 5:49 AM
Reply to this message Reply
Two options:
1. Use JNI or JNI facilitating libraries to open the file in IE
2. PDFgo or icepdf from icesoft - http://www.pdfgo.com/

Angsuman
http://blog.taragana.com/

Flat View: This topic has 2 replies on 1 page
Topic: How to  auto generate the repository creation scripts for different databas Previous Topic   Next Topic Topic: AT commands to modem using javax.comm

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use