How to: java code

I was going through different documentations for using Java with BI Publisher.
For example:
Example 7-4 Sample Code for Retrieving a List of Field Names
import java.util.Enumeration;
import oracle.xdo.template.FormProcessor;
+.+
+.+
+.+
FormProcessor fProcessor = new FormProcessor();
fProcessor.setTemplate(filePath);        // Input File (PDF) name
Enumeration enum = fProcessor.getFieldNames();
while(enum.hasMoreElements())
Question:
How do I use Java API/Code with Oracle EBS (11.5.10)? I mean, if I write a Java code to do some complex task, how will I reference it in BI Publisher(stand alone)? Is the Java API's useful only for OAF/r12?
Thanks in adavnce.

Java may be easier to get back to source, but in reality, there is no "safe way" to release code, so you should never put anything in it that you don't want viewed. That does not mean that there isn't ways to make it harder to view the code. Obfuscation is one thing that can be done, but you can be guaranteed that anything you do to make the code "unreadable" can be undone. I used to delight in going over code, decompile it, or, at times, just fishing through the machine code bytes to see what was there.
I am one that subscribes to the idea that there is no such thing as security, anyone that really wants to break in or read a product or site is going to do it. It is a game we play as programmers that goes like this: how difficult can I make it so most people leave my site alone or do not steal my code? Once the idea comes out of your head, it's fair game for anyone that really wants to take the time and effort to steal it.
If you do not want people to have your code, do as already suggested: do not release it, make a webservice and have it hoasted on a site. Make multiple tiers of objects with your most sensitive being called with arguments from previous layers to allow them to do their jobs without the end user ever seeing it's there, where it's located, or really what it does--hide it, don't let the user see it.

Similar Messages

  • How to pass the parameter values to the stored procedure from java code?

    I have a stored procedure written in sqlplus as below:
    create procedure spInsertCategory (propertyid number, category varchar2, create_user varchar2, create_date date) AS BEGIN Insert into property (propertyid, category,create_user,create_date) values (propertyid , category, create_user, create_date); END spInsertCategory;
    I am trying to insert a new row into the database using the stored procedure.
    I have called the above procedure in my java code as below:
    CallableStatement sp = null;
    sp = conn.prepareCall("{call spInsertCategory(?, ?, ?, ?)}");
    How should I pass the values [propertyid, category, create_user, create_date) from java to the stored procedure?[i.e., parameters]
    Kindly guide me as I am new to java..

    Java-Queries wrote:
    I have a stored procedure written in sqlplus as below:FYI. sqlplus is a tool from Oracle that provides a user interface to the database. Although it has its own syntax what you posted is actually PL/SQL.

  • How to provide value to a User Defined field thru java code

    I am using OIM 11.1.1.5.
    I have a user defined field called Unique-Customer-Number. This field need to be pre-populated during user creation (using OIM Web UI) and the value comes from a java code.
    Can any of you tell me the high level steps to implement this.
    Thanks!
    Kabi

    Thanks Rajiv,
    I just followed everything on metalink 1262803.1. My console shows the followings during Metadata import.
    weblogicImportMetadata.bat :-
    Starting import metadata script ....
    Please enter your username :weblogic
    Please enter your password :
    Please enter your server URL [t3://localhost:7001] :t3://10.10.99.99:7001
    Connecting to t3://10.10.99.99:7001 with userid weblogic ...
    Successfully connected to Admin Server 'adm_server01' that belongs to domain 'server01'.
    Warning: An insecure protocol was used to connect to the server. To ensure on-the-wire security, the SSL port or Admin port should be used instead.
    Location changed to domainRuntime tree. This is a read-only tree with DomainMBean as the root.For more help, use help(domainRuntime)
    Disconnected from weblogic server: adm_eimsdv1s01
    End of importing metadata script ...
    Exiting WebLogic Scripting Tool.
    How I will I know that my plugin/ event-Handler is registered successfully. Is there any screen where I can see all registered plugins ?

  • How do I get the Parameters of a Stored Procedure from my Java Code?

    I want to get the parameters in my Java code. How do I do this with Jdbc?
    In ADO it was: myCmd.Parameters.Refresh();
    Any idea what it is in Jdbc?

    no, what I want is to know what parameters are required by my stored proc. So basically I tell it, "My Stored Proc is name 'SomeName'. What are the parameters I need to fill for this proc?" Then it puts those in for me, and then I fill the values. That's what Cmd.Parameters.Refresh() does in VB/C++. So if I had a proc name "MyProc" with:
    @Something int,
    @Another varchar(25)
    Then if I did cmd.StoredProc = "MyProc" (and told it where to find the DB), and then did cmd.Parameters.Refresh(), the cmd would then have those parameters with null values, so i could do:
    cmd.Parameters(0) = 5
    cmd.Parameters(1) = "hello"
    Any idea how to do that in Java/Jdbc?

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

  • How to get af:commandbutton id in java code when it is triggered?

    Hi All
    In my application's homepage, I am using 2 af:commandbuttons and each using action attribute to call a method. Both are calling the same method, and based on its id, it should perform different operations. Could anyone please tell me how to get command buttons id in java code, when it is triggered.
    Regards
    Venkat

    Venkat,
    why not call different methods from each button?
    public String actionButton1()
    return doAction("button1");
    public String actionButton2()
    return doAction("button2");
    public String doAction(String aBuuton)
    if ("button1".equalsIgnoreCase(aButton))
    // do work for button 1
    return "abc";
    }else {
    // do work for button 2
    return "abc";
    }Now you user actionbutton1 for the first button and actionButton2 for the second.
    Or you directly implement two different methods in the bean and call each one directly from the button.
    Timo

  • How i can set the selected item of a dropDown component from java code

    Hi
    Thank you for reading my post
    How i can set the slected item of a DropDown component from backing beans java code ?
    it is binded with a database , so one field determine its display and one other field determine its value , I want to set the selected item of this combobox
    In back code i have both value and display values to use them .
    can some one give me some help ?
    Thanks ,

    See code sample 3 at http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    See also, the selection components row in the table under http://developers.sun.com/prodtech/javatools/jscreator/learning/tutorials/2/helloweb.html
    It says
    One way to preselect items is to call setSelectedValue(Object[]) or setSelectedValue(Object) from the prerender() method. You pass in the return values of the items that you want preselected. Be sure to verify that getSelected() returns null before setting the default options, or you will overwrite the user's selections on a post-back.

  • How to use Java code signing certificate in oracle 11i

    Hello,
    I am try to configure java code signing certificate in 11.5.10.2 application. we got java sign certificate from verisgin. SA's imported the certificate and created alias XXX_XXX with password and passphrase.
    I am able to see the my certificate. keytool -list -v -keystore xxx_xxxx.jks -storepass Password.
    how do I use it. I am using Enhance Jar Signing for EBS DOC ID 1591073.1.
    could you please give me some advice on it?
    Thanks
    Prince

    Hussien,
    I find out apps keystore keypassword and storepassword, I imported the java code sign certificate. I generated Jar files through adadmin, but I am getting  warning error
    adogif() unable to generate Jar Filers under JAVA_TOP.
    executing /usr/jdk/jdk1.6.0_45/bin/java sun.security.tools.JarSigner keysotre **** -sigfile CUST Signer /apps/......
    Error JarSigner subcommand Exited With status 1.
    No standard output from jarsigner JarSigner error output: Exception in thread "main" java.lang.NoClassDefFoundError: sun/security/tools/JarSigner Caused by: java.lang.ClassNotFoundException: sun.security.tools.JarSigner         at java.net.URLClassLoader$1.run(URLClassLoader.java:202)         at java.security.AccessController.doPrivileged(Native Method)         at java.net.URLClassLoader.findClass(URLClassLoader.java:190)         at java.lang.ClassLoader.loadClass(ClassLoader.java:306)         at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)         at java.lang.ClassLoader.loadClass(ClassLoader.java:247) Could not find the main class: sun.security.tools.JarSigner.  Program will exit. WARNING: The following path(s), defined in /apps2/property/product/tst/appl/cz/11.5.0/java/make/czjar.dep as elements of the output:   oracle/apps/cz/runtime/tag WARNING: Copying cztag.lst from the old fndlist.jar ...   About to Analyze flmkbn.jar : Fri Nov 22 2013 10:45:51
    Please let me know if you have any idea. Thanks Prince

  • How to delete the BPEL instance in Java code

    Hi all,
    How to delete the BPEL instance which I initiate in Java code?
    Thanks
    Jayson

    Hi,
    take a look here
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28986/toc.htm
    Interface IInstanceHandle
    void      delete()
    Delete the instance from the process domain.

  • How to print/list all the groups/users present in Weblogic using Java code

    Hi,
    Weblogic version : 11.1.1.5
    How to print/list all the groups/users present in Weblogic using Java code
    I want to make a remote connection to Weblogic server and print all the users/groups present in it.
    I have gone through the below mentioned site, but I cannot use the same approach since most of the API' are deprecated for example "weblogic.management.MBeanHome;"
    http://weblogic-wonders.com/weblogic/2010/11/10/list-users-and-groups-in-weblogic-using-jmx/
    Thanks in advance,
    Edited by: 984107 on 05-Feb-2013 05:26
    Edited by: 984107 on 05-Feb-2013 22:59

    see this http://www.techpaste.com/2012/06/managing-user-groups-wlst-scripts-weblogic/
    Hope this helps.

  • How to get the selected node value of a tree which is build on java code

    Hi Experts,
    How can i get the selected node value if I build the tree programatically.
    I am using the following code in selectionListener but it is throwing error.
    RichTreeTable treeTable = (RichTreeTable)getQaReasontreeTable();
    CollectionModel _tableModel =
    (CollectionModel)treeTable.getValue();
    RowKeySet _selectedRowData = treeTable.getSelectedRowKeys();
    Iterator rksIterator = _selectedRowData.iterator();
    String selectedQaCode ="";
    while (rksIterator.hasNext()) {
    List key = (List)rksIterator.next();
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    JUCtrlHierNodeBinding nodeBinding =
    treeTableBinding.findNodeByKeyPath(key);
    String nodeStuctureDefname =
    nodeBinding.getHierTypeBinding().getStructureDefName();
    selectedQaCode = selectedQaCode + nodeBinding.getAttribute(0);
    where I am using following link to create a tree with java code.
    http://one-size-doesnt-fit-all.blogspot.com/2007/05/back-to-programming-programmatic-adf.html
    Please help me in resolving this issue.
    Regards
    Gayaz

    Hi,
    you should also move
    JUCtrlHierBinding treeTableBinding =
    (JUCtrlHierBinding)((CollectionModel)treeTable.getValue()).getWrappedData();
    out of the while loop as this is not necessary to be repeated for each key in the set
    Frank

  • How to call a .bat file from java code?

    How to call a .bat file from java code? and how can i pass parameters to that .bat file?
    Thanks in advance

    thanks for ur reply
    but still i am getting the same error.
    I am trying to run a .bat file of together tool, my code looks like below
    import java.lang.Runtime;
    import java.lang.Process;
    import java.io.File;
    class SysCall{
         public static void main(String args[]){
              String cmd="D://Borland//Together6.2//bin//Together.bat -script:com.togethersoft.modules.qa.QA -metrics out:D://MySamples//Metrics// -fmt:html D://Borland//Together6.2//samples//java//CashSales//CashSales.tpr";
              //String path="D://Borland//Together6.2//bin//Together.bat ";
              Runtime r= Runtime.getRuntime(); //Declare the system call
              try{
                   System.out.println("Before batch is called");
                   Process p=r.exec(cmd);
                   System.out.println(" Exit value =" + p.exitValue());
                   System.out.println("After batch is called");
              /*can produce errors which must be caught*/
              catch(Exception e) {
                   e.printStackTrace();
                   System.out.println (e.toString());
    I am getting the below exception
    Before batch is called
    java.lang.IllegalThreadStateException: process has not exited
    at java.lang.Win32Process.exitValue(Native Method)
    at SysCall.main(SysCall.java:17)
    java.lang.IllegalThreadStateException: process has not exited

  • How to get personnel number of the user in the wd java code in Leave reques

    Hi all,
    we are using the standard Leave Request Applicatin ESS.
    can any one please tell me how to get the personnel number of the user in the WD java code?
    cause i have pass the pernr number to a bapi and get the details.
    please help me its urgent.
    thanks in advance.

    Hi Madhu,
    Create a model for the particular bapi in wd java and acess it in your component. Then pernr parameter will be available in the context and u can pass value for the parameter (pernr) to the model and get the output.
    If you hav any doubt, please let me know.
    Regards,
    Jithin

  • How to find out top 10 records from the R/3 using Java code (WD Program)

    Hi Experts,
    I have used Java Web Dynpro program to fetch records from the backend. Following code helps me and fetches record. As per the customer reqirement, we have to fetch only top 10 records (Actual Cost) from the backend. So I have to modify the Java code. How I can do so? Please help.
              wdContext.nodeGraphData().invalidate();
              IPublicCostcnt.IGraphDataElement categoryElement;
                   for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
                   categoryElement = wdContext.createGraphDataElement();
                   categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
                   categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
                   categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
                   wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

    Dear SDN Users,
    This is how I resolved the issue.
    1) Requested ABAPer to provide me sorted data. The data has been sorted in descending order of actual_cost.
    2) After that I used following code. This resolved the issue.
         if (wdContext.nodeItab_Final1().size()>10){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < 10; i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
         if (wdContext.nodeItab_Final1().size()<=10){
         if (wdContext.nodeItab_Final1().size()>0){
         IPublicCostcnt.IGraphDataElement categoryElement;
              for (int i = 0; i < wdContext.nodeItab_Final1().size(); i++) {
              categoryElement = wdContext.createGraphDataElement();
              categoryElement.setCostElement(""+ wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getDescription());
              categoryElement.setActualCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getActual_Cost().toString());
              categoryElement.setPlannedCost(wdContext.nodeItab_Final1().getItab_Final1ElementAt(i).getPlan_Cost().toString());
              wdContext.nodeGraphData().addElement(categoryElement);
    Regards,
    Gary

  • How to pass arguments to a batch file from java code

    Hi
    I have a batch file (marcxml.bat) which has the following excerpt :
    @echo off
    if x==%1x goto howto
    java -cp C:\Downloads\Marcxml\marc4j.jar; C:\Downloads\Marcxml\marcxml.jar; %1 %2 %3
    goto end
    I'm calling this batch file from a java code with the following line of code:
    Process p = Runtime.getRuntime().exec("cmd /c start C:/Downloads/Marcxml/marcxml.bat");
    so ,that invokes the batch file.Till that point its ok.
    since the batch file accpets arguments(%1 %2 %3) how do i pass those arguments to the batch file from my code ...???
    %1 is a classname : for ex: gov.loc.marcxml.MARC21slim2MARC
    %2 is the name of the input file for ex : C:/Downloads/Marcxml/source.xml
    %3 is the name of the output file for ex: C:/Downloads/Marcxml/target.mrc
    could someone help me...
    if i include these parameters too along with the above line of code i.e
    Process p = Runtime.getRuntime().exec("cmd /c start C:/Downloads/Marcxml/marcxml.bat gov.loc.marcxml.MARC21slim2MARC C:\\Downloads\\Marcxml\\source.xml C:\\Downloads\\Marcxml\\target.mrc") ;
    I get the following error :
    Exception in thread main java.lang.Noclassdef foundError: c:Downloads\marcxml\source/xml
    could some one tell me if i'm doing the right way in passing the arguments to the batch file if not what is the right way??
    Message was edited by:
    justunme1

    1 - create a java class (Executer.java) for example:
    import java.lang.reflect.InvocationTargetException;
    import java.lang.reflect.Method;
    public class Executer {
         public static void main(String[] args) {
              try {
                   for (int i = 0; i < args.length; i++) {
                        System.out.println(args);
                   Class<?> c = Class.forName(args[0]);
                   Class[] argTypes = new Class[] { String[].class };
                   Method main = c.getDeclaredMethod("main", argTypes);
                   // String[] mainArgs = Arrays.copyOfRange(args, 1, args.length); //JDK 6
                   //jdk <6
                   String[] mainArgs = new String[args.length - 1];
                   for (int i = 0; i < mainArgs.length; i++) {
                        mainArgs[i] = args[i + 1];
                   main.invoke(null, (Object) mainArgs);
                   // production code should handle these exceptions more gracefully
              } catch (ClassNotFoundException x) {
                   x.printStackTrace();
              } catch (NoSuchMethodException x) {
                   x.printStackTrace();
              } catch (IllegalAccessException x) {
                   x.printStackTrace();
              } catch (InvocationTargetException x) {
                   x.printStackTrace();
              } catch (Exception e) {
                   e.printStackTrace();
    2 - create a .bat file:
    @echo off
    java -cp C:\Downloads\Marcxml\marc4j.jar; C:\Downloads\Marcxml\marcxml.jar; Executer %TARGET_CLASS% %IN_FILE% %OUT_FILE%3 - use set command to pass variable:
    Open MS-DOS, and type the following:
    set TARGET_CLASS=MyTargetClass
    set IN_FILE=in.txt
    set OUT_FILE=out.txt
    Then run your .bat file (in the same ms dos window)
    Hope that Helps

Maybe you are looking for