Home » SQL & PL/SQL » SQL & PL/SQL » Populate List from Java (Oracle 10g)
Populate List from Java [message #631955] Thu, 22 January 2015 04:40 Go to next message
Xandot
Messages: 235
Registered: January 2014
Location: India
Senior Member
Hello all,

I have java code like :-

package com.demo.test;

import java.util.ArrayList;
import java.util.List;

public class ListTest {

    public static List<String> getList() {
        List listA = new ArrayList();

        listA.add("element 1");
        listA.add("element 2");
        listA.add("element 3");
        listA.add("element 4");
        listA.add("element 5");
        listA.add("element 6");
        listA.add("element 7");
        return listA;
    }
} 


I have create function for calling java :-
create or replace FUNCTION get_list return varchar2 as
language java name 'com.demo.test.ListTest.getList() return java.lang.String[]';


I want to call above function in plsql and I output like :-

element 1
element 2
element 3
element 4
element 5
element 6
element 7


Please help me out.

Thanks ,
Xandot
Re: Populate List from Java [message #631967 is a reply to message #631955] Thu, 22 January 2015 07:48 Go to previous message
Michel Cadot
Messages: 68777
Registered: March 2007
Location: Saint-Maur, France, https...
Senior Member
Account Moderator

And what is the problem?
What did you try?
Post what you EXACTLY do.
Copy and paste your SQL*Plus session.


Previous Topic: status based use of SUM function
Next Topic: How to trim the last matching string using regexp_substr
Goto Forum:
  


Current Time: Thu Sep 03 17:09:37 CDT 2026