| View previous topic :: View next topic |
| Author |
Message |
Koplaf
Joined: 28 May 2006 Posts: 130
|
| How do I run a .jar in a sandbox just like the browser does? |
| |
|
|
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
| Java -jar filename.jar mainclass |
| |
|
|
PaulKolin
Joined: 25 May 2006 Posts: 108
|
| Koplaf, in fact, if you've made the jar correctly, you don't even need to specify the main class |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
PaulKolin, well, taken that the jar is external, I'd like to specify that it needs to be sandboxed on the cmd line...
Kopilman, In my experience that doesn't really sandbox just any .jar - I've used several that have access to local fs for example :) |
| |
|
|
Kopilman
Joined: 25 May 2006 Posts: 162
|
| Whats a sandbox |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
| Hmm maybe appletviewer instead of java? |
| |
|
|
Tilda Rickman
Joined: 01 Jul 2006 Posts: 3
|
Appletviewer will run your jar in an applet context, but security constraints are not the same of a real browser I think...
But maybe appletviewer and the java plugin are consistent
Never tried that |
| |
|
|
Koplaf
Joined: 28 May 2006 Posts: 130
|
Well at least basic file IO is denied by the default policy used by the sandbox
... used by appletviewer, that is
Hmpf, just along my previous experience w/ java's policies - policytool doesn't seem to help in creating policies that could actually work.
What kind of a .java.policy do I need to run say... appletviewer http://www.realmsofdespair.com/client/index.html ? |
| |
|
|
|