Expert with hp-ux

i have an app that has to run on a hp-ux machine but i get the following message when i run my app
Unable to initialize threads: cannot find class java/lang/Thread
here is my shell that start the app
JAVA="/opt/java/bin/java"
BINDIR="/usr/fritz/bin/cse/"
BASEDIR="/opt/java/lib/"
cd $BINDIR
CLASSES="$BASEDIR;$BINDIR;$BINDIR/Parser.jar;"
$JAVA -classpath $CLASSES com.fritz.cold.server.Server
echo "Cold search engine started"
i need to know if i<m doing something wrong here
if someone already worked with hp-ux please tell me it supports threads ( i can barely imagine it would'nt)

This article: http://java.sun.com/docs/books/tutorial/ext/basics/load.html talks about how the JRE finds classes.
1. rt.jar, i18n.jar: java.lang.Thread is in rt.jar. rt.jar is not on your classpath, but I believe that it is located via the JAVA_HOME environment variable. (On my system rt.jar is at $JAVA_HOME/jre/lib.)
2. jar files in lib/ext: These are not on your classpath either, and again, they are located via JAVA_HOME. (On my system lib/ext is $JAVA_HOME/jre/lib/ext.)
3. classes and jar files in your classpath. If you're putting classes on your classpath, you need to list the directory in which those classes reside, e.g. /home/myusername/dev/lib/classes. If you're putting jar files on your classpath, you need to list each and every jar file, e.g. /opt/inprise/vbroker/lib/vbjorb.jar.
HTH!

Similar Messages

  • How do you get your experts with negative stance for new things / innovations to HANA

    We have over 50 ABAP developer (senior experts). Primarily we develop in the old core module (SD, MM, FI, CO, HR, PP, CS, IH, PS) on ERP systems / business suite.
    We have three groups of developer:
    Group 1: They can’t await to work on new architectures – they’re open for all and have fun to work as a pioneer and dig in the deep of the system
    Group 2: For this developer it’s all the same – for this people it’s not a problem to go to a other architectures
    Group 3: They have no interest
    to work in new architectures
    to spend time to learn new things
    they are very closed for new things
    they have for all topics bad statements
    I am part of the group 1. In my opinion in the IT it’s normal to spend much time at new topics in free time to keep up to date. New topics / innovative things make the developer job very exciting. For me it’s regular process – and that’s my own passion .
    Since two month we have our own HANA system in our data centre as play field :-) (business suite on SAP HANA). I’ve some colleagues who made the HANA certification – and we made the first steps in our system. For group 1 and group 2 everything is okay and they’ve fun .
    We have problems with the group 3. They find every hair in the soup – they spend very much time to search arguments against HANA. That’s our “negative group” . We copied our SAP System to a new system and made a technical migration. Now they compare the SAP System, which is based on an oracle datebase, with the new SAP System which is based on a HANA System. They go through the standard ERP process (offer / order / purchase order / goods movements / delivery / MM invoice / SD invoice / material master data / customer master data / vendor master data / conditions / financial bookings / etc.). They main argument is, that they can’t see a grow up of the performance / the added value of the invest / etc. Our other problem is that the group of this people have experience over 20 years in ABAP developing – and their opinion have a high weight. The other arguments: IBM and oracle are working on similar architectures – and we can hold on on the open sqlsyntax / on the present coding.
    Have you similar problems to get the acceptance of group 3?
    Have you tips / tricks for us?
    Have you ideas for catching the group 3?
    What standard components are really optimized for HANA?
    In which standard components can we see a really performance grow up?
    There are standard use cases to see the differences?
    Which data volume do we need in the data model to see the differences?
    What can we do to take the group 3 with us?
    How can we open the group 3 for innovations?

    Hi,
    Please find my reply below.
    1. Have you similar problems to get the acceptance of group 3?
    In IT world we have similar groups. Only results help this group3. I would suggest showcasing on results.
    2. Have you tips / tricks for us?
    As you mentioned in your email, you already have HANA System to play with. So I would suggest looking at high performance transactions like MRP run and FICO Month-end Close.
    3. Have you ideas for catching the group 3?
    SAP has few use cases. Take-up these use cases build data models and use in ERP.
    4. What standard components are really optimized for HANA?
    Recently in our organization we replaced database from DB2 with HANA. Now our SAP ECC is running on HANA. Straight away we have seen 30% of performance improvement in all the transactions. SAP is providing optimized SAP Transactions and there is significant performance improvement and SAP Road Map clearly talks about providing more optimized SAP Transactions on top of HANA to its customers.
    We tried to push some of our high performance code to DB layer by creating the Data Models and using those views in SAP ABAP Programs or Transactions. This gave us significant performance improvement.
    Please refer to below document. This has list of standard optimized transactions.
    Link
    5. In which standard components can we see a really performance grow up?
    This blog throws light on following high performance transactions.
    Link
    6. There are standard use cases to see the differences?
    Use Case
    7. Which data volume do we need in the data model to see the differences?
    MRP run transaction has huge performance issue you can work on MRP Run data model.
    8. What can we do to take the group 3 with us?
    Only Proof of Concepts (POC) results will help to take this group.
    9. How can we open the group 3 for innovations?
    As per your email, I feel group 3 is most demotivated group. I would suggest to talk to each individual and understand there areas of interest and try to put them in their areas of interest. As per my experience this will give good results.
    -VJ.

  • Meet The Expert with Joe Ambeault only 15 minutes left!!!

    Hi, Everybody!
    Just wanted you to know Joe will be here live on this Meet The Expert board for 15 more minutes and then will be back at 8:00PM EDT to chat with you some more!
    Thank you for the great participation!

    Thanks for meeting with us, Joe!

  • Meet The Expert with Pat Smith (Self-Service Technologies) at 11:00 AM and 8:00 PM EDT Today!

    Hi, Everyone,
    Please be sure to stop by for the Meet The Expert session with Pat Smith at 11 AM and 8:00 PM EDT Today!
    http://forums.verizon.com/t5/Meet-The-Expert/bd-p/meettheexpert

    MelleMel wrote:
    I want to eliminate my home phone. Can I still have internet access without a home phone line.
    Hi MelleMel - Sorry to hear that you are interested in disconnecting your home phone.  In most cases you can have access to Verizon High Speed Data services through either our HSI or FiOS data services.  It will depend on the area you live in.
    You should also be aware that if you disconnect your phone that you might lose double bundle promotions that you might be recieving.
    I would suggest that you call 1-800-Verizon and one of our friendly reps will be able to help you select the package that best meets your needs.
    Finally, if you decide to disconnect your home phone services please be sure to check out Verizon Wireless.

  • Meet The Expert with Pat Smith (Self-Service Technologies) at 11:00 AM and 8:00 PM EDT

    Hi, Everyone,
    Please be sure to stop by for the Meet The Expert session with Pat Smith at 11 AM and 8:00 PM EDT Today!
    http://forums.verizon.com/t5/Meet-The-Expert/bd-p/meettheexpert
    Thank You!

    MelleMel wrote:
    I want to eliminate my home phone. Can I still have internet access without a home phone line.
    Hi MelleMel - Sorry to hear that you are interested in disconnecting your home phone.  In most cases you can have access to Verizon High Speed Data services through either our HSI or FiOS data services.  It will depend on the area you live in.
    You should also be aware that if you disconnect your phone that you might lose double bundle promotions that you might be recieving.
    I would suggest that you call 1-800-Verizon and one of our friendly reps will be able to help you select the package that best meets your needs.
    Finally, if you decide to disconnect your home phone services please be sure to check out Verizon Wireless.

  • Group Expert with DateTime?

    Post Author: triley142
    CA Forum: General
    I am trying to do an analysis of certain events, we'll call them 'alarms', grouped first by day. As subgroups, I would like only the alarms that occurred from 11:00am to 11:59am, 12:00pm - 12:59pm, and 1:00pm to 1:59pm. My goal is to use the count of each time frame per day to find the day/hours with the highest number of alarms. I would like to display this in graphical format. So basically the format we're looking at is... <RH> ALARM REPORT<PH>     Date            TimeFrame                   Alarm<GH1>    8/1/2007<GH2>                        11:00am - 11:59am<D>                                                                        alarm1                                                                                alarm2                                                                                alarm3<GF2>                                                                    Count: 3<GH2>                12:00pm - 12:59pm<D>                                                     alarm4                                                                            alarm5<GF2>                                                                    Count: 2 etc... The main problem I'm having is using the DateTime stamp effectively.  My attempt was to create two formula fields using the CDate and CTime function to convert the datetime field to a date field and a time field. This didn't work in multiple ways. The time_formula_field (having no date associated with it) would just show up all in the first Date Group. The second (and i don't know why this is) the groups in the group tree pane would be incorrect (let's say the first date parameter i passed in the query was 8/2/2007, the first (and only) date shown on the group tree pane would be 8/1/2007. Has anyone else ran into a problem like this and found ways around it? Does anyone see a way I could use a SQL Expression field, formulas, etc. do get around it?Using SQL 2000, Windows XP and Crystal Reports XIThanks!    

    You say:  "Suddenly, Group Expert does not want to see any new formulas"
    I take that to mean this used to work(?).
    If that is the case, see if doing a repair on CRVS2010 will help - perhaps even repair on VS2010...(?).
    Ludek
    Follow us on Twitter http://twitter.com/SAPCRNetSup
    Got Enhancement ideas? Try the [SAP Idea Place|https://ideas.sap.com/community/products_and_solutions/crystalreports]
    PS. Umm, just in case - check that there is no folder called c:\temp. if there is, rename it.

  • Using Highlighted Expert With Formula (i.e. 'Insert Summary')

    I'm trying to compare the summary of a value (via formula (let's call it 'formula A' ) that uses the 'Insert Summary' option in Crystal Reports) with the value that is in a table.  The formula does not show in the list of available fields (i.e. in the 'Item editor' section for 'Value of') of 'Highlight Expert'.  So, I used 'Other Fields ...' (which took me to 'Choose Field').  I found the field (as a Group#1 total), so I set it up to compare this Group #1 total for 'formula A' to 0.00.  I then tried to create logic in formula 'A' which currently does what it supposed to do, but it states that 'A formula cannot refer to itself, either directly or indirectly."  How can I refer to the value and flag (i.e. 'crRed' - 'Conditional Formatting Function') the value if they are different.  Thanks  ! ! !

    I found another way to compare these two (2) values.  It is outlined below:
    1.  Right click on the value
    2.  Select 'Format Field . . .'
    3.  Select 'Font' tab
    4.  Create the formula (As shoen below)
    If {Region.Commission_Amt} <> {@Commission Amount} Then crRed;
    Now, my problem is that any value after the decimal point that does not end with a '00', '05', '50' is flag in red.  I tried rounding, but it did not solve the problem.  Since I can't see the actual values, I don't know what is causing this.  Any ideas ?

  • Optimizing a program (experts with a lot of time)

    The following code is most of the code for a sale program. This is something i have been working on for a while now and it's almost finished. It does work, and with no errors that I have found so far, but it seems too complicated and long. I am asking that some of you more experienced programmers take a look at it and give me some advice or tips. It's quite a bit of code, so you don't have to look at all of it, just whatever you see.
    This is the super class. It will soon be a full Log In for cashiers but right now it is just has two buttons for running the other two classes. It contains the open and save file methods that the others use to open the inventory file.
    /** Java core packages*/
    import java.util.*;
    import java.text.*;
    import java.awt.*;
    import java.awt.event.*;
    /** Java extension packages*/
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.io.*;
    /** This program is used to calculate the sale price
    * of selected items and update the inventory with
    * each sale. It opens and saves into a file "inventory.dat".
    * @author Davin Green
    public class LogIn extends JFrame
        /** JTextField objects for the text fields that are used in these programs.*/
        public JTextField jTextField1, jTextField2, jTextField3,
                           jTextField4, jTextField5, jTextField6;
        /** JButton objects for the buttons that are used in these programs.*/
        public JButton jButton1, jButton2, jButton3, jButton4,
                        jButton5, jButton6, jButton7;
        /** JScrollPane object for the scrolling pane that is used in this program.*/
        public JScrollPane jScrollPane1, jScrollPane2;
        /** Label objects for the labels that are used in these programs.*/
        public Label label1, label2, label3, label4,
                      label5, label6, label7;
        /** Vector objects for the three vectors that are used in these programs.*/
        public Vector id, qty, price, saleItems, saleItemsQty;
        /** JList object for the list of Items from vector id used in this program.*/
        public JList jList1;
        private double salePrice;
        /** Document objects for the three text fields that are used in this program.*/
        public Document jText1, jText2, jText3;
        /** DeciamlFormat object used to format display of money.*/
        private DecimalFormat toMoney;
        /** ObjectInputStream object for later inputing a stream.*/
        private ObjectInputStream objectInput;
        /** ObjectOutputStream object for later outputing a stream.*/
        private ObjectOutputStream objectOutput;
        private static LogIn window;
        public static void main( String args[] )
          window = new LogIn();
          window.setSize(450, 400);
          window.show();
        public LogIn()
            /** Get JFrames content pane and set layout to null.*/
            Container container = getContentPane();
            container.setLayout( new FlowLayout() );
            jButton1 = new JButton();
            jButton1.setText("Inventory Editor");
            container.add(jButton1);
            jButton2 = new JButton();
            jButton2.setText("Make Sale");
            container.add(jButton2);
          jButton1.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               Inventory inventory = new Inventory();
               inventory.runInventory();
               window.hide();
               window = null;
          jButton2.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               Computer computer = new Computer();
               computer.runComputer();
               window.hide();
               window = null;
        public LogIn( String title )
          super( title );
        /** The openFile() method opens inventory.dat and saves it's information into three vectors.*/
        public void openFile() throws IOException, ClassNotFoundException
          Item item;
          toMoney = new DecimalFormat( "0.00" );
          id = new Vector();
          qty = new Vector();
          price = new Vector();
         try {
              int i = 0;
              /** Opens file inventory.dat and saves data into buffer.*/
              try {
                objectInput = new ObjectInputStream( new FileInputStream( "C:/inventory.dat" ) );
              catch ( FileNotFoundException fnfException )
                objectOutput = new ObjectOutputStream( new FileOutputStream( "C:/inventory.dat" ) );
                objectOutput.close();
                objectInput = new ObjectInputStream( new FileInputStream( "C:/inventory.dat" ) );
                JOptionPane.showMessageDialog( null, "Inventory file has been created.", "File Created", JOptionPane.INFORMATION_MESSAGE );
              while ( true )
                /** Reads one item object from inventory.dat.*/
                item = ( Item ) objectInput.readObject();
                String idString = item.getID();
                String qtyString = "" + item.getQty();
                String priceString = "" + toMoney.format (item.getPrice());
                id.add( i, idString );
                qty.add( i, qtyString );
                price.add( i, priceString );
                i++;
          /** Closes file when end of file is reached.*/
          catch ( EOFException eofException )
             objectInput.close();
        /** The Method exitForm() sets what to do when window is closed.*/
        public void saveFile() throws IOException
         /** Makes file inventory.dat.*/
         objectOutput = new ObjectOutputStream( new FileOutputStream( "C:/inventory.dat" ));
         /** Saves three vectors as objects of the Item class into inventory.dat.*/
         for ( int i = 0; i < id.size(); i++ )
         String idString = (String)id.get(i);
         int qtyInt = Integer.parseInt( (String)qty.get(i) );
         double priceDouble = Double.parseDouble( (String)price.get(i) );
         Item item = new Item( idString, qtyInt, priceDouble );
         objectOutput.writeObject( item );
         /** Closes inventory.dat.*/
         objectOutput.close();
    }This is the computer class. It is used to calculate sale prices and print the reciept for each sale. It does everything it's supposed to except update the inventory, which I just haven't written the code for yet.
    /** Java core packages*/
    import java.util.*;
    import java.text.*;
    import java.awt.*;
    import java.awt.event.*;
    /** Java extension packages*/
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.io.*;
    /** This program is used to calculate the sale price
    * of selected items and update the inventory with
    * each sale. It opens and saves into a file "inventory.dat".
    * @author Davin Green
    public class Computer extends LogIn
        private double salePrice;
        private JTextArea jTextArea1;
        private Choice choice1;
        private JSeparator jSeparator1;
        private static Computer window;
        /** Default constructor.*/
        public Computer()
          super("Sale Program");
          try{
            try {
              openFile();
              createGUI();
              registerCompEventHandlers();
              salePrice = 0.0;
            catch ( ClassNotFoundException e )
          catch ( IOException e )
        /** The createGUI() methods creates and displays GUI components in the JFrame.*/
        private void createGUI()
            jList1 = new JList();
            saleItems = new Vector();
            saleItemsQty = new Vector();
            /** Get JFrames content pane and set layout to null.*/
            Container container = getContentPane();
            container.setLayout(null);
            choice1 = new Choice();
            makeChoiceMenu();
            container.add(choice1);
            choice1.setBounds(40, 50, 130, 20);
            jButton1 = new JButton();
            jButton1.setText("Add Item");
            container.add(jButton1);
            jButton1.setBounds(270, 50, 130, 20);
            jButton2 = new JButton();
            jButton2.setText("Remove Item");
            container.add(jButton2);
            jButton2.setBounds(270, 80, 130, 20);
            jButton2.setEnabled( false );
            jButton3 = new JButton();
            jButton3.setText("Print Reciept");
            container.add(jButton3);
            jButton3.setBounds(270, 110, 130, 20);
            jButton3.setEnabled( false );
            jButton4 = new JButton();
            jButton4.setText("New Sale");
            container.add(jButton4);
            jButton4.setBounds(270, 140, 130, 20);
            jButton4.setEnabled( false );
            jButton5 = new JButton();
            jButton5.setText("Change Cashier");
            container.add(jButton5);
            jButton5.setBounds(410, 240, 130, 20);
            jButton6 = new JButton();
            jButton6.setText("Edit Inventory");
            container.add(jButton6);
            jButton6.setBounds(410, 270, 130, 20);
            jButton7 = new JButton();
            jButton7.setText("Edit Qty");
            container.add(jButton7);
            jButton7.setBounds(100, 80, 100, 20);
            jButton7.setEnabled( false );
            jScrollPane1 = new JScrollPane();
            jTextArea1 = new JTextArea();
            container.add(jScrollPane1);
            jScrollPane1.setBounds(10, 190, 390, 100);
            jScrollPane2 = new JScrollPane();
            jScrollPane2.getViewport().add( jList1 );
            container.add(jScrollPane2);
            jScrollPane2.setBounds(410, 40, 130, 190);
            jSeparator1 = new JSeparator();
            container.add(jSeparator1);
            jSeparator1.setBounds(10, 40, 390, 10);
            jTextField1 = new JTextField();
            jTextField1.setEditable(false);
            jTextField1.setText("Cashier Name");
            container.add(jTextField1);
            jTextField1.setBounds(60, 10, 170, 20);
            jTextField2 = new JTextField();
            jTextField2.setEditable(false);
            jTextField2.setBounds(240, 10, 80, 20);
            jTextField3 = new JTextField();
            jTextField3.setEditable(false);
            DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT);
            jTextField3.setText(dateFormat.format(new Date()));
            container.add(jTextField3);
            jTextField3.setBounds(330, 10, 70, 20);
            jTextField4 = new JTextField();
            jTextField4.setText("");
            container.add(jTextField4);
            jTextField4.setBounds(60, 80, 30, 20);
            jText1 = jTextField4.getDocument();
            jTextField5 = new JTextField();
            jTextField5.setText("$0.00");
            container.add(jTextField5);
            jTextField5.setBounds(100, 140, 100, 20);
            jTextField6 = new JTextField();
            jTextField6.setEditable(false);
            jTextField6.setText("$0.00");
            container.add(jTextField6);
            jTextField6.setBounds(100, 110, 100, 20);
            label1 = new Label();
            label1.setText("Cashier");
            container.add(label1);
            label1.setBounds(10, 10, 48, 20);
            label2 = new Label();
            label2.setText("Item");
            container.add(label2);
            label2.setBounds(10, 50, 28, 20);
            label3 = new Label();
            label3.setText("Selected Item");
            container.add(label3);
            label3.setBounds(410, 20, 90, 20);
            label4 = new Label();
            label4.setText("Reciept");
            container.add(label4);
            label4.setBounds(10, 170, 50, 20);
            label5 = new Label();
            label5.setText("Quantity");
            container.add(label5);
            label5.setBounds(10, 80, 50, 20);
            label6 = new Label();
            label6.setText("Amount Paid");
            container.add(label6);
            label6.setBounds(10, 140, 80, 20);
            label7 = new Label();
            label7.setText("Sale Price");
            container.add(label7);
            label7.setBounds(10, 110, 60, 20);
            pack();
        /** The method registerEventHandlers() sets what each GUI object does.*/
        private void registerCompEventHandlers()
          ActionListener al = new ActionListener(){
                DateFormat fmt = DateFormat.getTimeInstance(DateFormat.SHORT);
                public void actionPerformed(ActionEvent evt) {
                    jTextField2.setText(fmt.format(new Date()));
            new javax.swing.Timer(1000, al).start();
            getContentPane().add(jTextField2);
            SwingUtilities.invokeLater(new Runnable(){
                public void run() {
          /** Sets program to call method exitForm() when window is closed.*/
          addWindowListener( new WindowAdapter()
                               public void windowClosing(WindowEvent evt)
                                 try {
                                   saveFile();
                                   System.exit(0);
                                 catch ( IOException ioException )
          /** Tells what to do when an item is selected on the drop down menu.*/
          final ItemListener choiceListener;
          choice1.addItemListener(
           choiceListener = new ItemListener()
             public void itemStateChanged( ItemEvent event )
               boolean itemNotExist = true;
               for ( int i = 0; i < saleItems.size(); i++ )
                 if ( choice1.getSelectedItem() == (String)saleItems.get( i ) )
                   itemNotExist = false;
                   jList1.setSelectedIndex( i );
                   jTextField4.setText( (String)saleItemsQty.get( i ) );
               if ( itemNotExist == true )
                 jTextField4.setText( "" );
               jButton1.setEnabled( itemNotExist );
               jButton7.setEnabled( false );
          /** When an item is selected, the items information is
           * displayed in the corresponding text field.*/
          jList1.addListSelectionListener(
           new ListSelectionListener()
             public void valueChanged( ListSelectionEvent event )
              if ( event.getSource() == jList1 && !event.getValueIsAdjusting() )
               int selection = 0;
               String selectionQty;
               try {
                 for ( int i = 0; i < choice1.getItemCount(); i++ )
                   if ( choice1.getItem(i) == jList1.getSelectedValue() )
                     selection = i;
                 selectionQty = (String)saleItemsQty.get( jList1.getSelectedIndex() );
                 choice1.select( selection );
               catch ( ArrayIndexOutOfBoundsException aoobException )
                selectionQty = "";
               jTextField4.setText( selectionQty );
               jButton1.setEnabled( false );
               jButton2.setEnabled( true );
               jButton3.setEnabled( true );
               jButton4.setEnabled( true );
               jButton7.setEnabled( false );
          /** Listens to jTextField and detects changes. */
          jText1.addDocumentListener(
            new DocumentListener()
              public void changedUpdate(DocumentEvent e)
                if ( saleItems.size() > 0 )
                  for ( int i = 0; i < saleItems.size(); i++ )
                    if ( choice1.getSelectedItem() == (String)saleItems.get( i ) )
                      jButton1.setEnabled( false );
                      if ( jTextField4.getText() != saleItemsQty.get( i ) )
                        jButton7.setEnabled( true );
                      else
                        jButton7.setEnabled( false );
                else
                  jButton1.setEnabled( true );
                  jButton7.setEnabled( false );
              public void insertUpdate(DocumentEvent e)
                if ( saleItems.size() > 0 )
                  for ( int i = 0; i < saleItems.size(); i++ )
                    if ( choice1.getSelectedItem() == (String)saleItems.get( i ) )
                      jButton1.setEnabled( false );
                      if ( jTextField4.getText() != saleItemsQty.get( i ) )
                        jButton7.setEnabled( true );
                      else
                        jButton7.setEnabled( false );
                else
                  jButton1.setEnabled( true );
                  jButton7.setEnabled( false );
              public void removeUpdate(DocumentEvent e)
                if ( saleItems.size() > 0 )
                  for ( int i = 0; i < saleItems.size(); i++ )
                    if ( choice1.getSelectedItem() == (String)saleItems.get( i ) )
                      jButton1.setEnabled( false );
                      if ( jTextField4.getText() != saleItemsQty.get( i ) )
                        jButton7.setEnabled( true );
                      else
                        jButton7.setEnabled( false );
                else
                  jButton1.setEnabled( true );
                  jButton7.setEnabled( false );
          /** When "Add Item" button is clicked, a new element
           *  is added to each vector.*/
          jButton1.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               String quantity = jTextField4.getText();
               jTextField4.setText( "" );
                try{
                 for ( int i = 0; i < id.size(); i++ )
                  if ( (String)id.get(i) == choice1.getSelectedItem() )
                    salePrice += ( Double.parseDouble( (String)price.get(i) ) * Double.parseDouble( quantity ) );
                 String newPrice = "$" + salePrice;
                 saleItems.add( choice1.getSelectedItem() );
                 saleItemsQty.add( quantity );
                 jList1.setListData( saleItems );
                 jScrollPane2.revalidate();
                 jScrollPane2.repaint();
                 jTextField6.setText( newPrice );
                 jButton1.setEnabled( false );
                catch ( NumberFormatException num )
                  JOptionPane.showMessageDialog( null, "Please enter a valid quantity!", "Error", JOptionPane.ERROR_MESSAGE );
                jList1.setSelectedIndex( saleItems.size() - 1 );
          /** When "Remove" button is clicked, the selected item is removed
           * from all vectors.*/
          jButton2.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               try {
               int selection = jList1.getSelectedIndex();
                 for ( int i = 0; i < id.size(); i++ )
                  if ( (String)id.get(i) == choice1.getSelectedItem() )
                   salePrice -= ( Double.parseDouble( (String)price.get(i) ) * Double.parseDouble( (String)saleItemsQty.get( selection )  ) );
                 String newPrice = "$" + salePrice;
                 saleItems.removeElementAt( selection );
                 saleItemsQty.removeElementAt( selection );
                 jList1.setListData( saleItems );
                 jScrollPane2.revalidate();
                 jScrollPane2.repaint();
                 jTextField6.setText( newPrice );
                 if( selection >= id.size() )
                  selection = id.size() - 1;
                 jList1.setSelectedIndex( selection );
               catch ( ArrayIndexOutOfBoundsException exception )
                 JOptionPane.showMessageDialog( null, "Please select an item to remove!", "Error", JOptionPane.ERROR_MESSAGE );
               if ( saleItems.size() == 0 )
                 jButton2.setEnabled( false );
               else
                 jButton2.setEnabled( true );
          /** When "Set Qty" button is clicked, the quantity of
           * the selected item is changed to the integer in
           * the qty text field.*/
          jButton7.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               int selection = jList1.getSelectedIndex();
               String newQty = jTextField4.getText();
               try {
                 int numbertest = Integer.parseInt( newQty );
                 for ( int i = 0; i < id.size(); i++ )
                  if ( (String)id.get(i) == choice1.getSelectedItem() )
                   salePrice -= ( Double.parseDouble( (String)price.get(i) ) * Double.parseDouble( (String)saleItemsQty.get( selection )  ) );
                   salePrice += ( Double.parseDouble( (String)price.get(i) ) * Double.parseDouble( newQty ) );
                 String newPrice = "$" + salePrice;
                 saleItems.set( selection, choice1.getSelectedItem() );
                 saleItemsQty.set( selection, newQty );
                 jScrollPane2.revalidate();
                 jScrollPane2.repaint();
                 jTextField6.setText( newPrice );
                 jButton7.setEnabled( false );
               catch ( NumberFormatException badinput )
                 JOptionPane.showMessageDialog( null, "Please enter an integer!", "Error", JOptionPane.ERROR_MESSAGE );
          /** When "Print Reciept" button is clicked, the price of
           * the selected item is changed to the double in
           * the price text field.*/
          jButton3.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               try{
               String reciept = "\tStore Name";
               String items = "";
               String temp = jTextField5.getText();
               String amountPaidString = "";
               double amountPaid = 0.0;
               double change;
               for ( int i = 1; i < temp.length(); i++ )
                 char a = temp.charAt(0);
                 char b = temp.charAt(i);
                 if ( a == '$' )
                   amountPaidString += b;
                 else
                   amountPaidString = "Error";
               amountPaid = Double.parseDouble( amountPaidString );
               if (amountPaid >= salePrice)
               change = amountPaid - salePrice;
               reciept += "\nDate: " + jTextField3.getText()
                 + "\t\tTime: " + jTextField2.getText()
                 + "\nCashier: " + jTextField1.getText()
                 + "\n\n\tItems:";
               for ( int i = 0; i < saleItems.size(); i++ )
                 items += "\n" + saleItems.get( i ) + "\t\t$";
                 for ( int h = 0; h < id.size(); h++ )
                  if ( (String)id.get(h) == (String)saleItems.get( i ) )
                    items += ( Double.parseDouble( (String)price.get(h) ) * Double.parseDouble( (String)saleItemsQty.get(h) ) );
               reciept += items + "\n\nTOTAL:\t$" + salePrice
                 + "\nAmount Paid:\t$" + amountPaid
                 + "\nChange:\t$" + change; 
                 jTextArea1.setText( reciept );
                 jScrollPane1.getViewport().add( jTextArea1 );
                 jScrollPane1.revalidate();
                 jScrollPane1.repaint();
                 jButton1.setEnabled( false );
                 jButton2.setEnabled( false );
                 jButton3.setEnabled( false );
                 jButton7.setEnabled( false );
                 jTextField4.setEditable( false );
                 jTextField5.setEditable( false );
                 choice1.removeItemListener( choiceListener );
               else
                 JOptionPane.showMessageDialog( null, "Amount Paid is not enough!", "Error", JOptionPane.ERROR_MESSAGE );
               catch ( NumberFormatException badinput )
                 JOptionPane.showMessageDialog( null, "Please enter a valid amount paid!", "Error", JOptionPane.ERROR_MESSAGE );
          jButton4.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               int select = 3;
               select = JOptionPane.showConfirmDialog( null, "Are you sure you want quit this sale?" );
               if (select == 0)
                 String[] run = {"xxx","yyy"};
                 window.hide();
                 main( run );
          jButton5.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               /* Code for what to do when "Change Cashier" button is clicked*/ /*
          jButton6.addActionListener(
           new ActionListener()
             public void actionPerformed( ActionEvent event )
               Inventory inventory = new Inventory();
               try{
               saveFile();
               catch ( IOException e )
               window.hide();
               inventory.runInventory();
               window = null;
        private void makeChoiceMenu()
          for ( int i = 0; i < id.size(); i++ )
            choice1.add( (String)id.get( i ) );
        /** The main method.*/
        public static void runComputer()
            window = new Computer();
            window.setSize(555, 335);
            window.show();
    }This is the inventory class. It's used to make and edit the items in the inventory and then save them into the inventory file.
    /** Java core packages*/
    import java.util.*;
    import java.text.*;
    import java.awt.*;
    import java.awt.event.*;
    /** Java extension packages*/
    import javax.swing.*;
    import javax.swing.text.*;
    import javax.swing.event.*;
    import java.io.*;
    /** This program displays the inventory of a store and
    * allows user to edit each items name, quantity, and
    * price. It opens and saves into a file "inventory.dat".
    * @author Davin Green
    public class Inventory extends LogIn
        private static Inventory window;
        /** Default constructor.*/
        public Inventory()
          super("Inventory Editor");
          try{
            try{
            openFile();
            createInvGUI();
            registerInvEventHandlers();
            catch ( IOException e )
          catch ( ClassNotFoundException e )
        /** The createGUI() methods creates and displays GUI components in the JFrame.*/
        private void createInvGUI() throws IOException
            /** Get JFrames content pane and set layout to null.*/
            Container container = getContentPane();
            container.setLayout(null);
            /** List of items displayed in scrolling pane.*/
            jList1 = new JList( id );
            /** Put JList into the scrolling pane, add scrolling pane
             * to content pane, and set position and size.*/
            jScrollPane1 = new JScrollPane();
            jScrollPane1.getViewport().add( jList1 );
            container.add(jScrollPane1);
            jScrollPane1.setBounds(0, 0, 210, 370);
            /** Button for adding a new item.*/
            jButton1 = new JButton();
            jButton1.setText("Add Item");
            container.add(jButton1);
            jButton1.setBounds(240, 10, 90, 30);
            /** Button for deleting a selected item.*/
            jButton2 = new JButton();
            jButton2.setText("Delete");
            container.add(jButton2);
            jButton2.setBounds(290, 50, 90, 30);
            /** Button for setting the quantity of an item.*/
            jButton3 = new JButton();
            jButton3.setText("Set Qty");
            container.add(jButton3);
            jButton3.setBounds(240, 100, 90, 30);
            /** Button for setting the price of an item.*/
            jButton4 = new JButton();
            jButton4.setText("Set Price");
            container.add(jButton4);
            jButton4.setBounds(240, 150, 90, 30);
            /** Text field for inputing and displaying the id (name) of an item.*/
            jTextField1 = new JTextField();
            container.add(jTextField1);
            jTextField1.setBounds(340, 10, 93, 30);
            jText1 = jTextField1.getDocument();
            /** Text field for inputing and displaying the quantity of an item.*/
            jTextField2 = new JTextField();
            container.add(jTextField2);
            jTextField2.setBounds(370, 100, 43, 30);
            jText2 = jTextField2.getDocument();
            /** Text field for inputing and displaying the price of an item.*/
            jTextField3 = new JTextField();
            container.add(jTextField3);
            jTextField3.setBounds(370, 150, 43, 30);
            jText3 = jTextField3.getDocument();
            /** Displays "Qty" before the quantity text field.*/
            label1 = new Label();
            label1.setText("Qty");
            container.add(label1);
            label1.setBounds(350, 100, 20, 20);
            /** Displays "Price" before the price text field.*/
            label2 = new Label();
            label2.setText("Price");
            container.add(label2);
            label2.setBounds(340, 150, 30, 20);
            /** Button to change cashier (return to cashier log-in panel).*/
            jButton5 = new JButton();
            jButton5.setText("Change Cashier");
            container.add(jButton5);
            jButton5.setBounds(260, 270, 130, 30);
            /** Button to make sell (open make sell panel).*/
            jButton6 = new JButton();
                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                    

    /** JTextField objects for the text fields that are used in these programs.*/
    public JTextField jTextField1, jTextField2, jTextField3,
                    jTextField4, jTextField5, jTextField6;Your variable names don't mean anything.
    So the person who has to maintain this program when you leave has a difficult task.
    If there was some indication that the operator would key in (say) a quantity, that would
    make it easier. You might name it "quantityText" in that case, or something like that.

  • Need help from experts with process of printing Payroll Checks in-House

    Appreciate any information on below issues please.
    We upgraded from 4.0 to 4.7
    1. For some reason 10 Direct Deposit advises get destroyed and need to be reprint only those 10, instead of whole 2000
    2. Is there a way to change payment method (T-C without modifying IT 0009, used report RPTTKM40 for this in 4.0 version) for certain people and pay thru DME
    3. Do you print 401K/Deferred Comp % on remuneration statement as ANZHL is no more populated in payroll cluster after 4.7?  If Yes how do you get the ANZHL values.

    I am not sure if this would be a fix for you, but a glimmer of hope shines from this link,
    http://www.friday.com/bbum/2006/02/20/recovering-disk-images-with-diskwarrior/

  • Help me with a little thing, Hope you are expert with this.

    OK Guys Watch this and tell me what's going on with that.
    https://www.youtube.com/watch?v=RCMp12DpSiY
    Thanks you for your help!!!

    You've managed to set up Finder to display hidden files.
    The .ds store file is an index. It's created automatically and will always be there. Deleting it will only result in it being re-created automatically by the OS. If you don't want to be bothered with it, then undo whatever you did to get it to display in the first place.

  • Meet The Expert with Ann Shaub is now open.

    Ann Shaub, Director of Home Monitoring and Control,  is here to talk with you and answer all your questions about our upcoming Home Monitoring and Control product and show how Verizon is helping to make your life easier.

    MelleMel wrote:
    I want to eliminate my home phone. Can I still have internet access without a home phone line.
    Hi MelleMel - Sorry to hear that you are interested in disconnecting your home phone.  In most cases you can have access to Verizon High Speed Data services through either our HSI or FiOS data services.  It will depend on the area you live in.
    You should also be aware that if you disconnect your phone that you might lose double bundle promotions that you might be recieving.
    I would suggest that you call 1-800-Verizon and one of our friendly reps will be able to help you select the package that best meets your needs.
    Finally, if you decide to disconnect your home phone services please be sure to check out Verizon Wireless.

  • Who is the expert with Synchronized keyword?

    I have searched this forum regarding how synchronized behaves, and have found many posts with conflicting information.
    I have a servlet that calls a separate synchronized method from within the doGet method.
    What I want to know is: when one thread is executing the synchronized method, will other threads still be able to run doGet concurrently, as long as they do not need to invoke the synchronized method?
    Or when one thread enters the synchronized method, will all other threads stop what they are doing if they are already executing doGet, until the other thread is finished with it?
    I don't see how synchronized can lock an entire class, when 2 threads already may be executing within the class.

    No, the sychonized block or method only affects thos ho actually need to acquire the same monitor. Other threads of control invoking doGet() but who don't need to concurrently call mySynchronizedMethod() will NOT be blocked or disturbed in any way.
    Of course two threads of control could enter mySynchronizedMethod() concurrently if they are called against a separate instance of your servlet and the method is not static. This may be correct behavior.
    Oh, and how could there be two instances of your servlet? Well the container is in control of that. Generally speaking there would be a single one unless your servlet implements SingleThreadModel in which case the container usually maintains a pool of some (usually configurable) size of instances of your servlet and chooses one for each request coming in to its service() method.
    Chuck

  • Learn about NI TestStand from the experts with the NI TestStand Advanced Architectu​re Series

    The NI TestStand Advanced Architecture Series consists of documents covering topics of interest to advanced NI TestStand developers. The series' authors are NI TestStand architects and developers who provide insightful content that goes beyond basic documentation by offering best practices for large and complex projects. The series will release new documents quarterly so check back to see what's new in a few months!
    Follow the link to visit the NI TestStand Advanced Architecture Series.
    Josh W.
    Certified TestStand Architect
    Formerly blue

    Hello J.Venkatesh,
    You should have posted a new post rather than attach it to this post.  Other than TestStand, it has no relation to Tables in Reports.
    Have you looked at some previous post such as the link below
    http://forums.ni.com/ni/board/message?board.id=330​&message.id=3528&query.id=73853#M3528
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • "Meet The Expert" with Lorena Mcallister Next Session 8:00 PM EST

    Thank you for everyone's participation in "Round 1".  Lorena will be back at 8:00PM EST to answer some additional questions.
    In the meantime, your fellow members have helpful advice on the Email Board.

    Sounds like good reasons to me!

  • If you are a expert with domains please read more!

    Ok lets say i get a yahoo domain. But as we know if you get a domain other than .mac you will not get some really good features!
    Is there a way to have a domain name and keep my .mac account
    like typing in the domain name and it transfering it to my .mac address
    but it will hide the .mac address and say the domain name?
    I WILL REMEMBER THAT I WILL PRESS SOLVED IF YOU ANSWER THIS!

    Great suggestion, Apnewbie

Maybe you are looking for