Can any one debug the error plz

this is my prg:
import java.io.*;
import java.net.*;
class server
private final static int BUFSIZE = 20;
public static void main(String a[])
try
int port = Integer.parseInt(a[1]);
ServerSocket ss = new ServerSocket(port);
while(true)
Socket s = ss.accept();
InputStream is= s.getInputStream();
DataInputStream dis = new DataInputStream(is);
double value = dis.readDouble();
value *= value;
OutputStream os = s.getOutputStream();
DataOutputStream dos = new DataOutputStream(os);
dos.writeDouble(value);
s.close();
catch(Exception e)
System.out.println("Exception: "+e);
when i execute this program i got the below error
Exception : java.lang.arrayoutofboundsexception : 1
so plz send me the output of the prg

For your string arguments that you pass in when you call the app... java arrays start at 0, so if you are ding this:
myJavaApp myarg
Then you have a[0] and not a[1].
If you do this:
myJavaApp myArg1 myArg2
Then myArg1 is a[0] and myArg2 is a[1].

Similar Messages

  • Can any one Identify the error

    SELECT EXTRACTVALUE(:NEW.REQUEST, '/Message/body'),
    EXTRACTVALUE(:NEW.REQUEST, '/Message/from')
    INTO V_REQUEST, V_MOB
    FROM DUAL;
    SELECT ACC_NUM, RGSTR_FLAG, LL_NUM
    INTO V_ACC_NUM, V_RGSTR_FLAG, V_LL_NUM
    FROM CUST_INFO
    WHERE CUST_MOBILE_NUM LIKE V_MOB;
    ERROR
    ERROR at line 4:
    ORA-01403: no data found
    it works fine when I do
    WHERE CUST_MOBILE_NUM LIKE 505282455;
    Please can someone identify the error.
    thanx.

    REQUEST FIELD
    <message>
    <to>123</to>
    <from>789</from>
    <body>unbill</body>
    <messagenumber>01</messagenumber>
    </message>

  • Can any one share the Oracle Reports 6i Developer demo table scripts?

    Hi,
    I have to learn the Report 6i for my office project, I have installed the report 6i developer but I could not get the Demo CD, can any one share the Scripts for table (viz. Stock, stock_history , indcat ) creation and also the insert script for data population or provide the URLs where I can find the same.
    thanking you in advance.
    regards,
    Sham.

    Hi Denis,
    Thanks for the reply, I have the setup for forms and reports 6i, what i was looking is the script to create the tables used in the
    Oracle® Reports Developer
    Building Reports
    Release 6i
    January, 2000
    Part No. A73172-01
    the table names are stocks, indcat etc, generally these demo script come along with the demo CD provided by oracle as i don't have the CD i am looking for these table creation script. if you have these scripts kindly share the same with me.
    regards,
    Sham.

  • Can any one have the oracle AIA certification dumps

    Hi All,
    can any one have the Oracle AIA certification dumps please provide.
    Thanks,
    Siva

    Hi All,
    can any one have the Oracle AIA certification dumps please provide.
    Thanks,
    Siva

  • Can any one explain the concept of  Hash ( # ),

    Hi All,
    I am generating the report on Billing Cube.. for that cube I have DS 2lis_13_vdhdr, 2lis_13_vditm,
    I am executing the report with characteristics Material , Billing Number and Key Figures Billing Value.
    For Example : I am seeing the report By Material , in last line it is showing Hash ( # ),
    When I am drill down by material by Billing no  with Billing value.
    Now it is showing the billing value agents’ the Billing Number and in the same time it is showing hash for the same Billing Number….
    Eg:       Material     Billing No     Billing Value
         120          199001     400 USD
         122          199002     500 USD
         125          199003     300 USD
         #          199001     000.00
                   199002     000.00
                   199003     000.00
    Can any one explain the concept of  Hash ( # ), and why the Billing No is reputing in Hash..
    I have same problem in other Cubes with other Characteristics …
    <b>How can I permanently Restrict Hash..  my user don’t want to see in report..</b>
    Regards,
    Shaik

    Shaik,
    since the thread in the Business Explorer forum has been marked as answered , I assume that this thread can also be closed as answered ... please assign points and close as answered..
    Arun
    other post
    How can I permanently Restrict Hash..in Query level  ( # )

  • Can any one give the difference

    can any one give the difference
    between normal java class and java bean
    Is every java bean is a java class

    A java bean is a class (always)
    A class does not have to be a java bean:
    For a bean you need to have a no argument constructor
    follow any of the other java bean guidelines/requirements...
    http://java.sun.com/developer/onlineTraining/Beans/index.html

  • Can any one validate the below queries related to temp tablespace

    For Temporary Tablespace Free and Used Space Information, I am using the following query
    SELECT fs.tablespace_name tspace,
    sum(fs.bytes)/(1024*1024) tot_ts_size_MB,
    sum(df.bytes_free)/(1024*1024) free_ts_size_MB,
    sum(df.bytes_used)/(1024*1024) used_ts_size_MB
    FROM dba_temp_files fs,
    (select tablespace_name, bytes_free, bytes_used from v$temp_space_header) df
    WHERE fs.tablespace_name(+) = df.tablespace_name
    GROUP BY fs.tablespace_name;
    For getting how much space is being used by current users, I am using the following query
    SELECT b.tablespace tablespace_name,
    a.sid sid,
    a.username username,
    (b.blocks * c.value)/(1024*1024) Current_Usage
    FROM v$session a, v$sort_usage b,
    (select value from v$parameter where name = 'db_block_size') c
    WHERE a.saddr = b.session_addr;
    Can any one validate, that above queries are right or not?

    Hi,
    1.for first query i think u can also use only v$temp_Space_header to find out
    the required details by
    SELECT tablespace_name, SUM(bytes_used)/1024/1024 "Tot Used Space in MB",
    SUM(bytes_free)/1024/1024 "Tot Free Space in MB"
    FROM V$temp_space_header
    GROUP BY tablespace_name;
    2.http://www.dbazine.com/oracle/or-articles/weeg3
    Thanks
    Kuljeet

  • Can any one wat the below topics means

    hi,
    can any one tell me wats the scope in the below mentioned topics and is it advantageous to work on this.
    SAP Netweaver, post-installation configuration, smoke tests, customer business scenario implementation.
    thanks in advance,
    vinayaka

    Hi
    u have lots of scope for working in SAP netweaver
    SAP NetWeaver provides an open integration and application platform and permits the integration of the Enterprise Services Architecture. You can unify business processes across technological boundaries, integrate applications for your employees as needed, and access and edit simple information easily and in a structured manner.
    SAP NetWeaver is the basis for all SAP solutions on a given hardware. The business applications and the SAP xApps use the key areas of SAP NetWeaver.
    SAP NetWeaver covers the following topics and components:
    1.Security
    2.People Integration:
    - Multi-channel access
    - Portal
    - Collaboration
    3.Information Integration:
    - Business Intelligence
    - Knowledge Management
    - Master Data Management
    4.Process Integration:
    - Integration Broker
    - Business Process Management
    5.Application Platform:
    - Java
    - ABAP
    - Business Services
    - Connectivity
    - DB and OS abstraction
    - SAP Knowledge Warehouse
    6.Life Cycle Management:
    - Customizing
    - Software Change Management

  • Can  any one Resolve this Error

    Hello All,
          i have downloaded  AppleAccordion example and imported in flex builder ide .
          i am getting an error
               Interface method get creatingContentPane in namespace mx.core:IContainer not implemented by class Header.
          i have added flexlib.swc file into my build path.
    Can any one help me.
    thanks
    Raghu.

    Hi,
    I don't know what version of FlexLib is in that source, but it's not latest.
    Download and put latest version of Flexlib to your project.
    http://code.google.com/p/flexlib/

  • Can any one debug this code????

    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    import java.awt.geom.*;
    import java.util.*;
    public class AppletTest2 extends JApplet implements ActionListener,MouseMotionListener,WindowListener{
    JFrame fr = new JFrame("Visual Tool -- Work Flow Editor");
         JPanel panel1 = new JPanel();
         JPanel panel2 = new JPanel();
         JButton sButton = new JButton("Source");
         JButton rButton = new JButton("Redirection");
         JButton dButton = new JButton("Destination");
         JButton connect = new JButton("Connect");
         BasicStroke stroke = new BasicStroke(2.0f);
         int flag = 1 ;
         Vector lines = new Vector();
         JButton sBut,rBut,dBut;
    int x1 = 0 ;
         int y1 = 0 ;
         int x2 = 0 ;
         int y2 = 0;
         int x3 = 0;
         int y3 = 0;
         int i=0;
         int j=0;
         int k=0;
         int l = 100;
    int b = 50;
    public void init(){
              /*********Frame ******************/
    fr.getContentPane().setLayout(new BorderLayout());
         fr.setSize(700,500);
              fr.getContentPane().add(panel1,BorderLayout.CENTER);
              fr.getContentPane().add(panel2,BorderLayout.SOUTH);
              fr.addWindowListener(this);
              /*****************PANEL 1*********************/
              panel1.setLayout(null);
    panel1.setBounds(new Rectangle(0,0,400,400));
              panel1.setBackground(new Color(105,105,205));
    /************************PANEL 2 *************/
              panel2.setLayout(new FlowLayout());
              panel2.setBackground(new Color(105,205,159));
              panel2.add(sButton);
              panel2.add(rButton);
              panel2.add(dButton);
              panel2.add(connect);
              connect.setToolTipText("Use this button after selecting From and To position to connect");
              /***************************LISTENER********************/
    sButton.addActionListener(this);
              rButton.addActionListener(this);
              dButton.addActionListener(this);
              connect.addActionListener(this);
              fr.setVisible(true);     
              fr.setResizable(false);
         } // init clse
    /************************** START METHOD **********************************************/
              public void start(){                                 
                   System.out.println("inside start");
                   paint(panel1.getGraphics());
    /*******************************APPLET METHODS **************************************************/
              public void stop(){}
              public void destroy(){}
    /******************************MOUSE MOTION LISTENERS METHOD*************************************/
              public void mouseMoved(MouseEvent e){System.out.println("moved");}
              public void mouseDragged(MouseEvent e){System.out.println("dragged");}
    /***************************************ACTION EVENT IMPLEMENTAION *******************************/
         public void actionPerformed(ActionEvent e){
              if (e.getSource().equals(sButton)){          
              sourceObject("Source Object");          
              else if (e.getSource().equals(rButton)){          
              redirectionObject("Redirection");
              i = i+1;
              else if (e.getSource().equals(dButton)){
              destinationObject("Destination");
                   j= j+1;
              else if (e.getSource().equals(connect)){
                   System.out.println("am inside connect");                
                   paint(panel1.getGraphics());               
    else if(e.getSource().equals(sBut)){
                   System.out.println("am s button");                
                   x1 = sBut.getX() + l;
                   y1 = sBut.getY() + (b/2);
              else if(e.getSource().equals(rBut)){
                   System.out.println("am r button");               
                   x2 = rBut.getX() ;
                   y2 = rBut.getY()+ b/2;
                   System.out.println("x2 : " + x2 + "y2 :" +y2 );
              else if(e.getSource().equals(dBut)){
                   System.out.println("am d button");                
                   x3 = dBut.getX();
    y3 = dBut.getY()+ b/2;
    } // action close
    /**********************Main **********************************/     
         public static void main(String args[]){
         JApplet at = new AppletTest2();
              at.init();
              at.start();
    /********************my methods starts here *******************/
         public void sourceObject(String name){     
    sBut = new JButton(name);
         panel1.add(sBut);
         sBut.setBounds(new Rectangle(20,208,l,b));     
         sBut.addActionListener(this);
    System.out.println("am inside the source object") ;
         public void redirectionObject(String name){     
         rBut = new JButton(name);
         panel1.add(rBut);
         rBut.setBounds(new Rectangle(290,208,l,b));     
    rBut.addActionListener(this);
    System.out.println("am inside the redirection :" + j) ;
    public void destinationObject(String name){     
         dBut = new JButton(name);
         panel1.add(dBut);     
    System.out.println("am inside the destination object") ;
    if (j == 0)
                   dBut.setBounds(new Rectangle(566,60,l,b));                    
                   System.out.println("am inside the destination:" + j) ;
                   } else if (j == 2)
                        dBut.setBounds(new Rectangle(566,208,l,b));     
                        System.out.println("am inside the destination :" + j) ;
                   } else if (j == 1)
    dBut.setBounds(new Rectangle(566,350,l,b));     
                        System.out.println("am inside the destination :" + j) ;
    dBut.addActionListener(this);
    /* public void connectObject(Object obj1,Object obj2){
    System.out.println("nothing");
    /************************************* PAINT **************************/
    public void paint(Graphics g){
         System.out.println("inside paint");
         Graphics2D g2 = (Graphics2D) g;
         g2.setStroke(stroke);
    if(flag == 1){
    System.out.println("inside flag");
    int np = lines.size();
                        System.out.println(np);
                             for (int I=0; I < np; I++) {                       
         Rectangle p = (Rectangle)lines.elementAt(I);
                             System.out.println("width" + p.width);
                             g2.setColor(Color.red);
                             g2.drawLine(p.x,p.y,p.width,p.height);
                             System.out.println(p.x +"" +""+ p.y + ""+ ""+ p.width+ "" + ""+ p.height);
    flag = -1;
    }else if(flag == -1){
         if(x1 != 0 && y1 != 0 && x2 != 0 && y2 != 0 ){
    // Graphics2D g2 = (Graphics2D) g;
         // g2.setStroke(stroke);
    g2.setColor(Color.red);
         g2.drawLine(x1,y1,x2,y2);
         lines.addElement(new Rectangle(x1,y1,x2,y2));     
         x1 = 0 ;y1 = 0 ;
         x2 = 0 ;y2 = 0 ;
    //     g2.drawLine(100,100,200,200);
    else if (x2 != 0 && y2 != 0 && x3 != 0 && y3 != 0 )
              // Graphics2D g2 = (Graphics2D) g;
                   // g2.setStroke(stroke);
              g2.setColor(Color.green);
                        g2.drawLine(x2,y2,x3,y3);
                        lines.addElement(new Rectangle(x2,y2,x3,y3));
                        x2 = 0; y2 = 0 ;
                        x3 = 0 ; y3 = 0 ;                    
    else if (x1 != 0 && y1 != 0 && x3 != 0 && y3 != 0)
                   //     Graphics2D g2 = (Graphics2D) g;
                   // g2.setStroke(stroke);
                   g2.setColor(Color.red);
                   g2.drawLine(x1,y1,x3,y3);
                        lines.addElement(new Rectangle(x1,y1,x3,y3));                              
                        x1 = 0; y1 = 0 ;
                        x3 = 0 ; y3 = 0 ;                    
    // repaint();
    /********************************WINDOW LISTENER IMPLEMENTATION *****************************/
    public void windowActivated(WindowEvent we) { 
              flag = 1;
              paint(panel1.getGraphics());
    System.out.println("windowActivated -- event 1");
         //start();               
         public void windowClosed(WindowEvent we) {
                                                                System.out.println("windowClosed -- 2");
         public void windowClosing(WindowEvent we){
                                                                System.out.println("windowClosing -- 3");
    public void windowDeactivated(WindowEvent we) {
                                                                     System.out.println("windowDeactivated -- 4");
    public void windowDeiconified(WindowEvent we) {
                                                                     flag = 1;
                                                                     System.out.println("windowDeiconified -- 5");          
                                                                     paint(panel1.getGraphics());           
    public void windowIconified(WindowEvent we) {           
                                                           System.out.println("windowIconified -- 6");
                                                           //paint(panel1.getGraphics());
    public void windowOpened(WindowEvent we) {             
                                                      //     flag = 1;
                                                      //     paint(panel1.getGraphics());
                                                           System.out.println("windowopened -- 7");     
    The problem am facing here is that when i minimize the frame and maximize , my old lines are getting disappared.
    For avoiding that i am storing the old coordinates and
    try to redraw , when maximize.
    but the lines are coming for flash of second and disappearing once again ?
    can any one help?
    thanks all

    You are probably seeing both a window un-iconify AND a window resize.
    Your best bet is to create an off screen buffer update that and then copy it to the screen. Just as you use the appropriate Java2d gc.createCompatibleImage(...) you should be ok. You will never have to worry about loosing your on-screen image again. Using an off screen buffer would also simplify your code as your paint would not have to be so crazy with all of those if(..) else if ... statements.

  • Can any one explain the steps to coinfigure PGP Encryption in B2B

    Hello B2B Guru's,
    Can any one explain how to configure PGP Encryption in B2B  console?
    were to specify path for loading pgp encryption jar in b2b console?
    is it mandatory that PGP Encryption should have class to implement Call out interface?
    which methods we need to implement in Call Out interface?
    Thanks,

    Please refer :
    How to configure Call out in B2B ?

  • Can any one identify the XML error....

    SELECT EXTRACTVALUE(:NEW.REQUEST, '/Message/body'),
    EXTRACTVALUE(:NEW.REQUEST, '/Message/from')
    INTO V_REQUEST, V_MOB
    FROM DUAL;
    SELECT ACC_NUM, RGSTR_FLAG, LL_NUM
    INTO V_ACC_NUM, V_RGSTR_FLAG, V_LL_NUM
    FROM CUST_INFO
    WHERE CUST_MOBILE_NUM LIKE V_MOB;
    ERROR
    ERROR at line 4:
    ORA-01403: no data found
    it works fine when I do
    WHERE CUST_MOBILE_NUM LIKE 505282455;
    Please can someone identify the error.
    thanx.
    REQUEST FIELD
    <message>
    <to>123</to>
    <from>789</from>
    <body>unbill</body>
    <messagenumber>01</messagenumber>
    </message>
    THANX.

    CORRECTION
    <MESSAGE>
    <TO>907</TO>
    <FROM>505282455</FROM>
    <BODY>UNBIL</BODY>
    </MESSAGE>

  • Can any one help remove error message Apple SyncNotifier.exe_entry point not found

    Hi I have a nano ipod and a microsoft computer and every time I boot up the computer I have the above message? which I have to delete off the main screen.
    Can any help me to stop the message coming up ?
    Cheers
    Phil

    Do this: Go to My Computer, then local disk(C:)/Program Files/Common Files/Apple/Apple Application Support then right-click SQLite3.dll file and select copy then go back to the Apple folder then select Mobile Device Support then right-click on the window(not on the files in that folder) and select paste to add that in the folder.
    Hope this solves your problem. It did on mine. It's like the exact error message I had on the iTunesHelper.exe issue and it was solved from the message that was added in the forums by an Apple representative.

  • Can any  one give the solution

    One standard program is copied to zprogram i want to change that report Header(in output screen)Report name:Vendor Age Analysis-Forecasted payment.it will show in output as a report header.

    Hi
    you can do the following steps:
    1) go to se38
    2) type your program name.
    3) select one of  the radio buttons available there " attributes".
    4) click on change.
    5) you will get a screen.
    6) there you can change the title of the program as your wish.
    7) save it and actiavte it.
    8) execute it.
    Hope it is useful if i understood what you need.
    reward points if useful.

  • REGARDING SCRIPTS.... CAN ANY ONE GIVE THE SOLUTION FOR THIS

    I have copied the standard script ML_SERVICE_ENTRY to ZFORM.... in tcode se71 but it has its original lang. - DE and lang - EN , if i get into this ZFORM ...
    in change mode,  the creation of windows, windows allignment and convert original lang. are in disabled mode , here i have to change the window size to add some text , is there any other method to change the language and to get these things in
    enable mode. plz give some solution for this one.

    Hi Mohan,
    While copying itself U have to give the Language in which U want to maintain, else U are supposed login in with the original Language only.
    Regards,
    Mohan
    *Reward if helpful*

Maybe you are looking for

  • IMac 27" with Win7, Apple bluetooth keyboard not connected, STUCK.

    I made a huge (and naive and stupid) mistake and now have an iMac stuck at the Win7 boot screen because it can not find the keyboard. I can't boot it back into OSX either because the keyboard OPT key is not recognized. Here is what happened: My iMac

  • File Location As Criteria In Smart Search

    I'd like to create a smart folder that shows recently opened/created files in my user folder. However, I want to exclude files from my Library folder (various caches, plists, etc.), anything in my Dropbox folder, and anything in my iPhoto Library. I

  • App Store Reports Lion is installed when it is not...

    I purchased OS X Lion from the App Store. I have downloaded it and went to install. The installation failed. I ended up erasing my drive and reinstalling Snow Leopard and then re-downloaded Lion from the App Store.  It was ready to install, however F

  • How i can use "wake on lan" with time capsule

    1. Preference -> Energy Saver -> Options -> WOL check 2. in airport utility internet>nat>defalt host check 3.and I'd send magic packet. but it doesn't work How i can wake on my mac through time capsule.

  • Warranty of my macbook

    why my macbook is coming in blue color please tell me the solution as soon as possible