File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Swing / AWT / SWT and the fly likes Regarding java.awt.Desktop Class Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Bookmark "Regarding java.awt.Desktop Class" Watch "Regarding java.awt.Desktop Class" New topic
Author

Regarding java.awt.Desktop Class

raghu kalachar
Greenhorn

Joined: Aug 29, 2010
Posts: 10
hi,

Using java.awt.Desktop class I am trying to open Property File For Editing.But I am getting below error.Can any one look into it and give me possible solution.

Here is my code

Here is the error I am getting
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10519
    
    9

In future, while posting code, please UseCodeTags I have added them for you this time. As you can see the tags make the code much more easier to read and understand


So does your file really exist at :/E:/EasySetup/build.properties ?


[How to ask questions] [Donate a pint, save a life!] [Onff-turn it on!]
raghu kalachar
Greenhorn

Joined: Aug 29, 2010
Posts: 10
Thanks for that information.

Yes,That file exists in my local.
Maneesh Godbole
Saloon Keeper

Joined: Jul 26, 2007
Posts: 10519
    
    9

I do not think /E is a valid drive.
Do you see the file if you copy paste /E:/EasySetup/build.properties in your browser?
Also add

Please let us know what line number 2 prints
raghu kalachar
Greenhorn

Joined: Aug 29, 2010
Posts: 10
The line number 2 prints true.But I am still facing exception
Vineet Gairola
Greenhorn

Joined: Sep 17, 2014
Posts: 1
raghu kalachar wrote:The line number 2 prints true.But I am still facing exception


I have faced the similar issue,and I think it might have to do with the extension of the file.Try opening this file normally by double clicking,if it shows choose the program from the available list then you will have to change the open always setting to notepad or whatever program you want to open it with.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 39791
    
  28
Vineet Gairola welcome to the Ranch
 
Don't get me started about those stupid light bulbs.
 
subject: Regarding java.awt.Desktop Class