Java OO inheritance issue

Hello,
I have a API written to provide service related implementation in which i have abstract class called com.api.XXXServiceInterface which needs to be implemented by every service provider and then deploy it in JNDI name space e.g.
public class myServiceProvider implements com.api.XXXServiceInterface
public void startService()
bind(this) //This method will bind this class into JNDI
while binding into JNDI, service provider will be binding his service class i.e. com.test.myServiceProvider which implements com.api.XXXServiceInterface from provided API
Now in my platform when i bind to JNDI to find specific service provider's service i will get com.test.myServiceProvider class object and i am trying to type cast it to com.api.XXXServiceInterface but this type casting is throwing ClassCastException class not found com.test.myServiceProvider as my platform will be running somewhere else where i do not have service provider's class object but i will have its super interface class com.api.XXXServiceInterface where i want to do something like
com.api.XXXServiceInterface service = (com.api.XXXServiceInterface)ctx.lookup("MerchantService");
service.startService(); //to start service providers service
How can I achieve this? Please provide me any suggestion and comments
Thanks

but basically this is not good code for two reasons:
a) instanceof takes a looong time :x
b) there are better ways:
take advantage of the overriding/dynamical bindings in java:
class A {
    public int getValue() { //could be declared abstract
        return 0;
class B extends A {
    int bValue = 50;
    public int getValue() {
        return bValue;
class C extends A {
    int cValue = 100;
    public int getValue() {
        return cValue;
A myObject = SelectedObject;
System.out.println(myObject.getValue()); //wil print 0 if Selected was an A-Object, 50 if it was an B-Object, 100 if it was an C-Object
...

Similar Messages

  • Reg ::Java Plug in issue in linux 5.7

    Folks,
    I am facing jave plug in issue and cant open the form as itis geting error java plug in need
    FYI,
    [[email protected] ns7]# uname -a
    Linux apps12.com 2.6.32-200.13.1.el5uek #1 SMP Wed Jul 27 20:
    **11 i686 i686 i386 GNU/Linux**
    <!-- JDK plugins -->
    <sun_plugin_ver oa_var="s_sun_plugin_ver">1.5.0_10</sun_plugin_ver>
    <sun_plugin_type oa_var="s_sun_plugin_type">jdk</sun_plugin_type>
    /usr/java/jre1.5.0_10/plugin/i386/ns7
    [[email protected] ns7]# ls -ltr
    total 112
    -rwxr-xr-x 1 root root 102464 Nov 10 2006 libjavaplugin_oji.so
    [[email protected] firefox-3.6]# cd plug*
    [[email protected] plugins]# ls -ltr
    total 4
    lrwxrwxrwx 1 root root 58 Mar 31 05:53 libjavaplugin_oji.so -> /usr/java/jre1.5.0_10/plugin/i386/ns7/libjavaplugin_oji.so
    [[email protected] plugins]# cd /usr/lib/mozilla/plugins
    total 4
    lrwxrwxrwx 1 root root 58 Mar 31 06:00 libjavaplugin_oji.so -> /usr/java/jre1.5.0_10/plugin/i386/ns7/libjavaplugin_oji.so
    pls advise for the same
    Thanks
    Edited by: JuniorDBA on Mar 30, 2012 3:13 PM

    I am facing jave plug in issue and cant open the form as itis geting error java plug in needAre you trying to run the application from a Linux client? If yes, please note it is not certified -- https://forums.oracle.com/forums/search.jspa?threadID=&q=Linux+AND+client&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
    If you are trying to do something else, please post the details of the application release, database version and OS along with what you are trying to achieve.
    Thanks,
    Hussein

  • Link selectors and inheritance issue

    On playing with simple navigation elements, (2) in total, I find an inheritance issue I do not understand.
    The ul, ol declarations in Boilerplate not being ignored, or overruled, by the css settings that I want for styles, which I had thought carried more weight?
    I was surprised when Boilerplate “lists” selector ul and ol declarations were impacting in this way.
    My intention was to use Boilerplate link selectors for bottom “footer” nav menu, and style sheet selectors for the top horizontal menu.
    Since I’m just expanding knowledge base, I have jumped around quite a bit, so have not uploaded to remote server. Three code blocks contributing are as follows…
    ————————Begin top horizontal nav menu code————————————————
    /*Top navigation menu is styled in external main.css as follows:*/
    #nav ul {
      list-style-type: none;
      /* [disabled]width: 260px; */
      /* [disabled]display: inline-block; */
      /* [disabled]height: 40px; */
      /* [disabled]overflow: hidden; */
      margin: 0 auto;
    #nav li {
      float: left;
      border: solid thin red;
      margin: 0 2px;
    #nav a:link {
      display: block;
      width: auto;
      font-size: 0.8em;
      font-weight: bold;
      color: #00CCCC;
      text-align: center;
      padding: 0;
      margin: 2px;
      text-decoration: none;
      text-transform: uppercase;
    #nav a:visited {
      color: #99B5C1;
    #nav a:hover {
      color: #9FD5C6;
    #nav a:active {
      color: white;
    ————————————-—End top horizontal nav menu——————————
    —————————————Begin footer nav menu code—————————
    /*Bottom navigation menu, placed in div id="footer" declarations in Boilerplate as follows*/
    a {
      color: #78AAB3;
      text-decoration: none;
    a:visited {
      color: #009999;
    a:hover {
      color: #F06;
    a:focus { outline: thin dotted; }
    /* Improve readability when focused and hovered in all browsers: h5bp.com/h */
    a:hover, a:active {
      color: orange;
      outline: 0;
      text-align: center;
    ——————End footer nav menu code———————————
    On following DOM, found following declaration padding: 0 0 0 40px; seems to be inheriting
    SHOULDN’T THIS PADDING DECLARATION IN BOILERPLATE BE OVERRODE BY  CSS?
    ——————Begin Boilerplate code specifics—————————
    ul, ol {
      margin: 1em 0;
      padding: 0 0 0 40px;
    ——————End Boilerplate code specifics—————————

    Joh Fritz II,
    Thanks for quick response.
    To clarify, or expand, on my query; Knocking out the Boilerplate padding of 40px in ul, ol selector is what I want to happen. I want the top menu to be entirely directed by the external css, while allowing Boilerplate selectors for future in the lower, or footer, nav links to come.
    My goal is to have a minimal menu selection at top, than at bottom, in footer, a site map sort of simple links. Stripping it (index.html) down to a minimal footprint to gain as lean and fast loading a page as possible.
    This 40px seems to be affecting my ability to center the menu within the top menu (div element "nav") When I disable that declaration, I can see the menu (dw design split/view) correct to left 40px. Funny thing is, with "layout box model" checked under "visual aids," I can no longer actually see the padding on hover. I could prior, so something I've done led to that.
    Thus, the visual shift on "disable" of the Boilerplate padding declaration tells me the Boilerplate continues to affect that which I actually want to control with external css.
    Apologies if I present contextual information poorly here; I may just clear and create again, but would like to  actually understand how I got here on this particular issue. 

  • New to java and having issues trying to modify sample code.

    i was trying to edit the following code to add about 10+ more labels and textfields and save the information to the contacts.dat in the code. it currently displays all the fields i entered, but it only saves the first 7 fields information?? not sure why. also i was trying to just line the fields up using a flowlayout but it just errors. anyone have any suggestions?
    <source code below this line>
    ====================START OF CODE ======================
    // cm.java
    import java.awt.*;
    import java.awt.event.*;
    import java.io.*;
    import java.util.*;
    // =========================================================
    // Class: cm
    // This class drives the contact manager. It contains the
    // main method which gets called as soon as this application
    // begins to run.
    // =========================================================
    class cm extends Frame implements ActionListener
    // Container of contact objects (one object per business
    // contact).
    private Vector contacts = new Vector (100);
    // List of names component. (Must specify java.awt in
    // front of List to distinguish the List class in the
    // java.awt package from the List class in the java.util
    // package.)
    private java.awt.List names = new java.awt.List ();
    // delete and edit button components.
    private Button delete;
    private Button edit;
    // Default constructor.
    public cm ()
    // Assign Contact Manager to title bar of frame window.
    super ("Customer Manager Version 0.001 BY Pebkac");
    // Add a listener that responds to window closing
    // events. When this event occurs (by clicking on the
    // close box in the title bar), save contacts and exit.
    addWindowListener (new WindowAdapter ()
    public void windowClosing
    (WindowEvent e)
    saveContacts ();
    System.exit (0);
    // Place an empty label in the north part of the frame
    // window. This is done to correct an AWT positioning
    // problem. (One thing that you'll come to realize as
    // you work with the AWT is that there are lots of bugs.)
    Label l = new Label ();
    add ("North", l);
    // Place the names component in the center part of the
    // frame window.
    add ("Center", names);
    // Create a panel object to hold four buttons.
    Panel p = new Panel ();
    Button b;
    // Add an add button to the Panel object and register
    // the current cm object as a listener for button events.
    p.add (b = new Button ("add"));
    b.addActionListener (this);
    // Add a delete button to the Panel object and register
    // the current cm object as a listener for button events.
    p.add (delete = new Button ("delete"));
    delete.addActionListener (this);
    // The delete button should be disabled until there is at
    // least one contact to delete.
    delete.setEnabled (false);
    // Add an edit button to the Panel object and register
    // the current cm object as a listener for button events.
    p.add (edit = new Button ("edit"));
    edit.addActionListener (this);
    // The edit button should be disabled until there is at
    // least one contact to edit.
    edit.setEnabled (false);
    // Add a quit button to the Panel object and register
    // the current cm object as a listener for button events.
    p.add (b = new Button ("quit"));
    b.addActionListener (this);
    // Add the panel object to the frame window container.
    add ("South", p);
    // Set the background of the frame window container to
    // pink (to give a pleasing effect).
    setBackground (Color.pink);
    // Set the size of the frame window container to 400
    // pixels horizontally by 200 pixels vertically.
    setSize (400, 200);
    // Do not allow the user to resize the frame window.
    setResizable (false);
    // Load all contacts.
    loadContacts ();
    // Make sure that the frame window is visible.
    setVisible (true);
    public void actionPerformed (ActionEvent e)
    if (e.getActionCommand ().equals ("delete"))
    delete ();
    else
    if (e.getActionCommand ().equals ("quit"))
    saveContacts ();
    System.exit (0);
    else
    if (e.getActionCommand ().equals ("add"))
    add ();
    else
    edit ();
    public Insets getInsets ()
    // Return an Insets object that describes the number of
    // pixels to reserve as a border around the edges of the
    // frame window.
    return new Insets (10, 10, 10, 10);
    public static void main (String [] args)
    // Create a new cm object and let it do its thing.
    new cm ();
    private void delete ()
    // Obtain index of selected contact item from the names
    // component.
    int index = names.getSelectedIndex ();
    // If no item was selected, index is -1. We cannot edit
    // a contact if no contact item in the names component was
    // selected - because we would have nothing to work with.
    if (index != -1)
    // Remove the contact item from the names component.
    names.remove (index);
    // Remove the Contact object from the contacts Vector
    // object.
    contacts.remove (index);
    // If there are no more contacts ...
    if (contacts.size () == 0)
    delete.setEnabled (false);
    edit.setEnabled (false);
    else
    // Make sure that the first contact item in the names
    // list is highlighted.
    names.select (0);
    private void add ()
    // Create an add data entry form to enter information
    // for a new contact.
    DataEntryForm def = new DataEntryForm (this, "add");
    // If the bOk Boolean flag is set, this indicates the user
    // exited the form by pressing the Ok button.
    if (def.bOk)
    // Create a Contact object and assign information from
    // the form to its fields.
    Contact temp = new Contact ();
    temp.fname = new String (def.fname.getText ());
    temp.lname = new String (def.lname.getText ());
    temp.haddress = new String (def.haddress.getText ());
    temp.maddress = new String (def.maddress.getText ());
    temp.phone = new String (def.phone.getText ());
    temp.wphone = new String (def.wphone.getText ());
    temp.cphone = new String (def.cphone.getText ());
    temp.email = new String (def.email.getText ());
    temp.bdate = new String (def.bdate.getText ());
    temp.comments = new String (def.comments.getText ());
    // Add a new contact item to the names component.
    names.add (temp.lname + ", " + temp.fname);
    // Add the Contact object to the contacts Vector
    // object.
    contacts.add (temp);
    // Make sure that the delete and edit buttons are
    // enabled.
    delete.setEnabled (true);
    edit.setEnabled (true);
    // Destroy the dialog box.
    def.dispose ();
    // Make sure that the first contact item in the names list
    // is highlighted.
    names.select (0);
    // ===========================================================
    // Load all contacts from contacts.dat into the contacts
    // Vector object. Also, make sure that the last name/first
    // name from each contact is combined into a String object and
    // added into the names component - as a contact item.
    // ===========================================================
    private void loadContacts ()
    FileInputStream fis = null;
    try
    fis = new FileInputStream ("contacts.dat");
    DataInputStream dis = new DataInputStream (fis);
    int nContacts = dis.readInt ();
    for (int i = 0; i < nContacts; i++)
    Contact temp = new Contact ();
    temp.fname = dis.readUTF ();
    temp.lname = dis.readUTF ();
    temp.haddress = dis.readUTF ();
    temp.maddress = dis.readUTF ();
    temp.phone = dis.readUTF ();
    temp.wphone = dis.readUTF ();
    temp.cphone = dis.readUTF ();
    temp.email = dis.readUTF ();
    temp.bdate = dis.readUTF ();
    temp.comments = dis.readUTF ();
    names.add (temp.lname + ", " + temp.fname);
    contacts.add (temp);
    if (nContacts > 0)
    delete.setEnabled (true);
    edit.setEnabled (true);
    catch (Exception e)
    finally
    if (fis != null)
    try
    fis.close ();
    catch (Exception e) {}
    // Make sure that the first contact item in the names list
    // is highlighted.
    names.select (0);
    // ========================================================
    // Save all Contact objects from the contacts Vector object
    // to contacts.dat. The number of contacts are saved as an
    // int to make it easy for loadContacts () to do its job.
    // ========================================================
    private void saveContacts ()
    FileOutputStream fos = null;
    try
    fos = new FileOutputStream ("contacts.dat");
    DataOutputStream dos = new DataOutputStream (fos);
    dos.writeInt (contacts.size ());
    for (int i = 0; i < contacts.size (); i++)
    Contact temp = (Contact) contacts.elementAt (i);
    dos.writeUTF (temp.fname);
    dos.writeUTF (temp.lname);
    dos.writeUTF (temp.haddress);
    dos.writeUTF (temp.maddress);
    dos.writeUTF (temp.phone);
    dos.writeUTF (temp.wphone);
    dos.writeUTF (temp.cphone);
    dos.writeUTF (temp.email);
    dos.writeUTF (temp.bdate);
    dos.writeUTF (temp.comments);
    catch (Exception e)
    MsgBox mb = new MsgBox (this, "CM Error",
    e.toString ());
    mb.dispose ();
    finally
    if (fos != null)
    try
    fos.close ();
    catch (Exception e) {}
    private void edit ()
    // Obtain index of selected contact item from the names
    // component.
    int index = names.getSelectedIndex ();
    // If no item was selected, index is -1. We cannot edit
    // a contact if no contact item in the names component was
    // selected - because we would have nothing to work with.
    if (index != -1)
    // Obtain a reference to the Contact object (from the
    // contacts Vector object) that is associated with the
    // index.
    Contact temp = (Contact) contacts.elementAt (index);
    // Create and display an edit entry form.
    DataEntryForm def = new DataEntryForm (this, "edit",
    temp.fname,
    temp.lname,
    temp.haddress,
    temp.maddress,
    temp.phone,
    temp.wphone,
    temp.cphone,
    temp.email,
    temp.bdate,
    temp.comments);
    // If the user pressed Ok...
    if (def.bOk)
    // edit the contact information in the contacts
    // Vector object.
    temp.fname = new String (def.fname.getText ());
    temp.lname = new String (def.lname.getText ());
    temp.haddress = new String (def.haddress.getText ());
    temp.maddress = new String (def.maddress.getText ());
    temp.phone = new String (def.phone.getText ());
    temp.wphone = new String (def.wphone.getText ());
    temp.cphone = new String (def.cphone.getText ());
    temp.email = new String (def.email.getText ());
    temp.bdate = new String (def.bdate.getText ());
    temp.comments = new String (def.comments.getText ());
    // Make sure the screen reflects the edit.
    names.replaceItem (temp.lname + ", " + temp.fname,
    index);
    // Destroy the dialog box.
    def.dispose ();
    // Make sure that the first contact item in the names
    // list is highlighted.
    names.select (0);
    // ========================================================
    // Class: Contact
    // This class describes the contents of a business contact.
    // ========================================================
    class Contact
    public String fname;
    public String lname;
    public String haddress;
    public String maddress;
    public String phone;
    public String wphone;
    public String cphone;
    public String email;
    public String bdate;
    public String comments;
    // ==========================================================
    // Class: DataEntryForm
    // This class provides a data entry form for entering contact
    // information.
    // ==========================================================
    class DataEntryForm extends Dialog implements ActionListener
    // bOk is a boolean flag. When true, it indicates that
    // the Ok button was pressed to terminate the dialog box
    // (as opposed to the Cancel button).
    public boolean bOk;
    // The following components hold the text that the user
    // entered into the visible text fields.
    public TextField fname;
    public TextField lname;
    public TextField haddress;
    public TextField maddress;
    public TextField phone;
    public TextField wphone;
    public TextField cphone;
    public TextField email;
    public TextField bdate;
    public TextField comments;
    public void actionPerformed (ActionEvent e)
    // If the user pressed the Ok button, indicate this
    // by assigning true to bOk.
    if (e.getActionCommand ().equals ("Ok"))
    bOk = true;
    // Destroy the dialog box and return to the point
    // just after the creation of the DataEntryForm object.
    dispose ();
    public DataEntryForm (Frame parent, String title)
    // Call the other constructor. The current constructor
    // is used for add operations. The other constructor
    // is used for edit operations.
    this (parent, title, "", "", "", "", "", "", "", "", "", "");
    public DataEntryForm (Frame parent, String title,
    String fname, String lname,
    String haddress, String maddress,
    String phone,String wphone,
    String cphone,String email,
    String bdate,String comments)
    // Initialize the superclass layer.
    super (parent, title, true);
    // Choose a grid bag layout so that components can be more
    // accurately positioned. (It looks nicer.)
    setLayout (new GridBagLayout ());
    // Add appropriate first name, last name, phone, wphone, and
    // email components to the current DataEntryForm container.
    // (Remember, DataEntryForm is a subclass of Dialog.
    // Dialog is a container. Therefore, DataEntryForm
    // inherits the ability to be a container.)
    addComponent (this, new Label ("First Name: "),0, 0, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.fname = new TextField (20);
    addComponent (this, this.fname, 1, 0, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("edit"))
    this.fname.setText (fname);
    addComponent (this, new Label ("Last Name: "), 0, 1, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.lname = new TextField (20);
    addComponent (this, this.lname, 1, 1, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("edit"))
    this.lname.setText (lname);
    addComponent (this, new Label ("Home Address: "), 0, 2, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.haddress = new TextField (20);
    addComponent (this, this.haddress, 1, 2, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("edit"))
    this.haddress.setText (haddress);
    addComponent (this, new Label ("Mailing Address: "), 0, 3, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.maddress = new TextField (20);
    addComponent (this, this.maddress, 1, 3, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("edit"))
    this.maddress.setText (maddress);
    addComponent (this, new Label ("Home Number: "), 0, 4, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.phone = new TextField (20);
    addComponent (this, this.phone, 1, 4, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("edit"))
    this.phone.setText (phone);
    addComponent (this, new Label ("Work Number: "), 0, 5, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.wphone = new TextField (20);
    addComponent (this, this.wphone, 1, 5, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    if (title.equals ("edit"))
    this.wphone.setText (wphone);
    addComponent (this, new Label ("Cell Number: "), 0, 6, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.cphone = new TextField (20);
    addComponent (this, this.cphone, 1, 6, 1, 1,
    GridBagConstraints.WEST,
    GridBagConstraints.WEST);
    addComponent (this, new Label ("Email Address: "), 0, 7, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.email = new TextField (20);
    addComponent (this, this.email, 1, 7, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    addComponent (this, new Label ("Birth Date: "), 0, 8, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.bdate = new TextField (20);
    addComponent (this, this.bdate, 1, 8, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    addComponent (this, new Label ("Comments: "), 2, 0, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    this.comments = new TextField (20);
    addComponent (this, this.comments, 2, 1, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    addComponent (this, new Label (""), 0, 9, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    addComponent (this, new Label (""), 1, 9, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.WEST);
    Button b;
    // Add an Ok button to this container.
    addComponent (this, b = new Button ("Ok"), 0, -9, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    b.addActionListener (this);
    // Add a Cancel button to this container.
    addComponent (this, b = new Button ("Cancel"), 1, -9, 1, 1,
    GridBagConstraints.NONE,
    GridBagConstraints.CENTER);
    b.addActionListener (this);
    // Set the background of the frame window container to
    // pink (to give a pleasing effect).
    setBackground (Color.pink);
    // Set the size of the dialog window to 250 pixels
    // horizontally by 200 pixels vertically.
    setSize (450, 500);
    // Do not allow users to resize the dialog window.
    setResizable (false);
    // Make sure that the dialog window is visible.
    setVisible (true);
    private void addComponent (Container con, Component com,
    int gridx, int gridy,
    int gridw, int gridh, int fill,
    int anchor)
    // Get the current layout manager. It is assumed to
    // be a GridBagLayout object.
    LayoutManager lm = con.getLayout ();
    // Create a GridBagConstraints object to make it
    // possible to customize component positioning.
    GridBagConstraints gbc = new GridBagConstraints ();
    // Assign the x and y grid positions.
    gbc.gridx = gridx;
    gbc.gridy = gridy;
    // Assign the number of grid blocks horizontally and
    // vertically that are occupied by the component.
    gbc.gridwidth = gridw;
    gbc.gridheight = gridh;
    // Specify the component's resize policy (fill) and
    // the direction in which the component is positioned
    // when its size is smaller than available space (anchor).
    gbc.fill = fill;
    gbc.anchor = anchor;
    // Set the new constraints that the grid bag layout
    // manager will use.
    ((GridBagLayout) lm).setConstraints (com, gbc);
    // Add the component to the container.
    con.add (com);
    // ===========================================================
    // Class: MsgBox
    // This class displays a message box to the user. The message
    // is usually an error message. The user must press the Ok
    // button to terminate the message box.
    // ===========================================================
    class MsgBox extends Dialog implements ActionListener
    public void actionPerformed (ActionEvent e)
    // Terminate the dialog box in response to the user
    // pressing the Ok button.
    dispose ();
    public MsgBox (Frame parent, String title, String msg)
    // Initialize the superclass layer.
    super (parent, title, true);
    // Store the msg argument in a Label object and add
    // this object to the center part of the dialog window.
    Label l = new Label (msg);
    add ("Center", l);
    // Create a Button object and add it to the south part
    // of the dialog window.
    Button b = new Button ("Ok");
    add ("South", b);
    // Make the current object a listener to events that
    // occur as a result of the user pressing the Ok
    // button.
    b.addActionListener (this);
    // Make sure that the Ok button has the focus.
    b.requestFocus ();
    // Do not allow users to resize the dialog window.
    setResizable (false);
    // Allow the layout manager to choose an appropriate
    // size for the dialog window.
    pack ();
    // Make sure that the dialog window is visible.
    setVisible (true);
    ====================END OF CODE =======================

    You should first start by formatting the code before
    posting. I lost my interest as I browsed thorugh the
    code.
    Read here -
    http://forum.java.sun.com/help.jspa?sec=formatting
    ...and its way too much code to expect anyone to read. Post a short excerpt of the part you are having trouble with.

  • Java card confusing Issues!!!!!!! java card architecture, advantage!!!!!

    QUESTION -1
    As I know about architecture of any application is -
                    //normal java software                          java card                                  java card
                      //  1                                               2                                      3
    1-            application program                        host application                           host application
    2-                     JVM                                   Applets                                       Applets
    3-              operating system                JCRE(which contain all classes, JVM ....)                 JCRE(act as a O.S too)
    4                    hardware                              Operating system                                 H/W
    5                                                                        hardwareWhat do u think- case 2 is right? or 3 is!!!!!!!!!!!
    I think - case 3 is right!!!!
    As i study from several sources , JCRE is complete package - it behaves as a operation system and use the functionality of component it contain. I also think if i will purchase a java card from any vendor , it would have JCRE inside it (means everthing inside it,), i only need to develop the applet according to my requirement and install it by on card installer program
    QUESTION 2- what is the advantage of java card.?
    // I think.
    as i read out , i got the line that it is platform independent and support multiple application. applicaton point of
    view , I am agree but how it is platfrom independent. if we use java card for smart card development, then
    i will purchase Java card from differnt vendor , all will provide me card with supported jcre inside it, so why
    this is advantage here?
    // in case of window based application , it really make sense  because if i will make any window application with java
    // i can run it in windows , linux , unix and most of os flavours, here i can see the beauty of java language.
    Clear me this and add some other java card advantages, which make java card goodquestion 3-
    Now I am capaple to make simple applets, so I want to check the entire java card process atleast once before
    going in deep of something, I am thinking to implement prepaid card concept , i made it applet for it ,it will
    contain a page with 2 text box ( 1- for recharge 2- for money deduction ) and two button , with button click i
    want to select the applet and want to pass the apdu.
    ( a) how i can make host window application ? (i think awt will work for me? , *
    i never make any java window application yet) *
    ( b) still i dont have any java card , i want to make it by using simulator, is it possible?
      (c) in this scenario what framework i need to study Ex. Import javacard.framework.* for making
    applet or from where i need to start.Regards:
    rohit pathak
    Edited by: rohit pathak on Feb 9, 2012 10:10 PM

    Hi,
    QUESTION -1
    As I know about architecture of any application is -
    //normal java software                          java card                                  java card
    //  1                                               2                                      3
    1-            application program                        host application                           host application
    2-                     JVM                                   Applets                                       Applets
    3-              operating system                JCRE(which contain all classes, JVM ....)                 JCRE(act as a O.S too)
    4                    hardware                              Operating system                                 H/W
    5                                                                        hardwareWhat do u think- case 2 is right? or 3 is!!!!!!!!!!! If you are using Java Card then JCRE+JVM = OS and if you put this on ein package 3 then 3 is correct according to me.
    As i study from several sources , JCRE is complete package - it behaves as a operation system and use the functionality of component it contain. I also think if i will purchase a java card from any vendor , it would have JCRE inside it (means everthing inside it,), i only need to develop the applet according to my requirement and install it by on card installer program Actually it depends. There can be following models in this regards:
    1. Buy a empty smart card, Install your own OS and then write your applets for it.
    2. As you said, Buy a card with preloaded OS and then write applets for it.
    QUESTION 2- what is the advantage of java card.?
    * Interoperable: Applets developed with Java Card technology will run on any Java Card technology-enabled smart card, independently of the card vendor and underlying hardware.
    * Secure: Java Card technology relies on the inherent security of the Java programming language to provide a secure execution environment. Designed through an open process, the platform's proven industry deployments and security evaluations ensure that card issuers benefit from the most capable and secure technology available today.
    * Multi-Application-Capable: Java Card technology enables multiple applications to co-exist securely on a single smart card.
    * Dynamic: New applications can be installed securely after a card has been issued, enabling card issuers to respond to their customer's changing needs dynamically.
    * Compatible with Existing Standards: The Java Card API is compatible with international standards for smart cards such as ISO7816, or EMV. Major industry-specific standards such as Global Platform and ETSI refer to it.
    * Developers creating Java Card applications enjoy all the advantages of working in the Java programming language:
    Object-oriented programming yields greater code modularity and reusability, leading to higher programmer productivity.
    Protection features characteristic of the Java programming language apply to Java Card applets, enforcing strong typing and protection attributes.
    Powerful off-the-shelf development tools are readily available.
    source: http://java.sun.com/javacard/overview.jsp
    And also, in case of SIM card if you are using java card then RAM is possible and native cards don't have this ability.
    question 3
    Now I am capaple to make simple applets, so I want to check the entire java card process atleast once before
    going in deep of something, I am thinking to implement prepaid card concept , i made it applet for it ,it will
    contain a page with 2 text box ( 1- for recharge 2- for money deduction ) and two button , with button click i
    want to select the applet and want to pass the apdu.
    ( a) how i can make host window application ? (i think awt will work for me? , *You can use swing for this to make interface and use smartcardIO http://docs.oracle.com/javase/6/docs/jre/api/security/smartcardio/spec/javax/smartcardio/package-summary.html for sending APDUs.
    i never make any java window application yet) * It is easy you can look here and start: http://www.roseindia.net/java/example/java/swing/
    ( b) still i dont have any java card , i want to make it by using simulator, is it possible?Actually, smartcardIO will only interact with actuall card and for simulator you will have to use console for sending APDUs.
    (c) in this scenario what framework i need to study Ex. Import javacard.framework.* for making
    applet or from where i need to start.For your current case it is enough and for host app you should study smartcardio as i mentioned above.
    Hope it helps.
    Regards
    Umer

  • ABAP+JAVA STACK STARTING ISSUE a  Work Around

    Dear Users,
    I recently got an issue in duel stack where in Java stack was not coming up. According to the  Trace file i was about to follow the SAP Note: 940893. But everything was fine for me. Then i tried a work around. I started Java first and then after sometime ABAP. It worked for me. Might be useful for others as a work around. If useful make know. If i am wrong again let me know.

    Hi Manjesh,
    Then i tried a work around. I started Java first and then after sometime ABAP. It worked for me.
    It looks like Server has insufficient memory to hold ABAP+ JAVA stack.
    You can think of the following
    1) Reduce the no of WPs in ABAP stack
    2) Reduce the JAVA memory settings to half using configtool
    3) Restart both ABAP and JAVA
    4) Check the results.
    Hope this helps.
    Regards,
    Deepak Kori

  • JSP precompilation and my .java files compilation issues /  building WAR file using ANT

    Hello.
    I am new to working with WAR files and the whole process of it. A little
    background on what we are using. We are using, WLS 6.1 SP3. I am using the
    ant.bat that is supplied in the bin directory of the WLS install.
    I am trying to work with ANT and getting it to build the file. I am making
    progress, but at a point where I am having trouble getting my java code
    files to compile using ant. I am having one issue and looking to do one
    other item.
    1) I would like to precompile the JSPs if possible prior to putting into the
    WAR file. Not sure if this is done or not, but there was a utility when I
    was working with ibm's app server that gave us the ability to do a batch
    complile. Was thinking that maybe a similair concept is possibly here.
    2) Having issue getting ant to compile code properly. In the compile
    section of the build.xml file for ant, I tell it where the source files are,
    and the destionation folder for the compiled class files. I then try to set
    the classpath so that it finds the .jar files that are necessary for my
    source files to complile. But, it won't find them. And not sure how come.
    I may be going about this all wrong, but dont know. Here is the compile
    section of the build.xml I am using:
    <target name="compile" depends="prepare">
    <javac srcdir="classes" destdir="${deploy.home}/WEB-INF/classes"
    classpath="$(lib.home)"
    debug="on" optimize="on" deprecation="off"/>
    </target>
    One note, I've tried many different items in the classpath line, which
    don't work. if I do *.jar it fails at complie time, invalid argument. As
    well as if I use *.* and so on. if I list the explicit file names, it still
    doesn't seem to find them.
    I was wondering if anyone could help, if you need anymore information let me
    know, I can send the entire build.xml if necessary. I may be missing
    items, seeing that this is my first try at using ANT.
    Any help is appreciated and thanks in advance. Hopefully not sounding too
    off the wall. Hopefully get some clarification and understanding.
    Thank you.
    Kevin.

    Kevin Price wrote:
    Hello.
    I am new to working with WAR files and the whole process of it. A little
    background on what we are using. We are using, WLS 6.1 SP3. I am using the
    ant.bat that is supplied in the bin directory of the WLS install.
    I am trying to work with ANT and getting it to build the file. I am making
    progress, but at a point where I am having trouble getting my java code
    files to compile using ant. I am having one issue and looking to do one
    other item.
    1) I would like to precompile the JSPs if possible prior to putting into the
    WAR file. Not sure if this is done or not, but there was a utility when I
    was working with ibm's app server that gave us the ability to do a batch
    complile. Was thinking that maybe a similair concept is possibly here.you can use weblogic.jspc
    http://e-docs.bea.com/wls/docs70/jsp/reference.html#57794
    or just set the precompile flag in weblogic.xml
    You can configure WebLogic Server to precompile your JSPs when a Web
    Application is deployed or re-deployed or when WebLogic Server starts up
    by setting the precompile parameter to true in the <jsp-descriptor>
    element of the weblogic.xml deployment descriptor.
    >
    2) Having issue getting ant to compile code properly. In the compile
    section of the build.xml file for ant, I tell it where the source files are,
    and the destionation folder for the compiled class files. I then try to set
    the classpath so that it finds the .jar files that are necessary for my
    source files to complile. But, it won't find them. And not sure how come.
    I may be going about this all wrong, but dont know. Here is the compile
    section of the build.xml I am using:
    <target name="compile" depends="prepare">
    <javac srcdir="classes" destdir="${deploy.home}/WEB-INF/classes"
    classpath="$(lib.home)"
    debug="on" optimize="on" deprecation="off"/>
    </target>
    maybe because you are not using curly braces there on lib.home??
    if you do it the way above, you would have to list all your jars
    classpath="$(lib.home)\lib1.jar:$(lib.home)\lib2.jar"
    or you can nest
    <javac srcdir="classes" destdir="${deploy.home}/WEB-INF/classes"
    debug="on" optimize="on" deprecation="off">
         <classpath>
              <fileset dir="${lib.home}" includes="*.jar" />
         </classpath>
    </javac>
    One note, I've tried many different items in the classpath line, which
    don't work. if I do *.jar it fails at complie time, invalid argument. As
    well as if I use *.* and so on. if I list the explicit file names, it still
    doesn't seem to find them.
    I was wondering if anyone could help, if you need anymore information let me
    know, I can send the entire build.xml if necessary. I may be missing
    items, seeing that this is my first try at using ANT.
    Any help is appreciated and thanks in advance. Hopefully not sounding too
    off the wall. Hopefully get some clarification and understanding.
    Thank you.
    Kevin.

  • Java.Lang.nullpointerexception issue only isolated to a repository on the job server

    I am having the
    "Java.Lang.nullpointerexception" error message issue only isolated to a repository on the job server.
    This error message appearing when i try to execute or create a new schedule for a job on mgmt console.
    I have few other repositories in the same server, with those repositories i am not having any issues, in terms of executing a job or creating a new schedule.
    Does any one had the similar issue, and know how to resolve it.
    Thanks a lot for the helpful info.

    Hello George / Viacheslav, thks to both for responding.
    BODS is based on 4.0 never was migrated from 3.2
    Under this repository almost 30 jobs currently running with no issues, which were created and scheduled before this error started.
    THis error message started just two months ago, since then it is not allowing any new jobs to be executed or creating any new schedules.
    But all prior jobs are running fine no issues.
    FRom designer i am able to execute with no problem, This issue is only happening on Mgmt console and only in this repository.
    Repository name has no apostrophe, all repsositories have the same style naming convention.
    "BODS_THENAME"
    Here i am pasting the block from viewsoure, where the error is:
     <span nowrap class="viewContext">Repository: BODS_JBROOK</span><table class="viewcontrollerarea" style="height:1"><COLGROUP><COL width="100%"/></COLGROUP><tr><td class="viewcontrollerheaderspacer"></td></tr><tr><td class="viewcontrollerheadertabarea"><table class="viewcontrollertabs"><tr class="viewcontrollertabs"><td class="viewcontrollertabs"><img border=0  src="../images/tab_sel_left.gif"></td><td class="selectedTab" nowrap background="../images/tab_sel_center.gif" ><a class="selectedTab"  href="/DataServices/servlet/AwBatchJobExecute?REPOSITORY_NAME=BODS_JBROOK&GUID=7cb34824-6d1f-42cc-9968-6c69d006ee87&NAME=Job_TestRaghuRepo&HISTORY=%2FDataServices%2Fservlet%2FAwBatchJobHistory%3FREPOSITORY_NAME%3DBODS_JBROOK%26SHOWREPO%3D2%26ACTIVE_VIEW%3DBatch%2BJob%2BConfiguration&ACTIVE_VIEW=Execute+Batch+Job">Execute Batch Job</a></td><td class="viewcontrollertabs"><img border=0  src="../images/tab_sel_right.gif"></td></tr></table></td></tr><tr bgcolor="#7997CD" ><td height="2px" class="viewfont" VALIGN=CENTER width="100%"></td></tr><tr><td class="viewcontrollermain"><div id="tipDiv" class="tipdiv"></div><span class="viewMessage">java.lang.NullPointerException</span><br><span class="viewMessage"> <!-- </span><br><span class="viewMessage">java.lang.NullPointerException at com.acta.repo.AwJobCommandOptions.getDBServerName(AwJobCommandOptions.java:322) at com.acta.repo.AwJobCommandOptions.getConnectionCmd(AwJobCommandOptions.java:388) at com.acta.repo.AwJobCommandOptions.getConnectionCmd(AwJobCommandOptions.java:379) at com.acta.repo.AwJobCommandOptions.validateConnectionInformation(AwJobCommandOptions.java:296) at com.acta.repo.AwJobCommandOptions.init(AwJobCommandOptions.java:168) at com.acta.repo.AwJobCommandOptions.<init>(AwJobCommandOptions.java:91) at com.acta.webapp.admin.report.AwExecuteBatchJobPage.submitAction(AwExecuteBatchJobPage.java:586) at com.acta.webapp.mdreport.common.DIView.doAction(DIView.java:564) at com.acta.webapp.mdreport.common.DIView.PrintReport(DIView.java:406) at com.acta.webapp.mdreport.common.DIViewController.PrintReport(DIViewController.java:84) at com.acta.webapp.mdreport.reportframework.JCActaGenericSection.PrintReport(JCActaGenericSection.java:112) at com.acta.webapp.mdreport.common.DIFrame.PrintReport(DIFrame.java:67) at com.acta.webapp.mdreport.common.DIMainFrame.PrintReport(DIMainFrame.java:98) at com.acta.webapp.mdreport.common.DIBaseReport.PrintMainFrame(DIBaseReport.java:233) at com.acta.webapp.mdreport.common.DIBaseReport.PrintReportImpl(DIBaseReport.java:158) at com.acta.webapp.mdreport.common.DIBaseReport.PrintReport(DIBaseReport.java:269) at com.acta.webapp.admin.servlet.AwBatchJobExecuteServlet.doPostSafe(AwBatchJobExecuteServlet.java:30) at com.acta.webapp.mdreport.reportframework.JSActaHttpServlet.doPost(JSActaHttpServlet.java:359) at javax.servlet.http.HttpServlet.service(HttpServlet.java:637) at javax.servlet.http.HttpServlet.service(HttpServlet.java:717) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.acta.webapp.mdreport.servlet.JSFilter.doFilter(JSFilter.java:71) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at com.acta.webapp.mdreport.servlet.EscapeFilter.doFilter(EscapeFilter.java:52) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298) at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:852) at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588) at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489) at java.lang.Thread.run(Thread.java:619)</span><br><span class="viewMessage"> --></span><br>

  • Java mapping & namespace issue

    Hello,
    I am doing a java mapping from a flat file to an IDOC. After the document is mapped succesfully I call an RFC via the Adapter. When monitoring the adapter I get the error:
    com.sap.aii.af.rfc.RfcAdapterException: failed to read funtionname from XML document: missing namespace declara
    so I added the namespace reference to my java mapping to look like this :
    <ns0:IDOC_INBOUND_ASYNCHRONOUS xmlns:ns0="urn:sap-com:document:sap:rfc:functions">
    But when I test my java mapping in the builder (interface mapping) the namespace xmlns="urn:sap-com:document:sap:rfc:functions" is added to my above ns0:IDOC_INBOUND_ASYNCHRONOUS tag. The consequence is that while mapping in the integration engine the "ns0" prefix is then removed and I get the error:
    Delivery of the message to the application using connection AFW failed, due to: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: functiontemplate from repository was.
    Any help or sample code resolving the namespace issue is welcome.
    Frank

    Hi Frank,
    I am getting the same error message. You fixed yours. Can you help me with mine. The error message is
      " Delivery of the message to the application using connection AFW failed, due to: error while processing message to remote system:com.sap.aii.af.rfc.core.client.RfcClientException: functiontemplate from repository was ."
    I am trying to send data to SAP SRM4.0 from SAP R/3 using SAP XI. XI content is delivered by SAP.
    The message is sent from R/3 to XI successfully and the XML monitor does not show any errors in XI . But the messages does not show up in SRM.
    Thanks
    Kishore.

  • Java IDOC_AAE configuration issue in PI IDOC sender channel and in ECC SM58.

    Dear Experts,
    My configuration scenario is  outbound:   SAP (IDOC)-------->PI------->AS2 ThirdParty.
    SAP PI version: 7.31 dual stack.
    First time i have done IDOC_AAE settings done in ECC and PI NWA with the help of below links.
    http://scn.sap.com/docs/DOC-34155
    http://scn.sap.com/docs/DOC-31398
    While sending the DESADV.DELVRY05 standard idoc from ECC to PI i am getting below error in Sender IDoc channel.
    Could you please help me on this issue ,I will appriciate you .This is very urgent.
    Error in PI IDOC Sender channel : Processing error = Value with name ApplyCntlRecFromPayload not available
    and I are getting below error in SM58 ECC system.
    Error in  ECC SM58: Commit fault: ASJ.ejb.005043 (Failed in component:
    Thanks,
    Aadi

    Hi Aadi,
    Please check the below SAP notes
    1952406 - "Commit fault" error in SM58 transaction when sending IDOC from backend system to PI sender Java IDOC adapter
    1928302 - Possible NullPointerException with IDOC_AAE sender channels processing
    reference - Commit fault: ASJ.ejb.005043 (Failed in component: sap.com/com.sap.aii.ad) while sending to PI system
    also check the link - http://saphelp.me/commit-fault-asj-ejb-005043/
    regards,
    Harish

  • Java IDE Security Issues

    I'm evaluating Java IDE's. My boss wants me to evaluate IDE security issues. I can't think of any issues, or how an IDE can have anything to do with security, but didn't want to sweep it under the rug without asking all of you security experts.
    Are there any security concerns when selecting a Java IDE?

    Yeah, you confirmed what I already knew I suppose.
    Unfortunately, I know nothing if this organization, as
    I'm only consulting. The management here INSISTS that
    security be addressed, but I think it's out of scope
    for Java IDE selection. Thanks!In that context, things like "supports HTTPS and ssh access for remote development" may be exactly what they're looking for. It lets managers say "Yes we considered security in making this purchase, and yes the developers of this tool take security seriously." Doesn't mean that security is ever going to impact the actual use of the product.
    Remember that a portion of any management decision goes to insuring you can show a good-faith effort to avoid problems, when/if they happen down the road and someone's looking for a fall guy...
    Good luck!
    Grant

  • Java and Display Issues in Plus

    Hi everyone
    Please reply whether you have or have not seen any of the following:
    I'm working on a client site where we have some machines working just fine and others are giving corbaserver errors. Copying data from a worksheet into Excel using CTRL-C | CTRL-V does not seem to work for some machines and so they have to use the Copy and Paste buttons. Curiously, when they do this they get an additional empty column whereas on the machines where CTRL-C | CTRL-V works they don't get the blank column.
    The other issue we are seeing is that after a short period of time, Plus stops running the queries automatically. Any change the user makes, such as adding a new item, adding a sort, moving a column position does not take effect until the Refresh button is clicked.
    There is a combination of IE6 and IE7, with all machines being XP with most on SP2 and many on SP3.
    I am suspicious of the XP SP3 when combined with IE7 but would like to know whether anyone else has experienced issues. We are running 10.1.2.3 with CP4 and our Java is Sun 1.6.0_15
    Please reply with either a we are having no problems with this combination or whether you have noticed similar issues. If you have seen issues and got a fix or workaround please let me know. I'm also interested in knowing which combination of Java, Discoverer, operating system and IE works for you.
    Best wishes
    Michael

    Michael,
    Our production server was recently upgraded to 10.1.2.3, CP5 with Java 1.4.2_06. Prior to this upgrade we recommended that users function with I.E. 6.0 and Firefox 2.0. We experienced issues with later browser versions. On my personal workstation I have Windows XP, SP2, I.E. 6.0, Firefox 2.0 and now Java 1.6.0_16. We are now testing the later version of Java on our test OAS. And we are testing out the later browser versions as we speak. The first thing that I would recommend is to add the Java Runtime parameter of -Xmx256M, in the Java Control Panel. I had some session locks prior to my adding this parameter. I am testing access to both servers with Java 6 installed on my workstation. Access to Java 6 performed better after I added the runtime parameters. Access to Java 4 with I.E. gives a warning message and performs very slowly. Mozilla Firefox does to seem to care, no warning and similar performance as Java 6 on the server side. I have not done very much testing with I.E. 7.0 and Firefox 3.0 as of yet with the newer Java version. I am now accessing that environment and it is running very slowly. Part of the issue may be my PC performance but I do not like what I see. Way too slow. This is the browser functionality not the workbook execution time. I added the Java Runtime parameter of
    -Xmx256M and it now performs better.
    I did the Ctrl-C|Ctrl-V with both I.E. and Firefox and did not experience the problem you discribed. I aslo did not encounter the other problems that you reported. We the corbaserver errors in a Discoverer pop-up window, Java Console or OEM session log?
    You may be correct with the SP3 as being at least one of the culprits. I do not have that patch on either workstation so I cannot test for you.
    Jerre

  • Solaris 10 Netscape, Java , (Javascript) JSObject  Issue.

    Hi all,
    I am migrating the source code from solaris 8 wtih CC compiler 4.2 to solaris 10 cc compiler 5.7 on x86 Machine. Most of Problems i got solution from C++ forum so i almost through. But while building one directory that contains some java Applets i got issues:-
    1. Since its using
    import netscape.javascript.JSObject; so it was not getting this JSObject on the latest Solaris 10 Machine. what i did i copied the /outils/netscape/solaris/java_301on solaris 10 Machine from solaris 7 Machine. then i build it again. every thing got build successfully and generated Input.class file but again it gave me following message
    Note: Some input files use unchecked or unsafe operations.
    Note: Recompile with -Xlint:unchecked for details.
    then i tried with -Xlint option and it again bounce me some errors.
    So question here is that on Solaris 10 is there any thing else that i can use for Java Script i.e JSObject if there is no netscape i.e whats the default browser mozillla or netscape. and why java_301 is used and what will happend if i try something else other than java_301. as it was using
    -classpath = /outils/netscape/solaris/java_301
    while doing javac compiling. and other thing i see is
    -classpath /usr/java/lib/classes.zip
    but when i see version of java on solaris 10 there is no classes.zip. whats the use of this.??
    and when i used -Xlint it bounce error with classes.zip not found.

    This forum is about using Sun C++. Your question is about Java. You are more likely to get a helpful answer in java forum.
    Try the java forum:
    http://forum.sun.com/forum.jspa?forumID=8

  • [SOLVED] Java causing startup issues

    Recently I tried to install intellij and since than have had a bunch of Java issues.  After uninstalling intellij and java (since it required jdk and I already had openjdk installed), then reinstalling openjdk the both the mysql and dropbox daemon fail loading.  If I uninstall Java everything is good again.  After having issues with intellij I tried to install Eclipse which also failed.
    Any ideas how I can get Java installed without everything else failing.
    Last edited by iso (2011-04-11 06:41:30)

    I think the issue was due to running out of space in my root partition.  After freeing up some space and re-installing openjdk6 everything started up fine on boot.

  • OSB 3.0(ALSB 3.0) .Java Call out issue

    Hi,
    I have written a Java code that invokes a stored Procedure. I want to use this piece of code in my ALSB 3.0 through Proxy Service Action(Java Callout).This code works fins when I run it as a Standalone Program.
    But when I use this in Java Callout I face an issue.The code runs smoothly till the creation of the Callable Statement.*But after that the Statemant object turns out to be null.*
    I do not see how calling a java method from ALSB 3.) could cause this issue.
    Please help if any one is having any idea on this.
    Edited by: user9980672 on Apr 13, 2009 10:13 PM

    No, it does not take any Input as request.I try to get a standandrad method invocation.
    The code
    import java.sql.CallableStatement;
    import javax.sql.DataSource;
    import java.sql.Connection;
    import javax.naming.InitialContext;
    import javax.naming.Context;
    import java.util.Properties;
    public class TestJavaCallout {
         Context ctx=null;
         DataSource ds=null;
         Connection conn=null;
         CallableStatement stmt=null;
         String name="Test";
         public void callGenevaStoredProcedure()
              System.out.println("Test start");
              try
                   Class.forName("weblogic.jndi.WLInitialContextFactory");
                   Properties prop = new Properties();
              prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,
              "weblogic.jndi.WLInitialContextFactory");
              prop.setProperty(Context.PROVIDER_URL, "t3://localhost:7051");
              prop.put(Context.SECURITY_PRINCIPAL, "weblogic");
              prop.put(Context.SECURITY_CREDENTIALS, "weblogic");
              ctx = new InitialContext(prop);
              ds=(DataSource)ctx.lookup(name);
              conn=ds.getConnection();
              stmt=conn.prepareCall("call TestCall()");
              if (null!=stmt)//Here the stmt is NULL          {
                   stmt.execute();
              System.out.println("Stmt is not null");}
              else
                   System.out.println("Stmt is null");
              catch(Exception e){
                   System.out.println("ErrorIn Catch121::"+e.getMessage());
                   e.printStackTrace();
    public class TestJavaCalloutCall
    public static void call()
    new TestJavaCallout().callGenevaStoredProcedure();
    Edited by: user9980672 on Apr 13, 2009 11:19 PM

Maybe you are looking for

  • Rt justified and left justified in the same line

    Hi Geeks , i need help regarding scripts  i want text to be printed left justified and amount at right justified in same line TAX                                                                           12.000 Total                                  

  • IPOD Clasic (20 gig) B/W screen, Click Wheel won't connect to ITUNES

    Hey, anyone have this problem or any ideas on how to fix it. I have the classic, white, 20 gig IPOD with the black & White screen and click wheel. It does everything fine, except connect to ITUNES. It has all the music previously loaded, it charges f

  • Size in nullLayout from own components

    hi there, I have a null layout JPanel in which the user can add some components. The height and the width of the components are different and can be changed, by setting a text into it and so on..... I add the component by setBound(x, y, 200, 200) x =

  • V100 booting issue

    I am using Hyperterminal from a Windows laptop to connect to the v100 server that's not on the network, but everytime I establish a connection I get the OK prompt. Once at the OK prompt, I issue the boot comand, and solaris 8 boots up correctly from

  • Editing photo in photoshop from lightroom 4

    When in lightroom 4,  selecting a photo and choosing edit in photoshop, sometimes a dialog box opens asking if I want to open original or copy with lightroom edits and sometimes it just opens in photoshop without the options. Anyone know why that is