Customize MWA and WMA standard Java Classes

Hi,
Are there any guidelines/white papers, if you want to add customizations in Java to eBS modules? In our project, customizations are needed for the eBS WMA (Warehouse Management) and MWA (Mobile Supply Chain Applications) modules.
Best regards,
Antonio San Miguel

Oracle have certainly not made it easy to customise MWA pages. However it can be done with a little understanding of the architecture. Sadly I've not found any documentation, but I've decompiled most of it and gone through it all manually.
The biggest issue is that all the pages have hard coded paths. So for an LOV, it will refer to oracle.apps.wms.td.server.PickLoadPage.INV.ITEM. So if you extend this class (eg: xxx.oracle.apps.wms.td.server.PickLoadPage) then the LOV won't work. So you need to change the LOV field beans to point to the custom class. Also buttons have these, when linking to other pages, etc.. Also the field listener (FListener) class will sometimes set the path, so your changes will be overwritten. In these cases you need to add your own FListener to the standard fields and change them back. Crazy I know!
Basically if you want to customise the pages mentioned, you need to:
- First trace the class back to the Function that calls it. This will point to a Function class.
- Create your own Function class that points to your own Page class.
- Create your own Page class that extends the standard Page class.
- In your custom Page class, init the super class then go through all the field beans and ensure their LOV parameters point to your custom page class. Same for buttons
- Create an FListener class and add it to all the fields/buttons on the standard (and custom) page. This will allow you to change things on field entry/exit as needed.
I think in your case, the PickLoadPage is called from another page class, so you'll need to customise that one as well in order for it to link to you custom one.
Good luck!

Similar Messages

  • Customize Standard Java Class

    Hi,
    I need to customize a standard java class. I decomplied the source code of the class file, make the changes as required, and then compile it and upload it to the original path.
    The problem is that I am receiving java exception NoSuchMethod error after customizing. Even though I revert it to the original one, I am receiving the same error. I did re-bounce the HTTP server.
    The class is $JAVA_TOP/oracle/apps/po/communicate/POGenerateDocument.class
    Am I missed any important steps?
    Thanks in advance!

    Hi,
    I need to customize a standard java class. I decomplied the source code of the class file, make the changes as required, and then compile it and upload it to the original path.
    The problem is that I am receiving java exception NoSuchMethod error after customizing. Even though I revert it to the original one, I am receiving the same error. I did re-bounce the HTTP server.
    The class is $JAVA_TOP/oracle/apps/po/communicate/POGenerateDocument.class
    Am I missed any important steps?
    Thanks in advance!

  • Standard Java class communicating with a servlet

    Hey,
    I am trying to access a standard java classes member via a servlet class however the data is never received even though the member is visible on compilation. is there something Im doing wrong ?
    public class Start {
    //lots of stuff
         static List<Plug> plugList = Collections.synchronizedList(new LinkedList<Plug>());
    //lots more stuff
    public class wah extends HttpServlet{
            public void doGet( HttpServletRequest request, HttpServletResponse response)throws ServletException, IOException{
                    doPost(request, response);
        public void doPost(HttpServletRequest request,
                                    HttpServletResponse res)throws ServletException, IOException{
                    res.setContentType("text/html");
                    PrintWriter out = res.getWriter();
                    out.println("wahwahwah");
                    synchronized(Start.plugList){
                            out.println("pluglist");
                            Iterator i1 = Start.plugList.iterator();
                            while (i1.hasNext()) {
                                    Plug oldPlug = (Plug)i1.next();
                                    out.println("PLug : " + oldPlug.getaddress64());
            }//doPost
    }

    Don't post all your code. Instead, make a simplified version of the code that demonstrates what your problem is and that we could compile and see what is going on. Make it as simple as possible but still demonstrating the problem.
    Who knows, when you make the SSCCP (small, self contained, compileable program) you will find your mistake as well.
    But without seeing any code all I can say is that the date you are accessing in the list has not been made available when you try to get it from the servlet. Perhaps the servlet call is blocking the other threads from accessing the list to put data into it, perhaps the other threads haven't begun working yet, perhaps the list you give to the servlet isn't the same list (but instead a copy of the list) that the data is being entered into, or many other reasons.
    One thing I would assume you need to do, since the Servlet is the data consumer, you need to make sure the data has been entered before the servlet tries to read it. The best way to do that is to put a wait() in the servlet code so that it knows it can't do anything until the producers are finished. Then the producers would add a notify() to tell the servlet to go ahead and display the data.
    So some modification might be:
    public class Start {
    //lots of stuff
         static List<Plug> plugList = Collections.synchronizedList(new LinkedList<Plug>());
            //marker to let servlet know that it can consume data
            private static boolean done = false;
            //producers call this method when list is ready for use
            static void setReadyToConsume() { done = true; }
            //servlet calls this to check if the list is ready
            public static boolean isReadyToConsume() { return done; }
    //lots more stuff
        public void doPost(HttpServletRequest request,
                                    HttpServletResponse res)throws ServletException, IOException{
                    res.setContentType("text/html");
                    PrintWriter out = res.getWriter();
                    out.println("wahwahwah");
                    synchronized(Start.plugList){
                           //Hold off trying to use list until list is ready
                            while (!Start.isReadyToConsume()) {
                                  try {
                                          Start.plugList.wait();
                                  } catch (InterruptedException ie) {
                                          log("Waiting for Plugs to be ready interrupted.  Continuing to wait.");
                                          log(ie.getMessage(), ie);
                            out.println("pluglist");
                            Iterator i1 = Start.plugList.iterator();
                            while (i1.hasNext()) {
                                    Plug oldPlug = (Plug)i1.next();
                                    out.println("PLug : " + oldPlug.getaddress64());
            }//doPostAnd don't forget to add a Start.plugList.notify() or Start.plugList().notifyAll() in the producer code after it calls the setReadyToConsume() method.

  • How can I compile and run other java classes from within an application?

    Hello there everyone! I really hope that someone can help me. I am writing a program that must be able to compile and run other java classes that are in different files, much like development environments like Kawa or Forte allow you to do.
    There has to be a way of doing this ( I hope!! ), but i can't seem to find it!!
    I have tried using this command to compile:
    Runtime.getRuntime().exec ("c:\\programs\\javac className.java");
    ...and this one to run:
    Runtime.getRuntime().exec ("c:\\programs\\java className");
    ...but neither works!!! I can compile and run classes that are in the same file as my application, but I can't get it to work at all for files in different directories or files.
    PLEASE, PLEASE, PLEASE help me - i've run out of ideas, and i need this to be working in 3 days!!!
    Thank you very much for any help anyone can give me, I really appreciate it!! Thanks again!!
    Adrian ( ...in distress!! )

    public class JavaCompiler{
       public static void main(String[] args)throws Exception{ //sorry bout the laziness
          if(args == null || args.length != 1){
             System.out.println("Usage: java JavaCompiler MyClass.java");
             System.exit(0);
          String className = args[0];
          Runtime rt = Runtime.getRuntime();
          Process p = rt.exec("javac " + className); //consider setting cpath for this
          p.waitFor();
          //now try to run after it is done.
          p = rt.exec("java " + className.substring(0, (className.length() - ".java".length()));
          p.waitFor();
          //do some other stuff
    }This should get you going. You may consider looking into the System.getProperty() method in order to determine the type of OS it is running on in order to findo out what command to run. I know that the sun tool listed above is nice, but by my understanding the sun tools provided are not guaranteed to stay the same. I'm no expert on this matter, but that is one of the reasons there is no API documentation for those tools. Also, I don't believe those tools come packaged with the JRE. (Of course if you are making an IDE it will be expected that the user has an sdk installed. Good luck with figuring this thing out.

  • Java Program in MDM to call a standard java class

    Hi All,
    In MDM- GDS, (Global Data Synchronization), we have a scenario where, once we register the Items , it will be transported to a Data Pool called 1SYNC through SAP PI.
    There is a standard Java PRoxy(Kind of java Class) in MDM, which will be triggered once we register the Item in MDM-GDS.
    That Java Proxy will send the Item INfo as a XML message to PI.
    So we would like to know whether its possible to automate this process.
    Like,Writing a new Java Program which will check all the new items and trigger the Java Proxy and send these items as XML Messages to PI.
    I m new to MDM. So it would be really helpful, If i could get some inputs on this. Like, is it possible in MDM. If so, how?

    Aarthi,
    you can acheive this from MDM itself, and need not to write any Java proxy.
    you may consider following logic.
    Create a field with the Name Status and Initilize it with Value "new". Now define syndicaiton Map to syndicate records which holds value "new" in the status field.  define a workflow with syndication step, using maps defined earlier. After syndication step, execute an assignment to change Status field value from "New" to "Syndicated".
    Revert back if any question.
    ~ Shiv

  • Passing numerical variables to and from a Java class

    I'm trying to do something that seems like it should be fairly simple, but apparently it isn't. I'm new to Java and JDBC, so I'm hoping that I'm missing something fundamental and fairly basic.
    Basically, I want to pass a set of (number) variables to a Java class from a PL/SQL Procedure, and get back a series of numbers based on calculations to the first set of numbers. (In my real world project, I have to perform a series of matrix calculations to determine regression parameters for two sets of data, but we'll keep this simple.) However, I can find nothing that tells me how to do this, and I'm receiving a series of errors when I attempt it.
    For example, let's say I want to send in two decimal numbers, a and b, and receive back the sum s, the difference d, the product p and the quotient q. So, the java class would be:
    * MathEx.java
    class MathEx {
    public static void main(double a, double b, double sum, double diff, double prod, double quo) {
    sum = a + b;
    diff = a - b;
    prod = a * b;
    quo = a / b;
    Fairly simple, right? It compiles fine using "javac MathEx.java", and then I load the class into the database:
    loadjava -u steve/steve MathEx.class
    Everything works great. Now, I create a wrapper Procedure. This is where the problem comes in. How do I declare the incoming and outgoing parameters in the Procedure? No matter what I try, I get " the declaration of "MathEx.main([whatever])" is incomplete or malformed"
    The procedure I'm trying is:
    create or replace procedure Call_MathEx
    a NUMBER,
    b NUMBER,
    s NUMBER,
    d NUMBER,
    p NUMBER,
    q NUMBER
    AS
    language JAVA
    name 'MathEx.main(oracle.sql.NUMBER,oracle.sql.NUMBER,
    oracle.sql.NUMBER,oracle.sql.NUMBER,oracle.sql.NUMBER,oracle.sql.NUMBER,)';
    I've tried the following values for possible variable types in the "name 'MathEx.main(" statement:
    oracle.sql.NUMBER
    java.lang.Number
    java.lang.Double
    java.Math.BigDecimal
    The only thing I can get to work is if I just use "java.lang.string[]" and send everything at once, then use parseDouble() to read the parameters inside the Java class. However, that makes it impossible to then read the new values of the sum, difference, product and quotient in the calling procedure, since the variable retain the same value as before the call to the Java class.
    Any help is greatly appreciated.

    Java Stored Procedures Developers Guide (part of the docs and here on OTN) would probably help.
    I suspect you need:
    create or replace procedure Call_MathEx
    a IN NUMBER,
    b IN NUMBER,
    s OUT NUMBER,
    d OUT NUMBER,
    p OUT NUMBER,
    q OUT NUMBER
    AS
    language JAVA
    name 'MathEx.main(oracle.sql.NUMBER,oracle.sql.NUMBER,
    oracle.sql.NUMBER,oracle.sql.NUMBER,oracle.sql.NUMBER,oracle.sql.NUMBER,)';
    Not sure, I always let JDeveloper handle it for me :)

  • After upgrade to JHS Production: cannot find two standard java Classes

    Hi, First: congratulations on the Production release. Great that it is there.
    After making several backups, I have upgraded to JHS build 91 Production release (I came from JHS build 78).
    1. after upgrade to JHS Production, I tested my application first (so before re-enabling Jheadstart on the ViewController and regenerating pages). The application still worked fine
    2. I re-enabled JHeadstart on the VC project
    3. I opened my Applictation Definition Files and saved them (I noticed a deprecated property OverwriteUiModel that disappeared after saving)
    4. I ran the generator on my three App. Def. Files.
    5. I rebuild the whole application
    6. I ran the application, the first (Table-style) page comes up fine
    7. But when clicking on one of the records in the Table to navigate to the Form page...the Embedded OC4J exits with a fatal error:
    Fatal error: Cannot find class java/lang/StackOverflowError
    Fatal error: Cannot find class java/lang/NullPointerException
    The last part of the log before these fatal errors is as follows:
    06/08/11 10:12:47 [1171] Binding param "Bind_IdPerson": 210002
    06/08/11 10:12:47 [1172] **** refreshControl() for BindingContainer :PersonsPageDef
    06/08/11 10:12:47 [1173] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    06/08/11 10:12:47 [1174] **** refreshControl() for BindingContainer :PersonsPageDef
    06/08/11 10:12:47 [1175] Invoke method Action:999
    06/08/11 10:12:47 [1176] DCInvokeMethod:Invoking PersonServiceDataControl.dataProvider.applyBindParams()
    10:12:47 DEBUG (JhsApplicationModuleImpl) -Executing applyBindParams for CodeAddrLinkTypes
    10:12:47 DEBUG (JhsApplicationModuleImpl) -ViewObject CodeAddrLinkTypes: bind parameter values have not changed, NO Requery performed
    06/08/11 10:12:47 [1177] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1178] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result = null
    06/08/11 10:12:47 [1179] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1180] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result~cp = [Ljava.lang.Object;@c60
    06/08/11 10:12:47 [1181] Invoke method Action:999
    06/08/11 10:12:47 [1182] DCInvokeMethod:Invoking PersonServiceDataControl.dataProvider.applyBindParams()
    10:12:47 DEBUG (JhsApplicationModuleImpl) -Executing applyBindParams for CodeAddrLinkStatuses
    10:12:47 DEBUG (JhsApplicationModuleImpl) -ViewObject CodeAddrLinkStatuses: bind parameter values have not changed, NO Requery performed
    06/08/11 10:12:47 [1183] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1184] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result = null
    06/08/11 10:12:47 [1185] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1186] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result~cp = [Ljava.lang.Object;@c61
    06/08/11 10:12:47 [1187] Invoke method Action:999
    06/08/11 10:12:47 [1188] DCInvokeMethod:Invoking PersonServiceDataControl.dataProvider.applyBindParams()
    10:12:47 DEBUG (JhsApplicationModuleImpl) -Executing applyBindParams for CodeOrgPersonTypes
    10:12:47 DEBUG (JhsApplicationModuleImpl) -ViewObject CodeOrgPersonTypes: bind parameter values have not changed, NO Requery performed
    06/08/11 10:12:47 [1189] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1190] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result = null
    06/08/11 10:12:47 [1191] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1192] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result~cp = [Ljava.lang.Object;@c62
    06/08/11 10:12:47 [1193] Invoke method Action:999
    06/08/11 10:12:47 [1194] DCInvokeMethod:Invoking PersonServiceDataControl.dataProvider.applyBindParams()
    10:12:47 DEBUG (JhsApplicationModuleImpl) -Executing applyBindParams for CodeDivDataValidationStatuses
    10:12:47 DEBUG (JhsApplicationModuleImpl) -ViewObject CodeDivDataValidationStatuses: bind parameter values have not changed, NO Requery performed
    06/08/11 10:12:47 [1195] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1196] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result = null
    06/08/11 10:12:47 [1197] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1198] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result~cp = [Ljava.lang.Object;@c63
    06/08/11 10:12:47 [1199] Invoke method Action:999
    06/08/11 10:12:47 [1200] DCInvokeMethod:Invoking PersonServiceDataControl.dataProvider.applyBindParams()
    10:12:47 DEBUG (JhsApplicationModuleImpl) -Executing applyBindParams for CodeDivDataDivisionStatuses
    10:12:47 DEBUG (JhsApplicationModuleImpl) -ViewObject CodeDivDataDivisionStatuses: bind parameter values have not changed, NO Requery performed
    06/08/11 10:12:47 [1201] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:47 [1202] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result = null
    06/08/11 10:12:47 [1203] DCUtil, returning:oracle.adf.model.binding.DCDataControl$MethodResultsMap, for methodResults
    06/08/11 10:12:48 [1204] putValueInPath :PersonServiceDataControl.methodResults.PersonServiceDataControl_dataProvider_applyBindParams_result~cp = [Ljava.lang.Object;@c64
    06/08/11 10:12:48 [1205] *** DCDataControl.sync() called from :DCBindingContainer.refresh
    06/08/11 10:12:48 [1206] ##### QueryCollection.finl no RowFilter
    06/08/11 10:12:48 [1207] ##### QueryCollection.finl no RowFilter
    06/08/11 10:12:48 [1208] ##### QueryCollection.finl no RowFilter
    06/08/11 10:12:48 [1209] ##### QueryCollection.finl no RowFilter
    06/08/11 10:12:48 [1210] ##### QueryCollection.finl no RowFilter
    06/08/11 10:12:48 [1211] ##### QueryCollection.finl no RowFilter
    06/08/11 10:12:48 [1212] No XML file /com/jnj/jacnl/cab/view/pagedefs/person/person.xml for metaobject com.jnj.jacnl.cab.view.pagedefs.person.person
    06/08/11 10:12:48 [1213] Cannot Load parent Package : com.jnj.jacnl.cab.view.pagedefs.person.person
    06/08/11 10:12:48 [1214] Business Object Browsing may be unavailable
    06/08/11 10:12:48 [1215] Loading from XML file /com/jnj/jacnl/cab/view/pagedefs/person/PersonLovAddressesPageDef.xml
    06/08/11 10:12:48 [1216] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:48 [1217] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:48 [1218] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:48 [1219] Executing and syncing on IteratorBinding.refresh from :AddrLinkTypeIterator
    06/08/11 10:12:48 [1220] Resolving VO:CodeAddrLinkTypes for iterator binding:AddrLinkTypeIterator
    06/08/11 10:12:48 [1221] No XML file /com/jnj/jacnl/cab/view/pagedefs/person/person.xml for metaobject com.jnj.jacnl.cab.view.pagedefs.person.person
    06/08/11 10:12:48 [1222] Cannot Load parent Package : com.jnj.jacnl.cab.view.pagedefs.person.person
    06/08/11 10:12:48 [1223] Business Object Browsing may be unavailable
    06/08/11 10:12:48 [1224] Loading from XML file /com/jnj/jacnl/cab/view/pagedefs/person/PersonLovPersonAddrOrganizationsPageDef.xml
    06/08/11 10:12:48 [1225] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:48 [1226] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:48 [1227] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:48 [1228] Executing and syncing on IteratorBinding.refresh from :AddrLinkStatusIterator
    06/08/11 10:12:48 [1229] Resolving VO:CodeAddrLinkStatuses for iterator binding:AddrLinkStatusIterator
    06/08/11 10:12:48 [1230] No XML file /com/jnj/jacnl/cab/view/pagedefs/person/person.xml for metaobject com.jnj.jacnl.cab.view.pagedefs.person.person
    06/08/11 10:12:48 [1231] Cannot Load parent Package : com.jnj.jacnl.cab.view.pagedefs.person.person
    06/08/11 10:12:48 [1232] Business Object Browsing may be unavailable
    06/08/11 10:12:48 [1233] Loading from XML file /com/jnj/jacnl/cab/view/pagedefs/person/PersonLovOrganizationsPageDef.xml
    06/08/11 10:12:48 [1234] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:48 [1235] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:48 [1236] DCUtil, returning:oracle.jbo.uicli.binding.JUApplication, for PersonServiceDataControl
    06/08/11 10:12:49 [1237] Executing and syncing on IteratorBinding.refresh from :OrgPersonTypeIterator
    06/08/11 10:12:49 [1238] Resolving VO:CodeOrgPersonTypes for iterator binding:OrgPersonTypeIterator
    Fatal error: Cannot find class java/lang/StackOverflowError
    Fatal error: Cannot find class java/lang/NullPointerException
    Process exited with exit code -1.
    Any idea why this might have happened, just because I upgrade to JHS production release?
    I am reverting to build 78 again to continue developing, but hope to be able to get working with the prod release soon, but I lack knowledge to determine where the error occurs...
    Toine

    Sandra,
    I have the (ugly) feeling that I am facing the problem mentioned in http://forums.oracle.com/forums/thread.jspa?messageID=1211326? : it looks like when a JSPX page gets too complex, the Embedded OC4J raises this StackOverFlow class notfound error :-(. Probably the (it only hits me when navigating to the most complex page) generated page generated with build 78 was fine, but the generated page after build 91 has become too complex, allthough nothing changed in between. What I can see from the difference between the before and after build 91 situation for all pages, is that you have added the <id=...> arguments to all ADF elements, like [id="PersonsSaveButton"] in:
    <af:commandButton actionListener="#{bindings.Commit.execute}"
                      action="Commit"
                      textAndAccessKey="#{nls['SAVE_BUTTON_LABEL_PERSONS']}"
                      id="PersonsSaveButton">
                   <af:resetActionListener/>
      </af:commandButton>In build78 these were not there. As far as I can see another difference after generating with build 91 is a new element in the page:
    <af:panelGroup rendered="#{(bindings.PersonsIterator.currentRowIndexInRange!=-1 and bindings.PersonsIterator.findMode!='true')}">I have not seen a proper solution for this on the JDeveloper forum. I noticed people asking if there is a kind of 'maximum' on how complex a page can get before this error situation happens. No answer on that found (you do not want to know there is a maximum anyway).
    The specific page is a master with 5 stacked detail regions and three "use as LOV" groups. Further on about 30 domains are used...
    And the page has not finished yet, it will get more "complex" that this. I hope someone knows a good solution so that I can continue to use the Embedded OC4J for testing, otherwise developing wil get very time consuming if I have to deploy to AS every time...something I cannot afford since the project deadline is getting nearer and nearer.
    Toine

  • Using and loading newer java classes...

    Hi,
    I am trying to use a feature from the newest release of java in my application.
    Is it possible to find the exact class files within the jre and just put them amongst
    my application's classes?
    For example if I were to take the new transparency feature
    from the latest release and use it on a computer that is not running the latest release of the java runtime?
    Any ideas or help would be so great...
    Thanx in advance!

    BigDaddyLoveHandles wrote:
    >
    Also, what if i wrote a class that uses the new features, and catch a class not found exception
    just on loading that class? so I could inform the user the latest jre needs to be downloaded to use transparency...In my mind, a cleaner approach is the following.
    Right off the bat (main?) you can find out the version:
    String version = System.getProperty("java.version");And decide what to do based on that. You even could have two versions of your app and chose the one that works with that version of the JRE!Thanx BigDaddyLoveHandles! :)
    this is a great idea, i still hope i could find some kind of solution to using classes from a jre that is not installed some how...

  • Where the $%^&* are the standard Java classes?

    I've loaded and run j2sdk-1_4_2_01-windows-i586.exe (I use Win 98).
    Then I tried to write my first applet, which began:
    import java.awt.Graphics;
    import java.awt.Font;
    import java.awt.Color;
    But the compiler said it could not find the Color class.
    So I looked in the installation directory and its various subdirectories and could not find Color.java or Color.class (or rather Wondows Explorer could not find them for me).
    So where the $%^&* are they supposed to be?
    If necessary how do I get them installed in the right place?

    Thanks for your initial responses, everyone. Here's the additional info some of you requested.
    I installed the SDK in directory C:\j2sdk1.4.2 in case I ever want to experiment with another version.
    I have not modified any MS-DOS environment variables - as far as I'm concerned this is the installer's responsibility and every other product I've ever installed has handled this - sound cards, CD readers, software, whatever.
    Directory C:\j2sdk1.4.2 contains file src.zip and WinZip (6.3, so AFAIK it handles long file names OK) tells me src.zip contains a vast collection of files - some look relevant to my current requirements (e.g. those with path java\applet and java\awt) and others not so relevent to my requirements.
    abramia is right, I used the Gel IDE (http://www.gexperts.com/). I've set the project properties as follows in Gel:
    Libraries:
    * Basic Java libraries
    Source paths:
    * Where I keep my own source code - no problem, javac is finding the applet code OK.
    * C:\j2sdk1.4.2 (where I installed the SDK).
    Command line generated by the "compile" menu option - too long to copy & paste!
    Output path: I'll worry about this when I get a clean compile. I used the same procedure as when I set the 1st source path, so I don't expect problems.
    So can anyone help me now with this additional info? Or is there any other info I need to supply?

  • Difference b/w Java Class and Bean class

    hi,
    can anybody please tell me the clear difference between ordinary java class and java Bean class. i know that bean is also a java class but i donno the exact difference between the both.
    can anybody please do help me in understanding the concept behind the bean class.
    Thank u in advance.
    Regards,
    Fazlina

    While researching this question, I came across this answer by Kim Fowler. I think it explains it better than any other answer I have seen in the forum.
    Many thanks Kim
    Hi
    Luckily in the java world the definition of components is a little
    less severe than when using COM (I also have, and still occasionaly
    do, worked in the COM world)
    Firstly there are two definitions that need to be clarified and
    separated: JavaBean and EnterpriseJavaBean (EJB)
    EJB are the high end, enterprise level, support for distributed
    component architectures. They are roughly equivalent to the use of MTS
    components in the COM/ COM+ world. They can only run within an EJB
    server and provide support, via the server, for functionality such as
    object pooling, scalability, security, transactions etc. In order to
    hook into this ability EJB have sets of interfaces that they are
    required to support
    JavaBeans are standard Java Classes that follow a set of rules:
    a) Hava a public, no argument constructor
    b) follow a naming patterns such that all accessor and modifier
    functions begin with set/ get or is, e.g.
    public void setAge( int x)
    public int getAge()
    The system can then use a mechanism known as 'reflection/
    introspection' to determine the properties of a JavaBean, literally
    interacting with the class file to find its method and constructor
    signatures, in the example above the JavaBean would end with a single
    property named 'age' and of type 'int' The system simply drops the
    'set' 'get' or 'is' prefix, switches the first letter to lower case
    and deduces the property type via the method definition.
    Event support is handled in a similar manner, the system looks for
    methods similar to
    addFredListener(...)
    addXXXListener
    means the JavaBean supports Fred and XXX events, this information is
    particularly useful for Visual builder tools
    In addition there is the abiliity to define a "BeanInfo' class that
    explicitly defines the above information giving the capability to hide
    methods, change names etc. this can also be used in the case where you
    cannot, for one reason or another, use the naming patterns.
    Finally the JavaBean can optionally - though usually does - support
    the Serializable interface to allow persistence of state.
    As well as standard application programming, JavaBeans are regularly
    used in the interaction between Servlets and JSP giving the java
    developer the ability to ceate ojbect using standard java whilst the
    JSP developer can potentially use JSP markup tags to interact in a
    more property based mechanism. EJB are heaviliy used in Enterprise
    application to allow the robust distribution of process
    HTH.
    Kim

  • Customization of generated Java class names

    Hi,
    I could not find any documentation on how to customize names of the generated
    Java classes/types. In Castor, you can do it with a simple mapping, is it possible
    with XMLBeans?
    Thanks,
    Marina

    Hi, Steve,
    thanks for your reply!
    I have tried to add an xsdconfig file, but when I run the following command:
    C:\Java\XMLBeans\xkit\bin\scomp -src . -srconly order.xsd
    with the xsdconfig file in the current directory , nothing happens - the xsdconfig
    file is ignored and Java files are generated in exactly same way as they were
    without the xsdconfig file...
    Here is the content of my xsdconfig file - it is very simple, for test purposes:
    <xb:config xmlns:order="http://order"
    xmlns:xb="http://www.bea.com/2002/09/xbean/config">
    <xb:namespace uri="http://order">
    <xb:package>neptune.neptunelib</xb:package>
    </xb:namespace>
    <xb:qname name="order:order" javaname="OrderDO"/>
    <xb:qname name="order:shippingID" javaname="ShippingInfoDO"/>
    <xb:qname name="order:addressInfo" javaname="AddressInfoDO"/>
    <xb:qname name="order:destination" javaname="DestinationDO"/>
    </xb:config>
    I'm not sure about the namespace part - currently, my order.xsd has no namespace
    or URI assigned. I asked BEA's customer support about this and the answer was:
    'use anything, the URI does not matter'. Well, I did use "anything" but I'm not
    sure this is correct...
    Thanks,
    Marina
    "Steve Traut" <[email protected]> wrote:
    Marina -- You can do this by creating an xsdconfig file and including
    it
    when you compile your XSD files. The xsdconfig file maps schema types
    to
    generated Java type names.
    If you're using WebLogic Workshop, the following topic should give you
    what
    you need:
    http://edocs.bea.com/workshop/docs81/doc/en/workshop/guide/howdoi/howGuideXMLBeansTypeNaming.html
    If you're using Ant, I can provide a topic that will be available soon.
    Please send email if you'd like information on the Ant task.
    Steve
    "Marina Popova" <[email protected]> wrote in message
    news:3f8c468c$[email protected]..
    Hi,
    I could not find any documentation on how to customize names of thegenerated
    Java classes/types. In Castor, you can do it with a simple mapping,is it
    possible
    with XMLBeans?
    Thanks,
    Marina

  • Is it possible to put the java classes of an application and run?

    Hi All,
    Please excuse me if this question seems meaningless / laughable.
    We get java class files by compiling the source code with java compiler. To run the application, classpath can be set to the folder where the class files are stored and then run the main class.
    Now the question is, is it possible to read the class files to RAM and then run the application. I highly appreciate your help.
    Thanks in advance.
    Chinnaswamy

    You could
    1.) copy the class files to a ramdisk
    2.) write another class loader that deletes the class files after loading >them from ram
    but all of this is probably not necessary.
    What exactly would you like to achieve by doing this? Thanks, JoachimSauer.
    The idea I have in mind is to first read and store the java class files in C/C++ code and then while running the C/C++ code, read & put the java classes into RAM and run the java application.
    This way the decompilation problem can be alleviated for valuable java applications. ( I am not sure, this will work)
    Another reason could be speed improvement. Classes in RAM is expected to make the application to run faster than when class files are in hadr disk
    With regards
    Chinnaswamy

  • Pass table rowtype between java class and PL/SQL package

    I am a complete newbie when it comes to java itself but I've been asked to investigate the possibility of passing a rowtype datatype from a PL/SQL package to a java class and vice versa.
    I have heard of oracle.sql.ArrayDescriptor as an option but this appears to address only SQL types that are defined outside of a package.
    I'm talking about using, say, SCOTT.EMP%rowtype instead of a user-defined type. I'm thinking that a java array could be defined from the definition of a table in the database but I don't know what class would be appropriate.
    Could someone provide a simple proof-of-concept example that shows how you could use a java array to pass data to a package that is expecting a table rowtype variable and conversely a java class that reads the rowtype returned into a java array?
    Would oracle.jdbc.driver.OracleDatabaseMetaData be a way of doing this?
    Thanks!

    Kuassi:
    <br><br>
    Not at all. I didn't feel like you misled me at all. I'm grateful for your help. I think that maybe I failed to describe my problem adequately in the first place.
    <br><br>
    Perhaps I've also gotten stuck on the term <i>ref cursor</i>.
    <br><br> At any rate, the people I'm gathering information for have further refined their requirement. We want to take a collection of data and send it to a procedure. It doesn't have to be a "ref cursor" or "%rowtype" per se, but something that is maintainable and workable from both ends.
    <br><br>
    For example, to use the old SCOTT/TIGER paradigm, let's suppose we have a website where you can indicate which employees work for a given department. The website allows us to fill in information for multiple employees at once. We want to use a servlet that gathers all the employees data and sends it on through to a PL/SQL package so that the data is validated and committed in the database.<br><br>
    Perhaps the java servlet should handle the multiple employee records as an array? If so, how can a PL/SQL procedure be made to recognize that construct?<br><br>
    I can accept that java cannot create a "ref cursor" type to send information to a package, but might this be possible via some other implementation?
    <br><br>
    Hopefully this is a little more clear. If not, please let me know and I'll try to inject more details as to what we are trying to accomplish.
    <br><br>
    Once again, thanks for your persistent replies and help.
    <br>

  • Error while trying to call Java Class from Peoplecode

    Gurus,
    I am trying to read a property file from peoplecode using standard java classes. However, I am getting this error more than one overload matches
    Below are 2 ways in which I tried doing this and both ended up in the same error
    Code 1>_
         Local JavaObject &file = CreateJavaObject("java.io.File", "D:\\psft.properties");
         Local JavaObject &properties = CreateJavaObject("java.util.Properties");
         Local JavaObject &reader = CreateJavaObject("java.io.FileReader", &file);
         &properties.load(); Error thrown : "Calling Java java.io.FileReader.<init>: more than one overload matches"
    Code 2>_
         Local JavaObject &file = CreateJavaObject("java.io.File", "D:\\psft.properties");
         Local JavaObject &properties = CreateJavaObject("java.util.Properties");
         Local JavaObject &properyFile = CreateJavaObject("java.io.FileInputStream", &file);
         &properties.load();
    Error thrown : "Calling Java java.io.FileInputStream.<init>: more than one overload matches."
    The above error is thrown on the 3rd line when I try to invoke the FileInputStream or FileReader class/constructor.
    In fact both the above code pieces work absolutely fine when I write them into a java class and run them on a java runtime. Any inputs would be of great help !! Alternatively, I will have to use peoplecode file.readline(), etc to read the property file. Since java has this smarter way to reading a property file, I thought of giving it a try ..
    -Sudripta

    I tested this on one of my windows servers using PT 8.50:
    Local JavaObject &joCurrFile = CreateJavaObject("java.io.File", "c:/temp/test-date.txt");
    Local JavaObject &jlongtime = CreateJavaObject("java.util.Date");
    Local number &modifytime = &jlongtime.getTime();
    MessageBox(0, "", 0, 0, "original time: " | &joCurrFile.lastModified());
    Local boolean &filemodified = &joCurrFile.setLastModified(&modifytime);
    MessageBox(0, "", 0, 0, "&modifytime: " | &modifytime, "");
    MessageBox(0, "", 0, 0, "&filemodified: " | &filemodified, "");
    MessageBox(0, "", 0, 0, "new time: " | &joCurrFile.lastModified());Here are the results:
    PeopleTools 8.50.05 - Application Engine
    Copyright (c) 1988-2010 PeopleSoft, Inc.
    All Rights Reserved
    original time: 1287677026144 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: original time: 1287677026144 (0,0) (0,0)
    &modifytime: 1287677277845 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: &modifytime: 1287677277845 (0,0) (0,0)
    &filemodified: True (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: &filemodified: True (0,0) (0,0)
    new time: 1287677277845 (0,0)
    Message Set Number: 0
    Message Number: 0
    Message Reason: new time: 1287677277845 (0,0) (0,0)
    Application Engine program DSS_TEST_IO ended normallyDoes your app server have permissions to modify the files you are trying to modify? Also, how did you verify the date/time of the files? Were you using Windows Explorer? Did you refresh the view first? Or did you use the console dir/ls? I seriously doubt there is a security manager in place that would restrict what you can do with Java. Security managers are common in applets/browser context, but not in apps.

  • Replace Java Class?

    Hi to all of yours.
    Standard Java classes, like File, OutputStream and such and such, are included in every Java distribution.
    I have a .jar library which uses them, for example FileOutputStream. I load this library with an URLClassLoader.
    What I want to achive is that the library uses a class defined by myself instead of FileOutputStream. This class will have the same signature and methods, of course.
    This sounds strange, but consider the following: the library I use (3rd party) creates a pile of files with stuff in them on the hard disk. However, I dont want these files to be on the hd, but in memory instead. Therefore I created some sort of "virtual file system" with streams and all sorts of gimicks.
    I dont want to replace FileOutputStream permanently, just within the ClassLoader used to load that jar.
    First idea was to override the loadClass method to return my class whenever "java.io.FileOutputStream" is requested.
    Well, this works for normal classes, but these "basic" java classes (as I said, like File, FileOutputStream and so on..) are not requested from the classloader but somehow already "known".
    Can someone either tell me how to achieve my goal of replacing them dynamically or at least point me some links where i can get information on how the class-retrieving process of the "basic" java classes is done or could be influenced?
    Thanks a million,
    Thomas.

    Hey
    You need to add a parameter to exchange profile before you can see ABAP-class in Interface mapping,please follow the below steps:
    Go to http://<host:port>/exchangeProfile in internet explorer
    Expand IntegrationBuilder ->IntegrationBuilder.Repository->click on com.sap.aii.repository.mapping.additionaltypes link ,then on right hand side just type
    R3_ABAP|Abap-class in i/o field. and save.
    You may need to restart Java engine for this take effect.
    Thanks
    Aamir
    Edited by: Aamir Suhail on Aug 5, 2009 1:02 PM
    Edited by: Aamir Suhail on Aug 5, 2009 1:02 PM

Maybe you are looking for