Exec envp method usage?

Hi,
What is the use of envp variable in exec function ?
(String[] cmdarray, String[] envp) Is it somewhat related with windows localization. Also how to assign value to this variable. Can we give system environment variable using
System.getenvp() If yes, then how to map this to string[] in order to use this ?
Thanks in advance

The string[] envp is an "array of strings, each element of which has environment variable settings in the format name=value, or null if the subprocess should inherit the environment of the current process."
The exec method "checks that cmdarray is a valid operating system command. Which commands are valid is system-dependent, but at the very least the command must be a non-empty list of non-null strings.
If envp is null, the subprocess inherits the environment settings of the current process"
If environment variables make sense for the specific OS being used, then you can set them this way.
However, a better way of modifying the environment is to use the new ProcessBuilder class, using the start method. The new process will invoke the command and arguments given by command(), in a working directory as given by directory(), with a process environment as given by environment().
A full example of using ProcessBuilder.start with modified environment variables and starting directory is given in the API document for the class.

Similar Messages

  • Difference between narrow() method usage and simple class cast for EJB

    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?
    P.S. I'm working with WL 6.1 sp2
    Any help would be appreciated.
    Thanks in advance,
    Orly

    [email protected] (Orly) writes:
    Hi,
    I have a very simple question:
    what is the difference between PortableRemoteObject.narrow(fromObj,
    toClass) method usage and simple class cast for EJB.
    For example,
    1)
    EJBObject ejbObj;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)PortableRemoteObject.narrow(ejbObj,ABean.class);
    OR
    2)
    EJBObject bean;
    // somewhere in the code the home.create() called for bean ...
    ABean a = (ABean)ejbObj;
    Which one is better?(1) is mandated by the spec. It is required because CORBA systems may
    not have sufficient type information available to do a simple case.
    P.S. I'm working with WL 6.1 sp2 You should always use PRO.narrow()
    andy

  • Factory method usage, creating the correct Image subclass

    Hi, I created a factory method
      public enum ImgType {
        SINGLE, STRIP, SPRITE_SHEET
    public static Image createImage(ImgType imgType) {
        switch (imgType) {
          case SINGLE:
            return new MyImage1(0, 0);
          case SPRITE_SHEET:
            return new MyImage2("", 0, 0);
          case STRIP:
            return new MyImage3("", 0, 0);
          default:
            throw new IllegalArgumentException("The image type " + imgType + " is not recognized.");
      }that creates different images based on the enum type provided.
    and heres is a usage of that function
      public BufferedImage loadAwtImage(ImageInputStream in, String imgName,  ImageTypeFactory.ImgType imgType) throws IOException {
        BufferedImage img = imgLoader.loadImage(in);
        BufferedImage imgsubType = ImageTypeFactory.createImage(imgType);  // Convert to real Image type
        addAwtImg(imgName, imgsubType);
        return imgsubType;
      }In a test:
    imgLib.loadAwtImage(imageStream, "cursor", ImageTypeFactory.ImgType.SPRITE_SHEET);Is it 'good' that in the test I can say(using the imgType enum) what sort of Image should be returned?
    doesn't this expose the working of the class to the outside, on the other hand I don't know howto create the correct sub image based on an image loaded.
    I use subImages to allow selection within the image, like the 3th 'tile' within an imageStrip returns just that cropped image.
    Before I had List<Image> and List<List<Image>> and now I can just return Images in 1 method instead of 2,3 by using lists.
    Edited by: stef569 on Dec 12, 2008 11:05 AM

    creates specifications... :p
    *  load the BufferedImage from the ImageInputStream
    * add it to the cache keyed by the imgName
    * @return a BufferedImage, or a custom subclass based on the imgType
    * @throws IOException when the img could not be loaded
    public BufferedImage loadAwtImage(ImageInputStream in, String imgName,  ImageTypeFactory.ImgType imgType) throws IOException I can test it, but the ImageTypeFactory.ImgType imgType parameter looks wrong to me.
    if you see this in a class method would you change it/find a better way.

  • Method usage

    Hiee All,
    I have created one method in one view implementation.I want to use that method in another view,how can i do that?how to call that method from other view?
    Thanks in advance.

    Hi
    Yes as said by ashwani  you cann't access the method of one view to another view and also you can acces from view to comp ctroller not from comp ctrl to view
    In the view 1 define the usage of component controller
    In the component controller create a method
    //@@begin javadoc:cc_method()
      /** Declared method. */
      //@@end
      public void cc_method( )
        //@@begin cc_method()
        //@@end
    In the view 1 call the component controller method like this
    //@@begin javadoc:method1()
      /** Declared method. */
      //@@end
      public void method1( )
        //@@begin method1()
        wdThis.wdGetTest1Controller().cc_method();
        //@@end
    Regards,
    Arun

  • Runtime.getRuntime().exec(java method); - Passing strings between methods

    Hi all,
    I am using Runtime.getRuntime().exec(java xxxxxx); to run a java program from within a java program, i also need to pass a string to the new program. Does anyone know how to do this?
    Matt

    how would i retrive those strings in myApp as i want
    to put the values from them in a JLabelYou have a main method like this, right?
    public static void main(String[] args) { ... }
    args contains the array of strings passed to the app from the command line.

  • DateFormat parse method usage

    Hi all,
    I am using the following code to parse the date String object to Date Object -
    ======================================================================
    if(dateString == null || dateString.trim().equals(""))
    return null;
    DateFormat dateFormatter = DateFormat.getDateInstance(DateFormat.SHORT,
    Locale.getDefault());
    Date d = null;
    try
    dateFormatter.setLenient(false);
    d = dateFormatter.parse(dateString);
    catch(ParseException pe)
    e.printStackTrace();
    =================================================================
    This code works perfectly for all formats of String objects I give except for the format - "12/12/12/1" in which case it converts to following date object -
    "Wed Dec 12 00:00:00 IST 2012" although its an invalid date String.
    Please let me know how I could have correct validation done in such cases or if this is the right behavior for DateFormat class.
    Thanks in advance!!

    I'm not going to comment on how exactly the parse method does its business, but I can suggest you use a regex pattern to validate the input you will send the parse method.
    Here is some info from the CodeProject website on date validation(Note that this is aimed at .NET - but regex works the same in Java as it does in .NET [i think]):
    Dates: As with numbers, we need two validators: a key-press validator, and a completion validator. The key-press validator can be pretty simple, if we limit how our user enters the date. Let’s say that we want to validate for the U.S. date format mm/dd/yyyy. Here is a validator that will do that:
    ^([0-9]|/)*$
    The regex reads: “Match any string that contains a sequence of zero or more characters, where each character is either a digit or a slash.” This validator will give the user immediate feedback if they enter an invalid character, such as an ‘a’.
    Copy that regex to Regex Tester and give it a try. Note that the validation fails if the user enters dashes, instead of slashes, between the parts of the date. How could we increase the flexibility of our regex to accommodate dashes? Think about the question for a minute before moving on.
    All we need to do is add a dash to the alternates group:
    ^([0-9]|/|-)*$
    We could add other alternates to make the regex as flexible as it needs to be.
    The completion validator does a final check to determine whether the input matches a complete date pattern:
    ^[0-2]?[1-9](/|-)[0-3]?[0-9](/|-)[1-2][0-9][0-9][0-9]$
    The regex reads as follows: "Match any string that conforms to this pattern: The first character can be a 0, 1, or 2, and it may be omitted. The second character can be any number and is required. The next character can be a slash or a dash, and is required…” And so on. This regex differs from the ones we used before in that it specifies each character of the pattern—the pattern is more of a template than a formula.
    Note the first character of the regex: ‘[0-2]’. This character points out that we can limit allowable digits to less than the full set. We can also expand them; for example, ‘[0-9A-F]’ would allow any hexadecimal digit. In fact, we can use this structure, known as a character class, to specify any set of characters we want. For example, the character class ‘[A-Z]’ allows capital letters, and ‘[A-Za-z]’ allows upper or lower-case letters.
    Our date regex also points out some of the limitations of regex validation. Paste the date regex shown into Regex Tester and try out some dates. The regex does a pretty good job with run-of-the-mill dates, but it allows some patently invalid ones, such as ‘29/29/2006’, or ‘12/39/2006'. The regex is clearly not ‘bulletproof’.
    We could beef up the regular expression with additional features to catch these invalid dates, but it may be simpler to simply use a bit of .NET in the completion validator:
    bool isValid = DateTime.TryParse(dateString, out dummy);
    We gain the additional benefit that .NET will check the date for leap year validity, and so on. As always, the choice comes down to: What is simpler? What is faster? What is more easily understood? In my shop, we use a regex for the key-press validator, and DateTime.TryParse() for the completion validator.
    Oh - and there is another regex validator:
    ^[0-9]{4}-(((0[13578]|(10|12))-(0[1-9]|[1-2][0-9]|3[0-1]))|(02-(0[1-9]|[1-2][0-9]))|((0[469]|11)-(0[1-9]|[1-2][0-9]|30)))$
    which matches the yyyy-mm-dd date format and also validates month and number of days in a month. Could be improved as currently all leap year dates (yyyy-02-29) will validate.
    Sorry if I couldn't be of more help...
    Edited by: JoKiLlSyA on Oct 9, 2008 11:22 PM

  • TcLookupOperationsIntf method usage in OIM 10g JSP

    We are trying to use the tcLookupOperationsIntf in OIM-10g to populate few lookup fields on manual selection.
    But while trying to use getLookupValues, getLookupValuesForColumn we couldn't achieve the same.
    Both the above quoted methods require different parameters; tried different combinations but none seem to work or most probably headed in a wrong direction.
    Below is a code snippet of same attempt, please advice
    <tctags:lookupfield
                             selectionColumn="Lookup Definition.Lookup Code Information.Code Key"
    className="Thor.API.Operations.tcLookupOperationsIntf"
    methodName="getLookupValues"
    columnNames="Lookup Definition.Lookup Code Information.Code Key,Lookup Definition.Lookup Code Information.Decode"
    fixedFilter="Lookup Definition.Lookup Code Information.Code Key:<Code Key Value>"
    lookupAPI="-2"
                             </tctags:lookupfield>
    the same works fine for tcOrganizationOperationsIntf/tcUserOperationsIntf.
    Below is the error captured in logs, on clicking the lookup defined by the above tctags
    DEBUG,20 Sep 2012 16:48:11,527,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAction/lookupByAPI entered.
    DEBUG,20 Sep 2012 16:48:11,527,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAction/lookupByAPI - Data: columnNames - Value: Lookup Definition.Lookup Code Information.Code Key
    DEBUG,20 Sep 2012 16:48:11,527,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAction/lookupByAPI - Data: columnNames - Value: Lookup Definition.Lookup Code Information.Decode
    ERROR,20 Sep 2012 16:48:11,527,[XELLERATE.WEBAPP],Class/Method: tcLookupFieldAction/lookupByAPI encounter some problems: {1}
    java.lang.NullPointerException
    Edited by: dash on Sep 20, 2012 4:50 PM
    Edited by: dash on Sep 20, 2012 4:52 PM

    Using OOTB API it will not be possible to achieve.
    You need to customize your JSP.
    You can use Javascript to achieve this. Approach can be as follow-
    1. Get values of both lookups at the time of page load. (It will avoid page refresh and other complexity of page reload to fetch 2nd lookup)
    2. Store both in Java Script variables.
    3. When one of the lookup field value changes, call a JavaScript function which will change value of second field.
    You may need to have plain HTML field if OOTB field is not working.

  • Objects last change and history of task/method usage

    Dear all,
    I'd like to find out the last modifcation date and also the user who did it. Do you know if there is a possibility to display the user and also the date of the last change within UCWB for instance for task or method change?
    The task/method settings in SEM-BCS are time dependent: Do you have any idea if it's possible to see the time frame in which a method is in use?
    Example:
    I've assined method M1 to task A in period 01/2009. Since 01/2010 method M1 is not any longer in use and was substituted by method M2.
    Is there any report, transaction, table or option to check this constellation? At the moment, I've always to change the parameters in order to find out differences, but this is not very comfortable.
    I thought that if I change a task for a period that then this change will become effective for all following periods. But this is not the case. Is this system behaviour correct? For instance, customize a task in period 01/2009 and afterwards the same task in period 01/2008. Settings in period 01/2009 remain the same.
    Thanks in advance for your help!
    Best Regards,
    Daniel
    Edited by: Daniel Lampe on Aug 26, 2010 4:42 PM

    Hi Daniel,
    Is there any report, transaction, table or option to check this constellation?
    - none that I'm aware of.
    I thought that if I change a task for a period that then this change will become effective for all following periods. But this is not the case. Is this system behaviour correct? For instance, customize a task in period 01/2009 and afterwards the same task in period 01/2008. Settings in period 01/2009 remain the same.
    - it's the real system behaviour. When you do everything consequently (by time) - everything is ok. But, if you change something in the past periods and do not repost all entries afterwards- expect the trouble. Though, even reposting may not correct the situation - because of the SAP's time dependency treatment.

  • AdfPage.PAGE.findComponent method usage

    I have a function.js file which has the showMap() function. I am trying to display something using the AdfPage.PAGE.findComponent method which keeps returning undefined for any component I try to find from the js file. What am I doing wrong? Is it because I am finding the component before page loading. Please advise
    function.js file
    function showMap() {
    alert(AdfPage.PAGE.findComponent('f1'));
    baseURL = "http://"+document.location.host+"/mapviewer";
    var mapCenterLon = 145.07;
    var mapCenterLat = -37.57;
    var mapZoom = 1;
    mapview = new MVMapView(AdfPage.PAGE.findComponent('map'), baseURL);
    //var map = AdfPage.PAGE.findComponent("map");
    //mapview = map.getMVMapView();
    mapview.addMapTileLayer(new MVMapTileLayer("gis_data.AV_VICMAP"));
    mapview.setCenter(MVSdoGeometry.createPoint(mapCenterLon,mapCenterLat,4283));
    mapview.setZoomLevel(mapZoom);
    mapview.addNavigationPanel("WEST");
    showOverviewMap();
    addThemeBasedFOI();
    mapview.display();
    JSPX file
    <?xml version='1.0' encoding='UTF-8'?>
    <jsp:root xmlns:jsp="http://java.sun.com/JSP/Page" version="2.1"
    xmlns:f="http://java.sun.com/jsf/core"
    xmlns:h="http://java.sun.com/jsf/html"
    xmlns:trh="http://myfaces.apache.org/trinidad/html"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    xmlns:dvt="http://xmlns.oracle.com/dss/adf/faces">
    <jsp:directive.page contentType="text/html;charset=UTF-8"/>
    <f:view>
    <af:document id="d1" binding="#{backingBeanScope.mapsBean.d1}">
    <f:facet name="metaContainer">
    <af:group id="g3" binding="#{backingBeanScope.mapsBean.g3}">
    <trh:script id="script1" source="/jslib/oraclemaps.js"
    binding="#{backingBeanScope.mapsBean.script1}"/>
    <trh:script id="script2" source="/jslib/functions.js"
    binding="#{backingBeanScope.mapsBean.script2}"/>
    <trh:script text='' id="script3"
    binding="#{backingBeanScope.mapsBean.script3}"/>
    </af:group>
    </f:facet>
    <af:form id="f1" binding="#{backingBeanScope.mapsBean.f1}">
    <af:panelStretchLayout id="psl1" topHeight="5px" bottomHeight="115px"
    endWidth="373px"
    binding="#{backingBeanScope.mapsBean.psl1}">
    <f:facet name="bottom">
    <af:panelBox text="Watch Options" id="pb1"
    binding="#{backingBeanScope.mapsBean.pb1}">
    <f:facet name="toolbar"/>
    <af:selectBooleanCheckbox label="Auto Refresh"
    id="sbc2"
    binding="#{backingBeanScope.mapsBean.sbc2}"/>
    <af:selectBooleanCheckbox label="Show Vehicle Locations"
    id="sbc1"
    binding="#{backingBeanScope.mapsBean.sbc1}"/>
    <af:commandButton text="Refresh Now"
    id="cb1"
    partialSubmit="true"
    binding="#{backingBeanScope.mapsBean.cb1}"/>
    </af:panelBox>
    </f:facet>
    <f:facet name="center">
    <af:panelGroupLayout layout="scroll"
    xmlns:af="http://xmlns.oracle.com/adf/faces/rich"
    id="pgl1"
    binding="#{backingBeanScope.mapsBean.pgl1}">
    <af:group id="g1" binding="#{backingBeanScope.mapsBean.g1}">
    <dvt:mapToolbar mapId="map"
    id="mt1"
    binding="#{backingBeanScope.mapsBean.mt1}"/>
    <dvt:map startingY="-36.88" startingX="145.26" mapZoom="1"
    mapServerConfigId="mapConfig1"
    baseMapName="GIS_DATA.AV_VICMAP"
    inlineStyle="width:100%; height:793px;"
    id="map" binding="#{backingBeanScope.mapsBean.map}">
    <f:facet name="rtPopup"/>
    <f:facet name="popup"/>
    </dvt:map>
    </af:group>
    </af:panelGroupLayout>
    </f:facet>
    <f:facet name="end">
    <af:panelBox text="List Vechicles"
    id="pb2" binding="#{backingBeanScope.mapsBean.pb2}">
    <f:facet name="toolbar"/>
    <af:inputText label="Area Code"
    id="it1"
    binding="#{backingBeanScope.mapsBean.it1}"/>
    <af:inputText label="Vehicle Number"
    id="it2"
    binding="#{backingBeanScope.mapsBean.it2}"/>
    <af:commandButton text="Search"
    id="cb2"
    binding="#{backingBeanScope.mapsBean.cb2}"/>
    </af:panelBox>
    </f:facet>
    </af:panelStretchLayout>
    </af:form>
    <af:clientListener type="load" method="showMap()" />
    </af:document>
    </f:view>
    <!--oracle-jdev-comment:auto-binding-backing-bean-name:mapsBean-->
    </jsp:root>
    Edited by: user5108636 on 29/04/2010 18:22

    It is now detecting the map component, but the map object retrieved in the javascript seems to a new object. I had set the srid and ceterX and centerY.
    In my javascript, I do
    var map = AdfPage.PAGE.findComponent('map');
    mapview = map.getMVMapView();
    alert("Zoom:"+ mapview.getZoomLevel());
    alert("Srid:"+ mapview.getSrid());
    alert("CenterX:"+ mapview.getPointX());
    alert("CenterY:"+ mapview.getPointY());
    where the map object parameters are already set in the ADF page, which is not reflecting. I am not getting access to the same map
    object. My javascript method runs on page load. Is it because the javascript method is getting called before the ADF map object exists.
    dvt:map id="map" startingX="145.26"
    mapServerConfigId="mapConfig1"
    baseMapName="GIS_DATA.MAP" mapZoom="1"
    startingY="-36.88" unit="METERS"
    inlineStyle="width:100%; height:793px;" srid="4283"
    />
    Let me know if any more code needs to be posted for clarification.
    Regards
    Edited by: user5108636 on 9/05/2010 19:20

  • FindByKey() Method Usage:

    I have created my Key 2 different ways. I donot get any results when the key is passed to findByKey(...). I have tried it using both Constructors:
    Key myKey=new Key(anObjectArray);
    Where anObjectArray is RowKey passed in. I placed it into an Object array.
    The other way:
    Key myKey=new Key(theRowKey, ServletBindingUtils.getAttributeDef(bajaContext));
    I know the RowKey is valid. When I pass myKeyinto findByKey, it dose not return anything. I have tried it using both Constructors.
    Row[] row=someViewObject.findByKey(myKey,1);
    Question: Isn't the RowKey a map to one row in the database? If so, why is an array of rows returned?
    Tks
    Booker Northington II

    Booker:
    I'm not familiar with RowKey, but the Key that BC4J expects should be constructed through something like:
    new Key(new Object[] { <key-part-1>, <key-part-2>, ..., <key-part-n> });
    Make sure that each key-part's type matches that of the VO's key.
    If you RowKey gives you a method to peel it off and get at constituent values, you should get them out and build Key as above. Again, please remember that each part's data type should match up with the data type of corresponding part of the VO's key.
    Thanks.
    Sung

  • About sendRedirect method usage

    Hello.
    I have a problem with sendRedirect method.
    So. I have page with my_auth portlet.
    When this form submits, i check the user information from db and must redirect it to special pages.
    For this purpose i use HttpPortletRendererUtil.sendRedirect() method.
    Code:
    if (request.getParameter(fSubmit) != null)
    if ( o.Auth_user(vLogin,vPassword) ) {
    session.putValue("sUser_id" , new Integer(o.getUser_id()) );
    Forward_URL fu = new Forward_URL();
    HttpPortletRendererUtil.sendRedirect(pr, fu.replace(pr.getPageURL(),"_pageid=133","_pageid=84"));
    But this not redirect me to page with _pageid=84.
    fu.replace() method works propertly. and new url is correct: http://myhost:port/page?_pageid=84&_dad=dad1&_schema=shema1
    If I make link with this and manualy click on it all works fine.
    Can anyone telll me that i do wrong?
    Best regards, brom.

    hi,
    If you make a call to do a redirect from within a JSP portlet, it WILL redirect to the specified URL - BUT the new URL's contents will be rendered inside the calling portlet. What you are doing is redirecting a specific portlet to the new URL, and NOT the page it resides in.
    In the current release, JPDK apis do not have control on the page flow, or on the page the calling portlet resides.
    For your functionality, you would need to use one of the following methods -
    1) hide and show portlets depending on the logic when you wish to render the contents
    of the new url, and correspondingly render that specific portlet and do not render the
    others. You would have the same affect of this URL taking up all of the page.
    2) call any of the showDetails or the customization page based on the results of the logic
    and submit back to the main page. Something like that -
    -Ananth

  • Method usage in Bufferedimage

    I have created a method on using a bufferedimage to draw an image with additional shape on top of the image. But when I run it, the shape cannot display. I try to get help in this forum but still expert said the GeneralPath I created is fine, so I recheck again but nothing can be found. Finally, I suspect that maybe this method is wrong. Any opinion or suggestion?
    private BufferedImage createBufferedImage(Image ocean) {
    w = image.getWidth(this);
    h = image.getHeight(this);
    System.out.println(w+" "+h);
    bufferImage = new BufferedImage(w, h,BufferedImage.TYPE_INT_ARGB_PRE);
    if (bufferImage == null) {
    throw new NullPointerException("BufferedImage could not be created");
    Graphics2D context;
    context = bufferImage.createGraphics();
    context.drawImage(image, 0, 0, this);}
    BasicStroke wideStroke = new BasicStroke(20.0f);
    context.setStroke(wideStroke);
    context.setPaint(Color.blue);
    float x1Points[]={50,100,200,400,800};
    float y1Points[]={40,100,300,500,700};
    GeneralPath polygon = new GeneralPath(GeneralPath.WIND_EVEN_ODD);
    polygon.moveTo(x1Points[0], y1Points[0]);
    for ( int i = 1; i < x1Points.length; i++ ) {
    polygon.lineTo(x1Points, y1Points);
    context.draw(polygon);
    repaint();
    return bufferImage;
    }

    bufferimage is declare at the beginning of the program. Sorry, but I didn't paste the whole program cause it may be very long and confusing. Do you need it anyway?

  • Method usage- where's the problem?

    i'm just trying to run a simple case which defines a method and uses it. I have the following two files:
    // file: Manual.java
    import java.io.*;
    public class Manual {
        /* METHOD DEFINITION-- ls:   
           functions like "ls" in unix/linux systems
           returns the contents of a directory */
        public String[] ls ( String location ) {
            File file =  new File( location );
            String [] files = file.list( );
         return files;
    }and
    // file: mergeManual.java
    import java.io.*;
    class mainls {
        public void main ( String[] args ) {
         String which_dir = new String( args[0] );
            Manual direc =  new Manual();
         String[] contents = direc.ls( which_dir );
            //show the contents:   
         //   for (int i=0; i< contents.length; i++)
         //  System.out.println( contents[i] );
    }i get the following error when running:
    $ java mergeManual temp
    Exception in thread "main" java.lang.NoClassDefFoundError: mergeManualwhere temp is just a sample directory. I checked the classpath variable (if that matters) and it is undefined. Can anyone see the problem?
    thanks in advance!
    -john

    If you want to do java Foothen you must have public class Foo in Foo.java, and Foo must have public static void main(String[] args)Your class is not public. It needs to be public and the classname needs to match the filename.

  • Synchronized methods usage

    Hi,
    I use a syncronzed method like this
    synchronized void s1()
    //public void s1()
    try
    System.out.println(this + ".s1 1");
    System.out.println(this + ".s1 2");
    System.out.println(this + ".s1 3");
    System.out.println(this + ".s1 4");
    System.out.println(this + ".s1 5");
    System.out.println(this + ".s1 6");
    System.out.println(this + ".s1 7");
    System.out.println(this + ".s1 8");
    System.out.println(this + ".s1 9");
    System.out.println(this + ".s1 10");
    }

    Ok.... and?

  • Calling EJB with bpelx:exec lookup-methode

    I created a EJB3.0 that I try to lookup in a BPEL Java Embedding activity with following code:
    try {          
      Object homeObj = lookup("ejb/stateless/LoginDataBean#com.unisoa.logindata.LoginDataBeanRemote");
    } catch (Exception ex) {              
       addAuditTrailEntry(ex);   
    }I get Logged exception "NameNotFoundException" as result. Unfortunately I do not have a clue why this happens.
    To prove the lookup-name I checked jndi-tree and it shows Binding-Name: ejb.stateless.LoginDataBean#com.unisoa.logindata.LoginDataBeanRemote. So jndi-name seems to be ok.
    Also I generated a java client with JDeveloper that works well too.
    Code Java Client:
    Hashtable env = new Hashtable();
    env.put( Context.INITIAL_CONTEXT_FACTORY, "weblogic.jndi.WLInitialContextFactory"; );
    env.put(Context.PROVIDER_URL, "t3://server:port");
    InitialContext context = new InitialContext( env );     
    LoginDataBeanRemote loginDataBeanRemote = (LoginDataBeanRemote)context.lookup("ejb/stateless/LoginDataBean#com.unisoa.logindata.LoginDataBeanRemote";);The bean I try to call is following:
    @Stateless(name = "LoginData", mappedName = "ejb/stateless/LoginDataBean")
    @Local(LoginDataBeanLocal.class)
    @Remote(LoginDataBeanRemote.class)
    public class LoginDataBean implements LoginDataBeanLocal, LoginDataBeanRemote{
      public LoginDataBean() {}
    }I did online research but could not find any usefull information. Also I do not know if remote or local jndi-name is necessary for lookup-methode. I am using SOA Suite 11.1.1.3.0.
    I would really appreciate some help.
    Thx
    Pascal

    Have you resolved this? I'm struggling with the exact same problem; a standalone EJB Java client works and I can see the mapped name in the soa server JNDI tree etc

Maybe you are looking for

  • Font Rendering Got Bad After 32.0 Update

    After the recent update, the font started to get badly rendered. Kind of blurry with jagged edges and transparent parts. It used to be okay D: Sometimes it becomes okay for a moment as I scroll down on pages, and sometimes when I stop scrolling, the

  • Report for subcontracting material

    Dear all, I need your help. we have two plants suppose plant 1 and 2 plant 1 have sent some material to plant 2 by subcontracting challan so i need a detail like 1) material sent via 57f4 2) input material (raw material) 3) output material (finish ma

  • SMD Agent doesn't work

    Hello, I have been trying to install SMD Agent in my BI system but Solution Manager can't check it, this is the message in Solman_setup Wilyhost Agent configuration finished without errors, but on Enterprise Manager (sapl917.intra.banesco.com:6001) n

  • 11g - upload a report

    In previous versions you could download a report in Publisher into a zip file that contained the .xdo and .rtf file, then upload into another instance of Publisher. Has that functionality been removed?

  • Translating Adobe Forms in WebDynpro ABAP

    Hi experts, I use Adobe Forms for printing purposes only. I have a form (XML based) which has to be in English and German. The original Language is German. So I translated it via the SE63 (all the blue printed Words), which worked fine but after this