Call Java class of Forms.

Dicas do Oracle Forms Builder - Blocos, Itens, LOV, Canvas, Triggers, comandos, PLL, d2kwutil, FMB, Alert, menus, etc
  

Poston Mon, 21 Jul 2008 9:57 am

Facebook friends, blame me, beleza?

Ran some tests here, playing a java code (a class) in the Bank and, realizing the call of the class via procedure and function.
Until there all right, worked normally, since I don't use java graphics capabilities, such as Swing.

Important note: Manjo no JAVA!

But, I have a question: has, via FORMS (6i-Version 6.0.8.27.0), I call a java class that is on my operating system, and not in the Bank?

If so, if you have any example or link indication, so thank you.

Thank you very much.
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Poston Thu, 24 Jul 2008 5:34 pm

Man I develop in Java and I have the same problem as yours.

In my case I don't even need that Java be incorporated into Forms or to Report, he needs just call my Java app passing parameters.

But I couldn't find anything that worked.
pyro
Location: Barala - TT

Poston Wed, 06 Aug 2008 4:05 pm

Hello guys, I don't know if that's what the cheezburger network you're talking about, but there is a host command in the FORMS that you can run any Windows command line and as a java file is executed via the command line I think can be solved like this.

HOST (' windows command ') Example:
Code: Select all
HOST('java c:projetosclasse1.class')
just do not know if the command to call the java file is correct.

I hope to have helped.

Hugs.
rafaellomba
Location: Rio de Janeiro - RJ

Rafael Lomba

Poston Thu, 07 Aug 2008 2:36 pm

Dude, I'm also in need of this feature, I had been thinking about something like a build-in, but this command I will help a bit.
Just one question: this command also works in the reports? Since I have a report that need drawing a chart from it.

Another thing, to invoke a Java app correctly ideally, this app is with build in .jar format and calls it does this:
Code: Select all
java -jar meuAppJava.jar
If anyone needs more help in Java is just looking for me.

vlw.
pyro
Location: Barala - TT

Poston Thu, 07 Aug 2008 3:03 pm

Is Pyro, beleza brother?

So, pro Forms, I don't know if you'vê heard ...
I'vê heard, but not used, an item type \"BEAN AREA\".

I believe that is for working with Java class in Forms.

If someone has already used this way and can guide us.
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Poston Thu, 07 Aug 2008 3:11 pm

I tried to use it, but it didn't work at all. :-o
pyro
Location: Barala - TT

Poston Fri, 08 Aug 2008 2:45 pm

Tested the remote host () here but only flashes a screen and does not call my application.
Does anyone have any tips?
pyro
Location: Barala - TT

Poston Fri, 08 Aug 2008 2:51 pm

Completing the previous post, the flashing on the screen appears written
Code: Select all
unable to java archive
Tested and both paths as the JVM are correct on the machine, does anyone know if the host () are there any caveats?
pyro
Location: Barala - TT

Poston Fri, 08 Aug 2008 3:22 pm

Brother, a tip would be to use in this example the own Forms (Help him) the FORM_SUCESS.

See the return of the error appears if is the same informed previously:
Code: Select all

** built-in:  HOST
** Example:   Execute an operating system command in a
**            subprocess or subshell. Uses the
**            'Get_Connect_Info' procedure from the
**            GET_APPLICATION_PROPERTY example.
*/
PROCEDURE Mail_Warning( send_to VARCHAR2) IS
  the_username VARCHAR2(40);
  the_password VARCHAR2(40);
  the_connect  VARCHAR2(40);
  the_command  VARCHAR2(2000);
BEGIN
  /*
  ** Get Username, Password, Connect information
  */
  Get_Connect_Info(the_username,the_password,the_connect);
  /*
  ** Concatenate together the static text and values of
  ** local variables to prepare the operating system command
  ** string.
  */
  the_command := 'orasend '||
      ' to='||send_to||
      ' std_warn.txt '||
      ' subject="## LATE PAYMENT ##"'||
      ' user='||the_username||
      ' password='||the_password||
      ' connect='||the_connect;

  Message('Sending Message...', NO_ACKNOWLEDGE);
  Synchronize;
  /*
  ** Execute the command string as an O/S command The
  ** NO_SCREEN option tells forms not to clear the screen
  ** while we do our work at the O/S level "silently".
  */
  Host( the_command, NO_SCREEN );
  /*
  ** Check whether the command succeeded or not
  */
  IF NOT Form_Success THEN
    Message('Error -- Message not sent.');
  ELSE
    Message('Message Sent.');
  END IF;
END;
makes some adjustments there, qualquer thing sends to us.
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Poston Fri, 08 Aug 2008 3:40 pm

man, how I'm using Windows Vista here Forms Builder is very unstable.
Just restart the PC it worked.

Vlw.
pyro
Location: Barala - TT

Poston Fri, 08 Aug 2008 4:01 pm

beleza brother.

Just to be here so that others also know, if need:-You made the call with HOST ?

Thanks a lot.
Trevisolli
Location: Araraquara - SP

Abraço,

Trevisolli
OCA Oracle PL/SQL Developer Certified Associate
OCP Oracle Forms Developer Certified Professional
Araraquara-SP

Poston Fri, 08 Aug 2008 4:18 pm

Yes, it was only using host and was as follows:
Code: Select all
host('java -jar \meu_caminhomeu_app.jar')
Was only that.

No build-in as I wanted but it's running, it's better than nothing.
pyro
Location: Barala - TT

Poston Mon, 01 Sep 2008 2:37 pm

Use the Java Bean Area..

Search for more on the web about it
alfredofonseca
Location: Goiânia

NM Alfredo Fonseca
Analista de sistemas
62 84740311

Poston Thu, 04 Sep 2008 12:35 pm

Already researched and tested but did not work well, so I adopted another solution.
pyro
Location: Barala - TT


  • See also
    Replies
    Views
    Last Post


Return to Forms

Who is online

Users browsing this forum: No registered users and 10 guests