This content has been marked as final. Show 3 replies
Check for presence of security manager.
In webstart mode your code will run in the sandbox (even if it is singed security manager will be installed).
Or you can simply use class for name to lookup for PersistanceService. It is not on the default classpath for standalone application.
Thank you. I understand how to do the second one. But I do not know how to check for the presence of the Security Manager. Do you know how I can do that?
Or check if you can do something that is not allowed in the sandbox and catch exception. E.g. read "unsafe" property