Is there some kind of function in the standard library that will return the folder from where my compiled class file is running? I've searched but can't find anything...
3 replies to this topic
#1
Posted 16 May 2011 - 02:46 AM
|
|
|
#2
Posted 16 May 2011 - 03:28 AM
I think this is the cleanest way to do so:
getClass().getProtectionDomain().getCodeSource().getLocation();
#3
Posted 16 May 2011 - 02:47 PM
Could you explain that piece of code? What's the runtime class of an object ?(that's what is returned by getClass() right?), What's a protection domain? From what I see from the java docs it's some kind of way to define permissions, but I don't understand much more...
#4
Posted 16 May 2011 - 11:39 PM
Bat0u89 said:
Could you explain that piece of code?
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users


Sign In
Create Account


Back to top









