hello, everyone...
I got an issue here, my db that bind at my applet doesn't load at the web browser but it run very well at appletviewer. here the error :

Java Plug-in 1.6.0_13
Using JRE version 1.6.0_13 Java HotSpot(TM) Client VM
User home directory = C:\Documents and Settings\Admin

----------------------------------------------------
c:   clear console window
f:   finalize objects on finalization queue
g:   garbage collect
h:   display this help message
l:   dump classloader list
m:   print memory usage
o:   trigger logging
q:   hide console
r:   reload policy configuration
s:   dump system and deployment properties
t:   dump thread list
v:   dump thread stack
x:   clear classloader cache
0-5: set trace level to <n>
----------------------------------------------------

Program is running remotely to the server/iSeries.
Error: Creating a AS400 connection object failed: access denied (java.net.SocketPermission xx.xx.x.xx:449 connect,resolve) - Program is terminating.
java.lang.reflect.InvocationTargetException
	at java.awt.EventQueue.invokeAndWait(Unknown Source)
	at org.me.inventory.testDb.init(testDb.java:30)
	at sun.plugin2.applet.Plugin2Manager$AppletExecutionRunnable.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission exitVM.0)
	at java.security.AccessControlContext.checkPermission(Unknown Source)
	at java.security.AccessController.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkPermission(Unknown Source)
	at java.lang.SecurityManager.checkExit(Unknown Source)
	at java.lang.Runtime.exit(Unknown Source)
	at java.lang.System.exit(Unknown Source)
	at org.me.inventory.testDb$MyAS400jdbc.makeConnection(testDb.java:174)
	at org.me.inventory.testDb$1.run(testDb.java:34)
	at java.awt.event.InvocationEvent.dispatch(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)

i already give the permission at the applet.policy file :

grant {

permission java.security.AllPermission;
};
eventhough, I know its not the good practice after all.
somebody, out there.. please help me...
this error drive me crazy..
before i forget, i use netbeans, web browser = firefox and ie6.
thankz in advance.

Policy file entry must be added with java.security at ..\lib\security\java.security file.

policy.url.3=file:c:/applet.policy

hi, adatapost...
tq for your reply, you make me realize something that my project doesn't have lib folder!!!
actually, im in training now and i'm continuing previous trainee project.
i'll make new project and try what you recommend me to do.
i'll let you know the result.
tq, once again... =)

hi... me again
sorry to say adatapost, your suggestion not working in my case.
you can call me idiot, but i would like to clarify this.
is it the java.security file must be in my directory project or what??
because i figure out the java.policy file also in my directory jre1.6.0_05 folder.
then, i become confused is it the same java.security file that you ask me to add??
then, i found this website http://java.sun.com/docs/books/tutorial/security/tour1/wstep1.html
next, i tried to do the step given but it surprised me when i typed

policytool

at command line interface, it send me this error

'policytool' is not recognized as internal or external command, operable program or batch file

is it reflect that i have not any policy tool yet??
i really need help from you guys, my first error lead me to the other error.
thank you in advance.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.