How can I change java.policy at runtim?

Hi,
I have to change java.policy to launch my application through webstart to provide one RuntimePermission "permission java.lang.RuntimePermission "getClassLoader";"
Its because of a bug in java bug "_http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809366_"
So, my problem here is, how can I do this dynamically on each client machine's java.policy.
I have spent time on this and found some alternatives
1. Specifying an Additional Policy File at Runtime by launching application *"java -Djava.security.manager -Djava.security.policy=someURL SomeApp"*
Please refer more on this "_http://docs.oracle.com/javase/6/docs/technotes/guides/security/PolicyFiles.html_"
But, here the problem is, how can I do this using webstart (expert.jnlp) file even though I have the "java-vm-args" tag, its not supporting this argument.
Please refer "_http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#security_";
2. Implementing the Policy in code.
But, not sure how to do this..
How can I grant the runtime permission on every user's machine dynamycally?
Please suggest me if you have any other solutions for this problem.
Please help on this.
Thanks in advance :)
Edited by: 925156 on Apr 3, 2012 5:38 AM
Edited by: 925156 on Apr 3, 2012 5:38 AM

Hi,
Thankyou very much for your reply :)
Here are some background details on this:
I am using java6 and weblogic 10.3.3.
Here is thing that I tried,
My application downloads a few jars to the client machines using java webstart and then it will get the initial context using the t3 protocal. The jars include wlclient.jar and ojdbc6.jar initially.
The problem here I was facing, when I tried request a bean, it is giving me the following exception in the client logs.It is requesting one state less session bean and I checked the server logs as well and the bean has returned the expected values properly.
But here I observed one more thing, before this request, one session bean(state less) has been requested successfully.
java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
at com.mbt.expert.server.util._ServerDBQueryObjectRemote_Stub.getExchangeList(Unknown Source)
at com.mbt.expert.util.DBQueryObject.getExchangeList(DBQueryObject.java:419)
at com.mbt.expert.view.dialogs.OpenExchangeDialog.actionPerformed(OpenExchangeDialog.java:425)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(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.pumpEventsForFilter(Unknown Source)
at java.awt.Dialog$1.run(Unknown Source)
at java.awt.Dialog$3.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Dialog.show(Unknown Source)
at com.mbt.expert.view.dialogs.OpenExchangeDialog.displayDialog(OpenExchangeDialog.java:606)
at com.mbt.expert.mdi.actions.OpenExchangeAction.execute(OpenExchangeAction.java:204)
at com.mbt.mdi.MDICommand.actionPerformed(MDICommand.java:47)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(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)
Caused by: org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
at java.lang.reflect.Constructor.newInstance(Unknown Source)
at java.lang.Class.newInstance0(Unknown Source)
at java.lang.Class.newInstance(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(Unknown Source)
at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknown Source)
at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
... 80 more
The same is working in some other machine which are in different network. So, I have replaced the wlclient.jar with the wlthint3client.jar.
After replacing this jar I was getting the below exception in client logs while requesting a state less session bean.I also checked whether the request is reaching the server (bean) or not, but its not reaching the server.The problem is same at all the machines irrespective of the networks.
java.lang.AssertionError: Failed to generate class for com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:786)
     at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:74)
     at weblogic.rmi.internal.StubInfo.resolveObject(StubInfo.java:213)
     at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:207)
     at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
     at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
     at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
     at java.lang.reflect.Method.invoke(Unknown Source)
     at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
     at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
     at java.io.ObjectInputStream.readObject0(Unknown Source)
     at java.io.ObjectInputStream.readObject(Unknown Source)
     at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
     at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:598)
     at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
     at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
     at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
     at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
     at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
     at weblogic.jndi.internal.ServerNamingNode_1033_WLStub.lookup(Unknown Source)
     at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:405)
     at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
     at javax.naming.InitialContext.lookup(Unknown Source)
     at com.mbt.expert.mdi.ExpertVariable.getLoginSession(ExpertVariable.java:455)
     at com.mbt.expert.view.dialogs.Login.okPressed(Login.java:187)
     at com.mbt.expert.view.dialogs.Login.keyPressed(Login.java:141)
     at java.awt.Component.processKeyEvent(Unknown Source)
     at javax.swing.JComponent.processKeyEvent(Unknown Source)
     at java.awt.Component.processEvent(Unknown Source)
     at java.awt.Container.processEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(Unknown Source)
     at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
     at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
     at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
     at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
     at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
     at java.awt.Component.dispatchEventImpl(Unknown Source)
     at java.awt.Container.dispatchEventImpl(Unknown Source)
     at java.awt.Window.dispatchEventImpl(Unknown Source)
     at java.awt.Component.dispatchEvent(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.pumpEventsForFilter(Unknown Source)
     at java.awt.Dialog$1.run(Unknown Source)
     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)
Caused by: java.lang.reflect.InvocationTargetException
     at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
     at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
     at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
     at java.lang.reflect.Constructor.newInstance(Unknown Source)
     at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:795)
     ... 55 more
Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
     at java.security.AccessControlContext.checkPermission(Unknown Source)
     at java.security.AccessController.checkPermission(Unknown Source)
     at java.lang.SecurityManager.checkPermission(Unknown Source)
     at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
     at weblogic.utils.classloaders.AugmentableClassLoaderManager.getAugmentableClassLoader(AugmentableClassLoaderManager.java:48)
     at weblogic.rmi.internal.ClientRuntimeDescriptor.findLoader(ClientRuntimeDescriptor.java:254)
     at weblogic.rmi.internal.ClientRuntimeDescriptor.getInterfaces(ClientRuntimeDescriptor.java:132)
     at weblogic.rmi.internal.StubInfo.getInterfaces(StubInfo.java:77)
     at com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub.ensureInitialized(Unknown Source)
     at com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub.<init>(Unknown Source)
     ... 60 more
I have tried one more thing, I have taken all the required jars to one of the client machines and executed the main class (by setting the required class path) from cmd using java instead of javaws. Surprisingly, its working fine with out any problem using the wlthint3client.jar.
I also tried the same, by placing wlclient.jar using java in the same way(from cmd instead of javaws ), but I was facing the same exception while requesting the second session bean and found the same above exception in client logs.
To resolve this, I come across the java bug that I have given earlier "_http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809366_".
In that page, I found a work around for this; suggested by bea to add the Runtime permission "*permission java.lang.RuntimePermission "getClassLoader";*" to the clients java.policy
So, please suggest me a way to resolve this problem.
Thanks in advance :)

Similar Messages

  • How can I change java.policy at runtim on client machines using java webst?

    Hi,
    I have to change java.policy to launch my application through webstart to provide one RuntimePermission "permission java.lang.RuntimePermission "getClassLoader";"
    Its because of a bug in java bug "_http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809366_"
    So, my problem here is, how can I do this dynamically on each client machine's java.policy.
    I have spent time on this and found some alternatives
    1. Specifying an Additional Policy File at Runtime by launching application "java -Djava.security.manager -Djava.security.policy=someURL SomeApp"
    Please refer more on this "http://docs.oracle.com/javase/6/docs/technotes/guides/security/PolicyFiles.html"
    But, here the problem is, how can I do this using webstart (expert.jnlp) file even though I have the "java-vm-args" tag, its not supporting this argument.
    Please refer "http://docs.oracle.com/javase/6/docs/technotes/guides/javaws/developersguide/syntax.html#security";
    2. Implementing the Policy in code.
    But, not sure how to do this..
    How can I grant the runtime permission on every user's machine dynamycally?
    Here are some background details on this:
    I am using java6 and weblogic 10.3.3.
    Here is thing that I tried,
    My application downloads a few jars to the client machines using java webstart and then it will get the initial context using the t3 protocal. The jars include wlclient.jar and ojdbc6.jar initially.
    The problem here I was facing, when I tried request a bean, it is giving me the following exception in the client logs.It is requesting one state less session bean and I checked the server logs as well and the bean has returned the expected values properly.
    But here I observed one more thing, before this request, one session bean(state less) has been requested successfully.
    java.rmi.MarshalException: CORBA MARSHAL 0 No; nested exception is:
    org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    at com.sun.corba.se.impl.javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
    at javax.rmi.CORBA.Util.mapSystemException(Unknown Source)
    at com.mbt.expert.server.util._ServerDBQueryObjectRemote_Stub.getExchangeList(Unknown Source)
    at com.mbt.expert.util.DBQueryObject.getExchangeList(DBQueryObject.java:419)
    at com.mbt.expert.view.dialogs.OpenExchangeDialog.actionPerformed(OpenExchangeDialog.java:425)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(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.pumpEventsForFilter(Unknown Source)
    at java.awt.Dialog$1.run(Unknown Source)
    at java.awt.Dialog$3.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.awt.Dialog.show(Unknown Source)
    at com.mbt.expert.view.dialogs.OpenExchangeDialog.displayDialog(OpenExchangeDialog.java:606)
    at com.mbt.expert.mdi.actions.OpenExchangeAction.execute(OpenExchangeAction.java:204)
    at com.mbt.mdi.MDICommand.actionPerformed(MDICommand.java:47)
    at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
    at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
    at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
    at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
    at java.awt.Component.processMouseEvent(Unknown Source)
    at javax.swing.JComponent.processMouseEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
    at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
    at java.awt.EventQueue.access$000(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.awt.EventQueue$1.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.awt.EventQueue$2.run(Unknown Source)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.security.AccessControlContext$1.doIntersectionPrivilege(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)
    Caused by: org.omg.CORBA.MARSHAL: vmcid: 0x0 minor code: 0 completed: No
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at java.lang.Class.newInstance0(Unknown Source)
    at java.lang.Class.newInstance(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.MessageBase.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.giopmsgheaders.ReplyMessage_1_2.getSystemException(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaMessageMediatorImpl.getSystemExceptionReply(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.processResponse(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientRequestDispatcherImpl.marshalingComplete(Unknown Source)
    at com.sun.corba.se.impl.protocol.CorbaClientDelegateImpl.invoke(Unknown Source)
    at org.omg.CORBA.portable.ObjectImpl._invoke(Unknown Source)
    ... 80 more
    The same is working in some other machine which are in different network. So, I have replaced the wlclient.jar with the wlthint3client.jar.
    After replacing this jar I was getting the below exception in client logs while requesting a state less session bean.I also checked whether the request is reaching the server (bean) or not, but its not reaching the server.The problem is same at all the machines irrespective of the networks.
    java.lang.AssertionError: Failed to generate class for com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:797)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:786)
    at weblogic.rmi.extensions.StubFactory.getStub(StubFactory.java:74)
    at weblogic.rmi.internal.StubInfo.resolveObject(StubInfo.java:213)
    at weblogic.rmi.internal.StubInfo.readResolve(StubInfo.java:207)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at java.io.ObjectStreamClass.invokeReadResolve(Unknown Source)
    at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
    at java.io.ObjectInputStream.readObject0(Unknown Source)
    at java.io.ObjectInputStream.readObject(Unknown Source)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:197)
    at weblogic.rjvm.MsgAbbrevInputStream.readObject(MsgAbbrevInputStream.java:598)
    at weblogic.utils.io.ChunkedObjectInputStream.readObject(ChunkedObjectInputStream.java:193)
    at weblogic.rmi.internal.ObjectIO.readObject(ObjectIO.java:62)
    at weblogic.rjvm.ResponseImpl.unmarshalReturn(ResponseImpl.java:240)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:348)
    at weblogic.rmi.cluster.ClusterableRemoteRef.invoke(ClusterableRemoteRef.java:259)
    at weblogic.jndi.internal.ServerNamingNode_1033_WLStub.lookup(Unknown Source)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:405)
    at weblogic.jndi.internal.WLContextImpl.lookup(WLContextImpl.java:393)
    at javax.naming.InitialContext.lookup(Unknown Source)
    at com.mbt.expert.mdi.ExpertVariable.getLoginSession(ExpertVariable.java:455)
    at com.mbt.expert.view.dialogs.Login.okPressed(Login.java:187)
    at com.mbt.expert.view.dialogs.Login.keyPressed(Login.java:141)
    at java.awt.Component.processKeyEvent(Unknown Source)
    at javax.swing.JComponent.processKeyEvent(Unknown Source)
    at java.awt.Component.processEvent(Unknown Source)
    at java.awt.Container.processEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(Unknown Source)
    at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
    at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
    at java.awt.Component.dispatchEventImpl(Unknown Source)
    at java.awt.Container.dispatchEventImpl(Unknown Source)
    at java.awt.Window.dispatchEventImpl(Unknown Source)
    at java.awt.Component.dispatchEvent(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.pumpEventsForFilter(Unknown Source)
    at java.awt.Dialog$1.run(Unknown Source)
    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)
    Caused by: java.lang.reflect.InvocationTargetException
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
    at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
    at java.lang.reflect.Constructor.newInstance(Unknown Source)
    at weblogic.rmi.internal.StubGenerator.generateStub(StubGenerator.java:795)
    ... 55 more
    Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission getClassLoader)
    at java.security.AccessControlContext.checkPermission(Unknown Source)
    at java.security.AccessController.checkPermission(Unknown Source)
    at java.lang.SecurityManager.checkPermission(Unknown Source)
    at java.lang.ClassLoader.getSystemClassLoader(Unknown Source)
    at weblogic.utils.classloaders.AugmentableClassLoaderManager.getAugmentableClassLoader(AugmentableClassLoaderManager.java:48)
    at weblogic.rmi.internal.ClientRuntimeDescriptor.findLoader(ClientRuntimeDescriptor.java:254)
    at weblogic.rmi.internal.ClientRuntimeDescriptor.getInterfaces(ClientRuntimeDescriptor.java:132)
    at weblogic.rmi.internal.StubInfo.getInterfaces(StubInfo.java:77)
    at com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub.ensureInitialized(Unknown Source)
    at com.mbt.expert.server.session.LoginSessionBean_tqw6yu_HomeImpl_1033_WLStub.<init>(Unknown Source)
    ... 60 more
    I have tried one more thing, I have taken all the required jars to one of the client machines and executed the main class (by setting the required class path) from cmd using java instead of javaws. Surprisingly, its working fine with out any problem using the wlthint3client.jar.
    I also tried the same, by placing wlclient.jar using java in the same way(from cmd instead of javaws ), but I was facing the same exception while requesting the second session bean and found the same above exception in client logs.
    To resolve this, I come across the java bug that I have given earlier "_http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4809366_".
    In that page, I found a work around for this; suggested by bea to add the Runtime permission "permission java.lang.RuntimePermission "getClassLoader";" to the clients java.policy
    So, please suggest me a way to resolve this problem.
    Please suggest me if you have any other solutions for this problem.
    Thanks in advance :)

    I still think your problem is nothing to do with that ancient non-bug and that you should be looking elsewhere. You might be lucky and find someone here who can say "Ah, I know what that is" but I doubt it because since Oracle took over Sun this site has gone down hill big time.

  • How can I change the SocketFactory at runtime?

    I have a question, maybe someone has had a similar problem. I have a client-server application with communication over RMI. The client may, through a dialog box, choose a connection "submethod":
    * a simple RMI
    * RMI over fixed ports
    * RMI over HTTP.
    After selection the application registers the proper socket factory with the RMISocketFactory.setSocketFactory(...) method. So, if the user disconnects from the server and tries to reconnect with another "submethod", the application throws the following exception:
    java.net.SocketException: factory already definedAPI says "The RMI socket factory can only be set once", so how can I change the connection submethod at runtime?
    Regards,
    Marek.

    You can't.

  • How can I change the policy file?

    I have designed an applet to read a file from the local Machine.
    This applet thro a servlet reads the contents of the file specified.
    I use Tomcat 4.1.12 server and this is an client-server application.
    To read the file in the local machine, I set the permission as follows in the .java.policy file in the Local Machine.
    grant codeBase "http://MyMachine:8080/Example" {
    permission java.io.FilePermission "<<ALL FILES>>", "read, write, delete, execute";
    as the applet file is in the Example of the server "MyMachine".
    Its working and my applet is able to read the file from the local machine it runs.
    Now my problem is I cannot set/change the policy file in every machine where my applet runs.
    Instead if there is a way to change the policy when the applet downloads,that'll be effective.
    That is I donot want to go and change the policy file manually in each and every machine where my applet runs(I donot even know which are the machines going to run the applet).
    Is there any means to acheieve my need?
    Please explain me in detail or direct me to the relevent web sites or links.
    Thank you

    Hi Hosuke,
    I had the same problem, thanks for the advise.
    Still I have a remark to make.
    The thing is that, in order for the applet to have the permission granted (for whatever), you need to have a policy file which you can include in the JAR file (like you explained before) AND also you need to add an entry in the java.security file (located for me: "C:\Program Files\Java\j2re1.4.1_01\lib\security\java.security") that tells the applet where to find all the .policy files.
    Something like: policy.url.4=file:/c:/java.policy
    But since we are talking about an applet we are not able to make changes to this file.
    Maybe you or anyone else knows a workaround for this problem.
    Thanks in advance,
    Ronald Vromans.

  • HT1338 how can i update java se 6 runtime

    when i update my mac to os x 8, my some softwares didn't work. they asked java se 6 runtime. but, i can't download from their link. what should i do.??

    Apple supplies their own version of Java.
    Try Software Update.

  • How can i change character set on forms9i runtime?

    Hi Every Body,
    i am a user on forms9i developer.
    i want to know how can i change character set definition when i run a form on web(with oc4j).
    is it any JAR file or another file that i can change display of characters on forms9i runtime on web?
    thanks a lot.
    f-badiee.

    hi frank,
    thanks a lot for your attention.
    i have a problem on persian language.
    whereas oracle dosn't support persian(farsi) language,
    i use arabic character set for simulation.
    in oracle developer6i (forms) i had no problem about displaying farsi fonts on runtime.
    but in forms9i that runs forms on web(java applet) i can't use farsi fonts correctly.
    for example when i type a word(boilerplate text) on farsi language in form builder i can see it correctly but when i run my forms on web , characters of that word have some displacement.
    i want to know that is there any configuration file for solving this problem?
    thanks a lot.
    be successful.
    f-badiee.

  • How can you change property files of a EJB at Runtime?

    Hi,
    I have got an ejb and want to change my variables which I stored in property file at Runtime.
    But the property file isn´t in the jar-file of my ejb...
    How can I add it.
    Or How can I change the property file without new compilation.
    Thanks
    Uli

    Hi Uli,
    the previous post is generally correct, but without taking any part in the sensibility of this (there are valid reasons why you would not store the values in a DB) it would be necessary for you to be a bit more specific.
    Is your problem that you can not see the file from your EJB or that you don't know how to change a property file entry in general?
    Cheers,
    Kalle

  • How can i change the OS input language though java

    hi,
    i am working on Windowx XP and for multiple language input support i am using the windows language bar.
    How can i change the input language through the java itself.

    hi,
    for a solution:
    logText.getInputContext().selectInputMethod(Locale.FRANCE)

  • How can i change lifecycle state of globalPlatform java card?

    hi
    i have GlobalPlatform compliant java card.
    how can i change my card life cycle state ?
    for example, changing life cycle state to SECURED.
    in global platform specs doesn't exist anything about a command for changing life cycle state.

    See GP 2.1.1, section 9.10, SET STATUS command.
    The SET STATUS command shall be used to modify the card Life Cycle State or the Application Life Cycle State.
    Best regards,
    Eve

  • How can I change the Jframe Java help Icon

    How can I change then Jframe Java help Icon?.
    I am using then HelpSet class and HelpBroker.
    I want to change the java help icon
    Any Idea? thanks. ...

    It can be done, but it's ugly...
    Add in a listener to your topmost JFrame to sense when the focus is lost, since this happens when a help window comes up. When the focus leaves the main window, check all the windows that are up to see if one is a help window. If so, this will give you a reference to the help window and you can drill down to change what you want.
    Here's an example that changes the icon and removes the borders from the javahelp buttons.
    WindowListener wndCloser = new WindowAdapter() {
              //A necessarily roundabout method to affect
              //look and feel aspects of the javahelp viewer.
              //(there is no way to get at these components directly.)
              //When the main frame loses focus, it may be because
              //the help viewer was brought up. Look through all
              //the current frames to see if one is a help viewer.
              //If it is, change the look of the help viewer
              //to what we want.
              Frame m_helpFrame = null;
              public void windowDeactivated(WindowEvent e) {
              if (m_helpFrame != null)
                   return;
              Frame[] frames = getFrames();
              for (int k = 0; k < frames.length; k++) {
                   if (!(frames[k] instanceof JFrame))
                   continue;
                   JFrame jf = (JFrame)frames[k];
                   if (jf.getContentPane().getComponentCount()==0)
                   continue;
                   Component c = jf.getContentPane().
                   getComponent(0);
                   if (c == null || !(c instanceof JHelp))
                   continue;
                   m_helpFrame = jf;
                   //now that we know the Frame, we can change the title icon
                   final Image image2 = <your icon here>
                   m_helpFrame.setIconImage(image2);
                   JHelp jh = (JHelp)c;
                   for (int s=0; s<jh.getComponentCount(); s++) {
                   c = jh.getComponent(s);
                   if (c == null || !(c instanceof JToolBar))
                        continue;
                   JToolBar jtb = (JToolBar)c;
                   //now that we've accessed the toolbar, we can
                   //modify the look of the buttons.
                   for(int i=0; i<jtb.getComponentCount(); i++) {
                        Component comp = jtb.getComponentAtIndex(i);
                        if(comp instanceof JButton) {
                        JButton button = (JButton)comp;
                        button.setBorder(null);

  • How can we change some value in OSB at runtime as Preferences in BPEL

    Hi all,
    What is the approach we have to use in OSB to implement Preferences ( where i can change value at run time without deploying again ) like in BPEL.
    Thanks
    Phani

    Thanks for the replay . I know they used for different purpose.i want to know how can we change anything in OSB at run time without redeploying the process again.
    simple scenario :
    Lets say i have a option in BPEL to change the Username/password if i set as Partner link parameters from BPEL Console . no need to redeploy the BPEL process .
    if i invoke the same service from OSB how can change the username/password without redeploying the OSB project.
    Thanks
    Phani

  • How can I change the default  driver to OracleXADataSource in JDeveloper

    Hello,
    How can I change the default oracle driver: oracle.jdbc.OracleDriver to oracle.jdbc.xa.client.OracleXADataSource in JDeveloper Studio Edition Version 11.1.1.0.2, Build JDEVADF_MAIN.BOXER_GENERIC_090328.0229.5205.
    If I modify the file connections.xml from jdeveloper\system\system11.1.1.0.31.52.05\o.jdevimpl.rescat2\connections in the sense that I change the driver class, then in JDeveloper when I test my connection I have this problem: Test failed: oracle.jdbc.xa.client.OracleXADataSource cannot be cast to java.sql.Driver
    Why do I need this XA version of the oracle driver? Well I tried, from a book to reproduce the model of an application: entities, stateless and stateful session beans, mdb, web services and a client to test one part of the model.
    And because of the JMS server I need an XA driver.
    I deployed to the integrated wls 10.3 and when I test my client, if I use the default driver for the connection the an error message appears tell me either to emulate two-phase commit or to use XA driver.
    My application works very well, if I configured in the console of the integrated wls 10.3 a datasource with the same name as my ide/application connection that has for the Driver Class Name: oracle.jdbc.xa.client.OracleXADataSource in the Connection Pool tab.
    Thank you.

    Open DIsk Utility and in the toolbar select Disk Image. The file selector will open and you'll have to do three things: 1) just as with any file, name it and point the file selector to where you want it to be saved, 2) near the bottom you'll see name - type iWork 2013 and 3) below that select the image size. Click on size, choose custom and type 1500 MB then click on the Create button.
    Some time will pass and then you'll see an external disk pop up on your desktop and/or the Finder window sidebar. Drag the three programs into it and eject it like any other external disk. Now delete the programs from your applications window.
    Where ever it was you pointed the file selector to you'll see the file you created. Double click on it and the disk image will mount again.

  • How Can I change a report with base in another in the same dashboard?

    Hi,
    I need to publish two reports in a dashboard, the first report is a list of values and the second report is a chart. When I click in a value of the first report, the second report must change with the value selected from the first report.
    I first created the first report, and I changed the column properties in the data format, I selected treat text as: "Custom Text Format", the Custom Text Format is:
    @[html]"<f ont class=Nav oncl ick=\"Ja vaScr ipt:GoNav(event, '/path/reporte2','TABLE','FIELD','"@"');\">"@"< /fo nt>";;@
    The second Report has the next filter: FIELD is equal to / is in @{NQ_SESSION.@}
    With this the first and second reports works well, however, when I include the two reports in dashboard, the second report is updated in another window not in the same section.
    How Can I change the second report in the same page or section where this the first report?
    Thanks
    Edwin Guerrero

    I am not sure whether this would work but worth a try. Create a third report which would call the 2nd report using iframe and GO URL. Name the iframe of the narrative view. And use the java script to update the iframe using objWin = window.open(<ur go url>, “biee”,”height=480,width=240,scrollbars=yes,resizeable=yes”);. I had used a similar method to integrate biee with mapviewer. You can check it out here http://oraclebizint.wordpress.com/2007/09/26/oracle-bi-ee-10133-and-mapviewer-step-by-step-integration-phase2-and-phase3/
    Thanks,
    Venkat
    http://oraclebizint.wordpress.com

  • How can I change a company name in my Invoice?

    How can I change a company name in my Invoice?

    Sign in to your Adobe account using the Adobe ID linked to your company account and update the company details there.
    http://helpx.adobe.com/x-productkb/policy-pricing/account-password-sign-faq.html

  • How can I change my JApplet into a JApplication?

    I am working with a JApplet and am finding that some of my code only works in applications.
    So being new to this, I am clueless as to how to change my Applet into an Application. I understand the difference in definition between the two, but when it comes to looking at Applet Code and Application Code, I am not able to see a difference. (Other than an Applet stating "Applet")
    So, that being said how can I change my code so that it runs as an application and not an applet? Here is my current layout code
    import java.applet.Applet;
    import java.awt.*;
    import java.awt.event.ActionEvent;
    import java.awt.event.ActionListener;
    import javax.swing.*;
    import java.text.NumberFormat;
    import java.text.DecimalFormat;
    // Creating the main class
    public class test extends JApplet implements ActionListener
         // Defining of format information
         JLabel heading = new JLabel("McBride Financial Services Mortgage Calculator");
         Font newFontOne = new Font("TimesRoman", Font.BOLD, 20);
         Font newFontTwo = new Font("TimesRoman", Font.ITALIC, 16);
         Font newFontThree = new Font("TimesRoman", Font.BOLD, 16);
         Font newFontFour = new Font("TimesRoman", Font.BOLD, 14);
         JButton calculate = new JButton("Calculate");
         JButton exitButton = new JButton("Quit");
         JButton clearButton = new JButton("Clear");
         JLabel instructions = new JLabel("Please Enter the Principal Amount Below");
         JLabel instructions2 = new JLabel("and Select a Loan Type from the Menu");
         // Declaration of variables
         private double principalAmount;
         private JLabel principalLabel = new JLabel("Principal Amount");
         private NumberFormat principalFormat;
         private JTextField enterPrincipal = new JTextField(10);
         private double finalPayment;
         private JLabel monthlyPaymentLabel = new JLabel("  Monthly Payment    \t         Interest Paid    \t \t            Loan Balance");
         private NumberFormat finalPaymentFormat;
         private JTextField displayMonthlyPayment = new JTextField(10);
         private JTextField displayInterestPaid = new JTextField(10);
         private JTextField displayBalance = new JTextField(10);
         // Creation of the String of arrays for the ComboBox
         String [] list = {"7 Years @ 5.35%", "15 Years @ 5.50%", "30 Years @ 5.75%"};
         JComboBox selections = new JComboBox(list);
         // Creation of the textArea that will display the output
         private TextArea txtArea = new TextArea(5, 10);
         StringBuffer buff = null;
         // Initializing the interface
         public void init()
              // Creation of the panel design and fonts
              JPanel upper = new JPanel(new BorderLayout());
              JPanel middle = new JPanel(new BorderLayout());
              JPanel lower = new JPanel(new BorderLayout());
              JPanel areaOne = new JPanel(new BorderLayout());
              JPanel areaTwo = new JPanel(new BorderLayout());
              JPanel areaThree = new JPanel(new BorderLayout());
              JPanel areaFour = new JPanel(new BorderLayout());
              JPanel areaFive = new JPanel(new BorderLayout());
              JPanel areaSix = new JPanel(new BorderLayout());
              Container con = getContentPane();
              getContentPane().add(upper, BorderLayout.NORTH);
              getContentPane().add(middle, BorderLayout.CENTER);
              getContentPane().add(lower, BorderLayout.SOUTH);
              upper.add(areaOne, BorderLayout.NORTH);
              middle.add(areaTwo, BorderLayout.NORTH);
              middle.add(areaThree, BorderLayout.CENTER);
              middle.add(areaFour, BorderLayout.SOUTH);
              lower.add(areaFive, BorderLayout.NORTH);
              lower.add(areaSix, BorderLayout.SOUTH);
              heading.setFont(newFontOne);
              instructions.setFont(newFontTwo);
              instructions2.setFont(newFontTwo);
              principalLabel.setFont(newFontThree);
              monthlyPaymentLabel.setFont(newFontFour);
              displayInterestPaid.setFont(newFontFour);
              displayBalance.setFont(newFontFour);
              areaOne.add(heading, BorderLayout.NORTH);
              areaOne.add(instructions, BorderLayout.CENTER);
              areaOne.add(instructions2, BorderLayout.SOUTH);
              areaTwo.add(principalLabel, BorderLayout.WEST);
              areaTwo.add(enterPrincipal, BorderLayout.EAST);
              areaThree.add(selections, BorderLayout.NORTH);
              areaFour.add(calculate, BorderLayout.CENTER);
              areaFour.add(exitButton, BorderLayout.EAST);
              areaFour.add(clearButton, BorderLayout.WEST);
              areaFive.add(monthlyPaymentLabel, BorderLayout.CENTER);
              areaSix.add(txtArea, BorderLayout.CENTER);
              // Using the ActionListener to determine when each button is clicked
              calculate.addActionListener(this);
              exitButton.addActionListener(this);
              clearButton.addActionListener(this);
              enterPrincipal.requestFocus();
              selections.addActionListener(this);
         }

    baftos wrote:
    Here is one of the sites that explains the procedure:
    [http://leepoint.net/notes-java/deployment/applications_and_applets/70applets.html].
    But maybe you should try to fix the code that does not work as applet?
    Which one is it?
    >Here is one of the sites that explains the procedure:
    [http://leepoint.net/notes-java/deployment/applications_and_applets/70applets.html].
    But maybe you should try to fix the code that does not work as applet?
    Which one is it?
    The code that doesn't work in my applet is the exit button code
    else if (source == exitButton)
                        System.exit(1);
                   }I also can't get my program to properly validate input. When invalid input is entered and the user presses calculate, an error window should pop up. Unfortunately it isn't. I compile and run my applications/applets through TextPad. So when I try to test the error window by entering in invalid info, the applet itself shows nothing but the command prompt window pops up and lists errors from Java. Anyhow, here is the method I was told to use to fix it.
    private static boolean validate(JTextField in)
              String inText = in.getText();
              char[] charInput = inText.toCharArray();
              for(int i = 0; i < charInput.length; i++)
                   int asciiVal = (int)charInput;
              if((asciiVal >= 48 && asciiVal <= 57) || asciiVal == 46)
              else
                   JOptionPane.showMessageDialog(null, "Invalid Character, Please Use Numeric Values Only");
                   return false;
                   return true;
         }My Instructor told me to try the following, but I still can't get it to work.String content = textField.getText();
    if (content.length() != 0) {       
    try {          Integer.parseInt(content);  
    } catch (NumberFormatException nfe) {}                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Basic http authentication not working when consuming Web Service in BPEL.

    Hi, I am consuming an AXIS Web Service from BPEL 10.1.3. The Web Service uses basic http authentication so we need a way to get username and password into the http header. In the Oracle BPEL Process Manager Administrator's Guide 10g (10.1.3.1.0) sect

  • PR to GR Report

    Hi All, Is there any standard report to see the PR to GR details. its actually to  Calculate the KPI's for our Buyers. report need to show the PR details,final PR release date,Final PO release date,GR date etc.. I tried to search in the system ,but i

  • Error trying to connnect to the itunes store

    in the process of trying to download a song itunes disconnected saying there was an error. i've tried reconnecting and it is saying there is was an error in the itunes store, there is a problem in the itunes store. unknown error msg (-50). does or is

  • Attachments in a news scenario

    I create a standard News scenario. I want to insert an attachments field in the Edit form and i want to display the link in a Show form. How i can do? Thanks, Michela I use EP 6.0

  • APP-FND-01516 error

    hi can anybody help me how to resolve this problem........