Home » Developer & Programmer » Forms » Form PL/SQL Set values on array of String java (Set values on an Array of String Java from Form PL/SQL to Call a Java class)
Form PL/SQL Set values on array of String java [message #274619] Tue, 16 October 2007 10:53 Go to next message
silva03
Messages: 3
Registered: September 2007
Junior Member
Hi
All

I got a methodo in java that request an array of String, but i don't know
How to set my values on this array on Form :

Here is my array on Form PL/SQL:

v_java_array ORA_JAVA.JARRAY;


I need set the following values

v_java_array := 'Text1';
v_java_array := 'Text2';



How Can i do this?




Here is my Form pl/sql and my java methodo.


=====================FORM PL/SQL=======================

DECLARE
jo ora_java.jobject;
rv ora_java.jobject;
ex ora_java.jobject;
vret varchar2(1000);
v_java_array ORA_JAVA.JARRAY;
BEGIN


//=============i need set values on this variavel ========

ExemploForm.javaform(jo,v_java_array);


EXCEPTION
WHEN ORA_JAVA.JAVA_ERROR then
message('Unable to call out to Java, ' ||ORA_JAVA.LAST_ERROR);
WHEN ORA_JAVA.EXCEPTION_THROWN then
ex := ORA_JAVA.LAST_EXCEPTION;
END;


=========================Java Class=======================

public void javaform(String[] Text_replace_To )
{

String strMyDocumento = "My document";


try {
String strArq = "C:\\temp\\arquivo.txt";
BufferedWriter w = new BufferedWriter(new FileWriter(new File(strArq)));
w.write( strMyDocumento );
w.close();


} catch( Exception e )
{
System.out.println("execption Classe javaform");
}

}



Re: Form PL/SQL Set values on array of String java [message #274969 is a reply to message #274619] Wed, 17 October 2007 23:41 Go to previous message
djmartin
Messages: 10180
Registered: March 2005
Location: Canberra ACT Australia
Senior Member
Account Moderator
Do you HAVE to use Java?

David
Previous Topic: How to install JDBC Driver for Oracle Database
Next Topic: manage a word document with forms 6i
Goto Forum:
  


Current Time: Tue Dec 06 02:22:34 CST 2016

Total time taken to generate the page: 0.08678 seconds