Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Regarding java.awt.Desktop Class

 
raghu kalachar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11184
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 ?
 
raghu kalachar
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for that information.

Yes,That file exists in my local.
 
Maneesh Godbole
Saloon Keeper
Posts: 11184
15
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The line number 2 prints true.But I am still facing exception
 
Vineet Gairola
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Pie
Posts: 50235
79
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vineet Gairola welcome to the Ranch
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic