I imported a java application which switches background color when corresponding botton is clicked into a simple test form.I added the class path to the CLASSPATH environment variable and the default.env file.
After I compiled the form and run it, when I clicked the button which would trigger the application, the application run well;
but when i close the application window manually(by clicking the top-right close button) and then click the trigger button, the error ORA-93652 came out.
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.
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.