This content has been marked as final. Show 6 replies
I'm not 100% sure but try to remove following code:
you should use DELETE_GLOBAL_REF only for global objects created by ORA_JAVA.NEW_GLOBAL_REF
Thank you for your reply.
In fact firstly the application is just a normal application with a void main method. So I call it in the form by using
the error occured.
then I replace the main method with a constructor method, that's why I can use new() method to call it. Well, the problem is still there.
just a moment ago I tried the method you advised but the error still occurred.
And I just find that if I click the trigger button a few times without closing any one of the windows, then if I close one of them, all the others exit, too.
There must be something to do with this, while I don't know what it is.
It's strange behavior :( Are you able to run your application outside forms (as standalone Java application)? Is it working fine? I use Java forms as a beans, never as standalone application, but there wasn't any problems when closing window. Maybe you should convert your application to bean?
Thanks again for your reply.
Firstly the application is just a very simple one, when you click a button, the panel background will switch its color, and it works very well using java command in command line mode.
Just as what you advised I am studying how to use beans in oracle forms.Now I have known that how to use java beans in a java application. But before that, I found that somebody said Java application can be imported into forms.Though what he said is not an application, that is ,no popup panel, just one class which can calculate numbers or show some messages. I think there is no reason why an application can't work.
Edited by: untied-boat on 2013-2-25 下午11:50
Hi,1 person found this helpful
I never try embedded java application into forms, but use Java beans very often. This beans can look like a standalone application (with own window manager etc.) It's rather simply (I can describe you step-by-step procedure how to run it within forms). All beans implements a interface named IHandler. This interface is responsible for communication between forms engine and your beans (e.g. checks if bean is still alive, send message to forms about finishing work etc.). Maybe this is missing when you run your applicaiton: forms engine doesn't know when the control should back to forms? I don't know.
There is also possibility that your code is OK, but OAS is unable to see your classes (probably you get FRM-93652 error not ORA-93652) or OAS sees old version of class. As far I know there are 2 settings responsible for that:
- CLASSPATH variable within your env file (e.g. default.env) - should include full path including file name
- formsweb.cfg file: archive section which is responsible for initial loading libraries (normally there is only frmall.jar) - maybe this is missing in your case
Thank you for your reply.
I can get a lot of useful information from your reply.I am reading a book about java, in fact, a classical one, by Horstmann, and I think you must know him.
Now I am studying the part of java security.
I will try the beans in form, but may be some other days in the future.Thank you.