× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



This is a multi-part message in MIME format.
--

Hello everybody ,

  We have an application in which all names of programs to be invoked are
stored in a database on the AS400. On selection of an option from the menu
we use the following piece of code to load the corresponding program -

   JInternalFrame pvCmpNewFrame=
(JInternalFrame)pvEdmInvoker.invokeScreen(pvStrClassName);
   pvDtpDesktop.add(pvCmpNewFrame);

 Here : pvEdmInvoker=new Invoker(this);
          class Invoker
                {
                        MyApp pvEdmForUse;
                        ClassLoader pvCldInvoker;
                public Invoker(MyApp pvEdmHandle)
                        {
                        pvEdmForUse=pvEdmHandle;
                        pvCldInvoker=pvEdmForUse.pvCldLoader;
                        }

                public Object invokeScreen(String pvStrClassName)
                        {
                        return getScreen(pvStrClassName);
                        }

                private Object getScreen(String pvStrClassName)
                        {
                        Object pvEdmNewScreen;
                        try
                        {
                        Class
pvClsCurrentScreen=pvCldInvoker.loadClass(pvStrClassName);
                        Constructor[]
pvAryConstructors=pvClsCurrentScreen.getConstructors();
                        Object[] pvAryParameters=new Object[1];
                        pvAryParameters[0]=pvEdmForUse;

pvEdmNewScreen=pvAryConstructors[0].newInstance(pvAryParameters);
                        return pvEdmNewScreen;
                        }
                        catch(Exception e)
                        {

pvEdmForUse.pvEdmGlobal.pvEdmMsgFile.SM_getMessage("EM00022");
                        }

                        pvEdmNewScreen=new Boolean(false);
                        return pvEdmNewScreen; // returns false when class
loading fails.
                        }
                }


For a thick client this works fine. When we create an applet and invoke the
application through it, this does not work. It says ' Cannot find the object
path '. I guess this method looks for the class in the local machine instead
of going to the back end and downloading the same to the client machine.

Is there any way of the getting over this problem ?

Thank You

Cheers
Vijosh


" I always wanted to be someone. I think I should have been more specific...
" - George Bernard Shaw

>From the Desk of :

Vijosh A.
Senior Consultant
Systems & Software
123, SDF 4, SEEPZ
Andheri (E), Mumbai.

Tel : (91-22) 829 0803/0075
Fax : (91-22) 829 2578

--
[ winmail.dat of type application/ms-tnef deleted ]
--

--------------------------------------------------------------
Systems & Software, Mumbai, India
--



As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.