• 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

Security on Runtime.getRuntime for File's in desktop app.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi there. I'm pretty new in the forum, and in english language too.
There's my doubt: I'm wrote an app for me, and ran it without a security manager.
The code below works like a charm:


When i ran it under the secutiry manager, it gave me a exception:

Of course, if a give that permission, all works again.

I try give a permission only for one directory, ou more, and the exception remains. My question is:
The only way i could use the getRuntime command is give permission of <<ALL FILES>> ? Or could I intercept the security and check against a permission, let's say:
"java.io.FilePermission" /media/Wind/-" "execute");
I"m using the Dektop.ope(file) feature, and the exception are the same. I try several ways, and the exception don't change. Always the "<ALL FILES>>, execute" thing.
<ALL FILES>> it's a little scary to me.

I'm new in the security stuff in java, but i have a clue how it's work.

I hope i'm could explain myself in understandable way.

Regards.







 
Is this the real life? Is this just fantasy? Is this a tiny ad?
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic