Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within Swing / AWT / SWT
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
Swing / AWT / SWT
Open a file on the desktop
Tiju Thomas
Greenhorn
Posts: 22
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have used the com.lowagie API to create a .pdf file in the workspace. How can I open it up in the acrobat reader and show to the user who is inside a swing application?
Maneesh Godbole
Bartender
Posts: 11497
19
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
If you are using JDK6, check out the Desktop class. It has a convenient method called open(File file)
[
How to ask questions
] [
Donate a pint, save a life!
] [
Onff-turn it on!
]
Tiju Thomas
Greenhorn
Posts: 22
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Unfortunately, my client requires the project to be run on 5.0. Any other go?
Maneesh Godbole
Bartender
Posts: 11497
19
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
If you are on Windows, you can use
Runtime.getRuntime().exec(new String[]{ "rundll32", "url.dll,FileProtocolHandler", fileName });
[
How to ask questions
] [
Donate a pint, save a life!
] [
Onff-turn it on!
]
Tiju Thomas
Greenhorn
Posts: 22
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Thanks much Maneesh, I could open the file using the above code.
I have seen the same code somewhere else but was not sure if this was the right way of openning a file through swing.
Anyways, thanks for the help.
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Ant error: Make sure you have it in you classpath
Opening Word
use of Runtime.getRuntime().exec
Open Dialog JFileChooser
pdc viewer software needed
More...