Results 1 to 7 of 7
Thread: Opening the Application
- 04-17-2009, 02:38 PM #1
Member
- Join Date
- Apr 2009
- Posts
- 17
- Rep Power
- 0
- 04-17-2009, 02:39 PM #2
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
I can only assume you want the DeskTop class. Check out the API docs for that class.
- 04-17-2009, 03:06 PM #3
Member
- Join Date
- Apr 2009
- Posts
- 17
- Rep Power
- 0
Hi,
Thanks for ur reply.
Actually my requirement to open a pdf file using java program. I installed netbeans in my Mac Machine.
Without using this type of batch file ,can i open that file in any other way?
- 04-17-2009, 03:14 PM #4
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
What "type of batch file"? What are you talking about?
If you want to display a files contents solely using Java, and no other applications (which runs counter to what you asked in the first post), then you need to program your app in such a way that it recognises the file type and then uses the proper libraries to display it. And, no, there is "super function" that does all this for you.
For PDF Google for the iText library.
If you want to be able to have Java use some other application to display whatever file it wishes to display, then, as I have already said, see the API docs for the DeskTop class.
- 04-17-2009, 03:53 PM #5
Member
- Join Date
- Apr 2009
- Posts
- 17
- Rep Power
- 0
Thanks for your reply,
For example,
in java program, i giving the path and file name to open the file.
i need a help,
Java Code:File file1 = new File ("\\\\172.16.3.203\\transfer\\Mubeena\\DocStation.pdf"); if (file1.exists ()) { // file1.canExecute(); // here i want to write the code, to open that file. }
- 04-17-2009, 06:42 PM #6
Senior Member
- Join Date
- Jun 2008
- Posts
- 2,366
- Rep Power
- 8
Like I said, Google for iText if you want to display it yourself, and see the API docs for DeskTop if you want to use an external tool to display it.
At least try it.
- 04-22-2009, 06:21 AM #7
Member
- Join Date
- Apr 2009
- Posts
- 17
- Rep Power
- 0
Similar Threads
-
opening ports
By prashant in forum NetworkingReplies: 2Last Post: 03-22-2009, 08:23 PM -
Opening in Java and .Net
By techinvo in forum Jobs OfferedReplies: 0Last Post: 03-22-2009, 07:24 AM -
opening of an exe in JFrame
By smartsubroto in forum New To JavaReplies: 3Last Post: 07-16-2008, 05:01 AM -
Opening a workspace twice
By javaplus in forum EclipseReplies: 0Last Post: 01-08-2008, 09:56 AM -
Opening URLConnection
By Java Tip in forum Java TipReplies: 0Last Post: 11-24-2007, 07:37 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks