Originally posted by sanjeev mehra: can we get the path of class file programaticaly in an application?
The above suggestions should work, but I'm curious as to why you would need this. If it is to impose some restrictions, best use the normal Java security features. If you need to load some additional resources like graphics or HTML documentation, put them in the jar(s) and use ClassLoader.getResource() or ClassLoader.getResourceAsStream(). (You can obtain a suitable classloader using, for example, DataInterface.class.getClassLoader()). - Peter
i am also using this and the reason is when server will be loaded i will provide exact loction of db.db file to user and ask him if he want to change it. on client side if user choose localmode, same situation. regards, bhuvan.
Forget Steve. Look at this tiny ad:
Devious Experiments for a Truly Passive Greenhouse!