Why my JDBC UPdate hangs up??

Hi, Sir::
I use following simple JDBC Update program to update my table TEST,
See following code:
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
import java.sql.Statement;
// create table test(Test_ID number, Test_Val varchar(30));
public class Update {
  public static void main(String args[]) {
    Connection con = null;
    if (args.length != 2) {
      System.out.println("Syntax: <java UpdateApp [number] [string]>");
      return;
    try {
      String driver = "oracle.jdbc.driver.OracleDriver";
      Class.forName(driver).newInstance();
      String url = "jdbc:oracle:thin:@localhost:1521:usa";
      con = DriverManager.getConnection(url, "scott", "tiger");
      Statement s = con.createStatement();
      String test_id = args[0];
      String test_val = args[1];
      int update_count = s.executeUpdate("INSERT INTO test (test_id, test_val) "
              + "VALUES(" + test_id + ", '" + test_val + "')");
      s.executeUpdate("UPDATE test SET TEST_VAL= 'John Alan' WHERE TEST_ID=1");
      System.out.println(update_count + " rows inserted.");
      s.close();
    } catch (Exception e) {
      e.printStackTrace();
    } finally {
      if (con != null) {
        try {
          con.close();
        } catch (SQLException e) {
          e.printStackTrace();
           When I run with command:
C:\temp\javaCode>java Update 2 MyTest
It hangs here and did not process, If I remove the statement:
s.executeUpdate("UPDATE test SET TEST_VAL= 'John Alan' WHERE TEST_ID=1");
it works and insert 1 record into Test Table.
What is wrong here??
How to fix it??
Thanks
Sunny

Did you try with another Statement? I would try closing the first statement and creating a new one.
      Class.forName(driver).newInstance();
      String url = "jdbc:oracle:thin:@localhost:1521:usa";
      con = DriverManager.getConnection(url, "scott", "tiger");
      Statement s = con.createStatement();
      String test_id = args[0];
      String test_val = args[1];
      int update_count = s.executeUpdate("INSERT INTO test (test_id, test_val) "
              + "VALUES(" + test_id + ", '" + test_val + "')");
       // close it and create a new one
       s.close();
       s = con.createStatement();
      s.executeUpdate("UPDATE test SET TEST_VAL= 'John Alan' WHERE TEST_ID=1");
Let me know if it works.

Similar Messages

  • Why are my apps hanging when i try and update them? i have the iphone 4 with the new ios 6....

    Why are my Apps hanging and not letting me update them on my phone? the app store has been really slow, and tells me alot of the times that it is unable to connect with the store? I am frustrated and don't know what to do....

    I am trying to do that now but with my computer, this problem is happening as well.... I am able to download a select few of the updates....

  • Why does my system hang on a blank software update screen after I shut down?

    Why does my system hang on a blank software update screen after I shut down the computer?
    This only happened after my computer attempted to download security update 2013-003 version 1.
    I have an iMac with a 2.16 GHz Intel Core 2 Duo running on OSX 10.7.5.
    I repaired all disk permission, and then verified and fixed the disk.
    My hardware diagnostics program gave all systems a green light.
    After all this, the system still hangs.
    This must be an operating system glitch.
    How do I fix it?
    If you tell me to reload the operating system, then I'll have to go retro with Snow Leopard.
    All subsequent updates were purchased from Apple on the Internet and downloaded.

    Cineast wrote:
    If you tell me to reload the operating system, then I'll have to go retro with Snow Leopard.
    All subsequent updates were purchased from Apple on the Internet and downloaded.
    Not so. You use the recovery mode to reinstall Lion. Details in Recovery and About OS X Recovery. Also, see Computers using Internet Recovery.

  • Why is DOT4 Scrubber hanging when I try to install updates?

    After HP Update notified me of 3 pending updates (including a Critical update to correct a PC to printer communications issue) I launched the update. The first of the 3 updates installed successfully, but the second (Critical) update froze in the middle of DOT4 Scrubber processing. I was able to terminate the second update, allowing the third one to install successfully. Shutting down my Zonealarm firewall had no effect on the problem.  I manually downloaded the update (using the link provided) and launched it from my hard drive, but it still won't run to completion. This is apparently a widespread problem, from the comments I've read. Is there a solution? And if so, what is it?
    This question was solved.
    View Solution.

    I can totally relate to your situation, and can understand the import of your description. I don't know why so many are continuing to dwell on the fact that the upgrade failure causes the print service to be stopped, and methods to 'restore' printer function. A simple reboot takes care of that.
    The problem of why the critical update is failing to run to completion remains. And the much more serious problem is the fact that even though complaings of this problem can be seen dating back for some time, I can find no solution offered by HP; not even a suggestion of things to try that might solve the problem. Then, upon visiting the HP support web site, and finding that there are no options to communicate directly with the company, unless you are fortunate enough to have a product that is in warranty, or by paying a support fee, it is exasparating!!
    SHAME on HP for deploying a half-baked 'critical' update that is causing problems for so many users, and then completely dropping the ball. This will certainly stick in my mind if and when I should have occasion to shop for another printer product in the future!!!

  • Proxy to JDBC Update

    Hi Friends,
    I have a issue in proxy to JDBC update. there are onley 4 fileds to be inserted  into table..
    And before inserting the fileds into table i need to check whether the fields are there or not if not insert if they are then update,, i need to check all the four fields. for this..
    Any way to solve this kind of issue..
    Regards
    Vijay

    But what is the need of it?
    In both cases you have to perform some action on database.
    1. If records are there then Update
    2.If records are not present then Insert.
    So if even you check the records prior to sending it to database....you have to do the same(Inster or Update) and UPDATE_INSERT is possible with JDBC rec. adapter.
    Then why you need to check it? Is there any business logic behind it? Or you it was jut for practive purpose?
    Thanks
    Farooq

  • Version 36.0.1 update hangs up after I click "Restart".

    Version 36.0.1 update hangs up after I click "Restart". The Firefox window closes but nothing else happens although I cab see too processes called firefox in Task Manager.

    Hi jscher2000,
    I selected "I'm Feeling Lucky", and now it works ;)
    Thanks for the help
    But I do not understand why FireFox doesn't have this function as standard ....
    reoz

  • 27" imac yosemite update hangs. Required power cycle and safe boot to get the update going. Now all OS X update do the same.

    27" iMac Yosemite update hangs.
    The original upgrade to Yosemite (10.10) took almost a full day! The computer hung during one of the reboots and just showed a blank grey screen, no apple logo, no progress bar, nothing. I left it like that for about an hour thinking it might be working in the dark... Eventually I had to power cycle. Disconnected power at the wall outlet for about 5 minutes, then reconnected and tried to start. After about 20 minutes, got to the same point, grey screen:no action, again waited at least an hour.
    Then I did a safe boot. System came up OK in safe mode to the log in screen. As soon as I logged in, it proceeded with the interrupted update, which ran to completion. Yay!
    Now, every update to Yosemite that arrives gives men the same grief!
    To add some more, the "Pro Video Formats 2.0.1" update has installed about 4 times, and is asking to be installed again? There's no indication that it fails the update so whats going on?

    I saw the set hibernet mode to 0 trick and it failed.  Guess I can try 3 because reinstalling OS X did nothing but cost me another few hours and a little faith in Apple.  Getting annoyed as I see how many people complain of the identical issue and the fixes are variable and random.  Suggests to me that it is a major design flaw in the hardware and Apple got too cute with the just works idea and didn't put a damned power button on the display so there is no manual way to do it and no 'insert a pin here' type trick to reset the thing.
    Asking for a refund tomorrow.  Past the 14 days so maybe they'll say no but if so then every time this happens I will swap it out.  At least then I know it is a three hour fix and as I was working on this for hours today it occurred to me that if the trick is to do 57 different things and maybe one will work then that is not why I made the switch to Apple.  I could plug everything in on my PC and it all 'just worked'.
    Really poor customer service - the support folks are very nice and I am sure they know that this is a systemic issue but aren't allowed to say so.  Feeling pretty stupid for going on faith right about now.

  • JDBC Thread Hangs

    Why would this thread hang? (it was in two consecutive dumps several minutes
    apart).
    "ExecuteThread-61" daemon prio=5 tid=0x7b8450 nid=0x21f waiting for monitor
    entry [0x1e04f000..0x1e04fdc0]
    at
    COM.rsa.jsafe.JA_ParseTransformation.getClassList(JA_ParseTransformation.jav
    a)
    at COM.rsa.jsafe.JSAFE_MessageDigest.getInstance(JSAFE_MessageDigest.java)
    at COM.rsa.jsafe.JSAFE_MessageDigest.getInstance(JSAFE_MessageDigest.java)
    at weblogic.security.provider.MD5.<init>(MD5.java:15)
    at weblogic.security.WLMessageDigest.getInstance(WLMessageDigest.java:60)
    at
    weblogic.security.acl.internal.AuthenticatedUser.digest(AuthenticatedUser.ja
    va:77)
    at
    weblogic.security.acl.internal.AuthenticatedUser.verify(AuthenticatedUser.ja
    va:70)
    at weblogic.security.acl.internal.ClusterRealm.getUser(ClusterRealm.java:76)
    at weblogic.jdbcbase.pool.Driver.connect(Driver.java:143)
    at weblogic.jms.server.JDBCStore.getConnectionNoTx(JDBCStore.java:878)
    at weblogic.jms.server.JDBCStore.purgeMessages(JDBCStore.java:822)
    at weblogic.jms.server.JDBCStore.trigger(JDBCStore.java:625)
    at
    weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
    er.java:205)
    at
    weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
    :199)
    at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:60)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    Thanks,
    Mica Cooper

    Hi. Please post this to the security newsgroup and also email it to
    [email protected] Although triggered by JDBC it's waiting
    for jsafe stuff to return...
    Joe
    Mica Cooper wrote:
    >
    Why would this thread hang? (it was in two consecutive dumps several minutes
    apart).
    "ExecuteThread-61" daemon prio=5 tid=0x7b8450 nid=0x21f waiting for monitor
    entry [0x1e04f000..0x1e04fdc0]
    at
    COM.rsa.jsafe.JA_ParseTransformation.getClassList(JA_ParseTransformation.jav
    a)
    at COM.rsa.jsafe.JSAFE_MessageDigest.getInstance(JSAFE_MessageDigest.java)
    at COM.rsa.jsafe.JSAFE_MessageDigest.getInstance(JSAFE_MessageDigest.java)
    at weblogic.security.provider.MD5.<init>(MD5.java:15)
    at weblogic.security.WLMessageDigest.getInstance(WLMessageDigest.java:60)
    at
    weblogic.security.acl.internal.AuthenticatedUser.digest(AuthenticatedUser.ja
    va:77)
    at
    weblogic.security.acl.internal.AuthenticatedUser.verify(AuthenticatedUser.ja
    va:70)
    at weblogic.security.acl.internal.ClusterRealm.getUser(ClusterRealm.java:76)
    at weblogic.jdbcbase.pool.Driver.connect(Driver.java:143)
    at weblogic.jms.server.JDBCStore.getConnectionNoTx(JDBCStore.java:878)
    at weblogic.jms.server.JDBCStore.purgeMessages(JDBCStore.java:822)
    at weblogic.jms.server.JDBCStore.trigger(JDBCStore.java:625)
    at
    weblogic.time.common.internal.ScheduledTrigger.executeLocally(ScheduledTrigg
    er.java:205)
    at
    weblogic.time.common.internal.ScheduledTrigger.execute(ScheduledTrigger.java
    :199)
    at weblogic.time.server.ScheduledTrigger.execute(ScheduledTrigger.java:60)
    at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:129)
    Thanks,
    Mica Cooper--
    PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
    for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
    We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
    Send resumes to [email protected]

  • Why does JRockit updates lag behind Sun's?

    If I understand correctly, JRockit's class libraries are exactly the same as Sun's.
    Sun has already released update 8 for their 1.5.0 JRE, and JRockit is still at update 6, which means that the class library bugs fixed in update 7 and 8 are still present in JRockit.
    Why does JRockit updates lag behind Sun's? Judging by [url http://forums.bea.com/bea/message.jspa?messageID=600038245&tstart=0]this post, this lag is measured in months!
    Doesn't the VM development happen separate from the class libraries? It should be possible to release a new JRE with the "stable", QA'd JRockit VM and the newest class library (with all its bug fixes) within a week or so, instead of months.

    The class libraries are almost identical, correct. But a JDK update from Sun almost always contains changes in other components than just the class libraries. Some of these affect JRockit, in particular the native libraries (AWT, I/O, etc). Changes in the class libraries may cause performance or stability regressions.
    With every release of JRockit we certify our JDK (Sun classes + JRockit JVM + other components) on a large number of platforms. We did a count earlier this year and came up with around 80 different combinations of JDK level, OS and hardware that we have to test in every release by the end of this year.
    On these platforms we run a huge set of tests, including performance and stress tests. Even though a large part of our QA is automated, it is simply not possible to run everything in parallel so there is a certain minimum amount of time this certification takes. On top of that we have a set of time-consuming tests that have to be run manually.
    To summarize it is simply not possible to do this without some lag. And JRockit has a much quicker uptake than almost all other 3rd party JDK providers (many of them with JVMs based on Sun HotSpot). One example is that it took IBM almost 18 months to get their first J2SE 5.0 implementation out of the door.

  • HT5642 I need to update iOS 6.1.3 on my iPad2 to 6.1.6, due to security issue. Why is no update available? I do NOT want to install iOS 7, due to memory limitations.

    I need to update iOS 6.1.3 on my iPad2 to 6.1.6, due to security issue. Why is no update available? I do NOT want to install iOS 7, due to memory limitations.

    Any upgrade will be to the most recent, compatible version, in this case 7.0.6.

  • Apple Software Update hangs on Windows 7.

    Even after uninstalling iTunes & Apple Software Update, downloading and installing the latest iTunes, still Apple Software Update hangs, see pic:
    There is no freeze, but the spinning icon keeps on spinning forever unless the process is killed ('stop' doesn't work).
    Any insights please?
    Thanks!

    Have you tried to uninstall & reinstall iTunes???
    How to uninstall iTunes in Windows 8 - Microsoft Community
    Then reinstall here: www.apple.com/itunes/download
    Requires the 64-bit installer.
    Hope this helps.

  • SAP XI JDBC update SQL statement

    Hi,
    I am new to JDBC to RFC configuration and is currently on a deadlock.
    We are running a real time JDBC update statement where records are created based on employee login. We have configured the sender adapter to retrieved 5 records for every 5 seconds using the SQL query below:
    select *  from dtable where  uploaded=false order by recordno asc limit 5;
    and update using:
    update dtable set uploaded=true where uploaded=false order by recordno asc limit 5;
    The problem is that when there are only 3 records retrieved in the selection, the update statement always update 5 records back. This makes records created in-between the select and update to be updated as well.
    Can anyone suggest the correct update statement? Can I use the record numbers retrieved from the first statement in the update?
    Thanks,
    Ryan

    Hi,
    >>>>Can anyone suggest the correct update statement?
    1. you have a few choices but one of them would be to use a stored procedure in the select statement (which would have both select and update statements)
    2.
    a) select *  from dtable where  uploaded=false order by recordno
    b) update dtable set uploaded=true where uploaded=false
    c) split them by 5 rows in the mapping (multimapping)
    Regards,
    Michal Krawczyk

  • Why i cannot  update my billing information on itunes

    why i cannot update my billing information on itunes

    How exactly would  anyone in these user to user support forums to know with such limited information?

  • Why is my applet hanging?

    Can anyone give me some insight as to why my applet is hanging? I just get the grey rectangle and no output in the java plugin console as to any kind of errors. I think it may have to do with hte ContentPane in both the main() and init() but I am not sure. I have been struggling with this problem for a couple of days now and I am not sure how to resolve it. Thanks in advance
    import java.awt.*;
    import java.lang.*;
    import java.io.*;
    import java.awt.event.*;
    import javax.swing.*;
    import javax.swing.filechooser.*;
    import javax.swing.event.*;
    import javax.swing.border.*;
    import java.awt.image.*;
    import javax.swing.text.*;
    import com.tpg.base.MileMessages;
    public class BlackBoxUIApplet extends JApplet implements ActionListener{
         public static int WIDTH = 800;
         public static int HEIGHT = 450;
         private boolean inAnApplet = true;
         //public static String TITLE = "Turnpike BlackBoxUI";
         //public static String input;
         Container frameContainer;
         JPanel[] panels = new JPanel[4];
         JMenuBar menuBar = new JMenuBar();
         JMenu fileMenu = new JMenu("File");
         JMenuItem fileExit = new JMenuItem("Exit");
         //Icon openIcon = new ImageIcon("C:\\Dave\\Java Swing\\open.gif");
         JLabel statusLabel = new JLabel();
         //Icon statusIcon = new ImageIcon("flashing_red_button.gif");
         JButton pushButton1 = new JButton("Process File");
         JButton pushButton2 = new JButton("Process Folder");
         JButton pushButton3 = new JButton("One More Button");
         JButton openButton = new JButton("Open a File");
         //JLabel pbLabel = new JLabel("Processing.....");
         JTextArea textArea = new JTextArea(30,90); //rows,cols
         JScrollPane areaScrollPane = new JScrollPane(textArea);          
         JTextField inputFile = new JTextField(32);
         JTextField status = new JTextField(20);
         JTextField status1 = new JTextField(20);
         //JProgressBar pb = new JProgressBar();
         PipedInputStream piOut;
    PipedOutputStream poOut;
         String inputValue;
         MileMessages messages;
         //pb.setIndeterminate(true);
         //to avoid message about system event access
         public BlackBoxUIApplet() throws IOException
              this(true);
         //public BlackBoxUIApplet(boolean inAnApplet)
         public BlackBoxUIApplet(boolean inAnApplet) throws IOException
         //super(TITLE);
         //input = inputValue;
         this.inAnApplet = inAnApplet;
              if(inAnApplet)
                   getRootPane().putClientProperty("defeatSystemEventQueueCheck",
                                                                                              Boolean.TRUE);
                   // Set up System.out
    piOut = new PipedInputStream();
    poOut = new PipedOutputStream(piOut);
                        messages = new MileMessages();
    System.setOut(new PrintStream(poOut, true));
                        // Create reader threads
    new ReaderThread(piOut).start();
         public void init()
         setContentPane(buildGUI());
         //addWindowListener(new WindowHandler());
         fileExit.addActionListener(new MenuItemHandler());
         pushButton1.addActionListener(this);
         pushButton2.addActionListener(this);
         pushButton3.addActionListener(this);
         openButton.addActionListener(this);
         //setupEventHandlers();
         setSize(WIDTH, HEIGHT);
         setBackground(Color.darkGray);
         inputValue = JOptionPane.showInputDialog("Please input your ctxURL: (eg. //localhost:8080/main/InboundXMLServlet)");
         messages.runMilesMessages(inputValue);
         //show();
         public void actionPerformed(ActionEvent e)
              String cmd = e.getActionCommand();
              System.out.println("Command is: " + cmd);
              if(cmd.equals("Process File"))
                   textArea.append("I am processing!" + "\n");
                   System.out.println("ctxURL is: " + inputValue);
                   //status.setText("Currently processing " + inputValue + "....");
              else if(cmd.equals("Open a File"))
                        //final JFileChooser fc = new JFileChooser(new File(System.getProperty("user.dir"))); //goes up two levels from invoking directory
                        //final JFileChooser fc = new JFileChooser("../.."); //goes up two levels from invoking directory
                        final JFileChooser fc = new JFileChooser("../..");
                        fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
                        int returnVal = fc.showOpenDialog(this);
                        if (returnVal == JFileChooser.APPROVE_OPTION)
                             File file = fc.getSelectedFile();
                             inputFile.setText(file.getPath());
              else if(cmd.equals("Process Folder"))
              else if(cmd.equals("One More Button"))
         public Container buildGUI()
              setupMenuBar();
              Container tempContainer = layoutComponents();
              return (tempContainer);
         void setupMenuBar()
              fileMenu.add(fileExit);
              menuBar.add(fileMenu);
              setJMenuBar(menuBar);
         public Container layoutComponents()
              for(int i=0; i<panels.length;++i)
                   panels[i] = new JPanel();
                   panels[0].setBorder(new TitledBorder("Push Buttons"));
                   //panels[0].setBorder(BorderFactory.createEtchedBorder());
                   panels[0].setLayout(new FlowLayout(1, 10, 90)); //center with horz gap of 10 and vert gap of 60
                   //panels[0].setLayout(new BorderLayout());
                   //panels[0].setLayout(new GridLayout(3,1));
                   //use setPreferredSize(Dimension) to change size of each panel
                   //panels[0].setAlignmentX((float) 20);
                   pushButton1.setMargin(new Insets(5,10,5,10));
                   pushButton1.setVerticalTextPosition(AbstractButton.CENTER);
                   pushButton1.setHorizontalTextPosition(AbstractButton.LEFT);
                   pushButton1.setToolTipText("Process a File");
                   pushButton2.setMargin(new Insets(5,10,5,10));
                   pushButton2.setVerticalTextPosition(AbstractButton.CENTER);
                   pushButton2.setHorizontalTextPosition(AbstractButton.LEFT);
                   pushButton2.setToolTipText("Process a Folder");
                   pushButton3.setMargin(new Insets(5,10,5,10));
                   pushButton3.setVerticalTextPosition(AbstractButton.CENTER);
                   pushButton3.setHorizontalTextPosition(AbstractButton.LEFT);
                   pushButton3.setToolTipText("Tip3");
                   //panels[0].add(Box.createVerticalStrut(2));
                   panels[0].add(pushButton1);
                   //panels[0].add(pushButton1, BorderLayout.NORTH);
                   //panels[0].add(Box.createVerticalStrut(2));
                   panels[0].add(pushButton2);
                   //panels[0].add(pushButton2, BorderLayout.CENTER);
                   //panels[0].add(Box.createVerticalStrut(2));
                   panels[0].add(pushButton3);
                   //panels[0].add(pushButton3, BorderLayout.SOUTH);
                   panels[1].setBorder(new TitledBorder("Status"));
                   panels[1].setLayout(new FlowLayout(1,10,60));
                   //panels[1].setBorder(BorderFactory.createEtchedBorder());
                   //panels[1].setLayout(new GridLayout(2,1));
                   status.setEditable(false);
                   status1.setEditable(false);
                   //statusLabel.setIcon(statusIcon);
                   panels[1].add(statusLabel);
                   status.setText("Server is OK.");
                   status1.setText("File is OK.");
                   panels[1].add(status);
                   panels[1].add(status1);
                   //panels[1].add(pbLabel);
                   //pb.setIndeterminate(true);
                   //panels[1].add(pb);
                   //pb.setValue(0);
                   //pb.setStringPainted(true);
                   panels[2].setBorder(new TitledBorder("File Input"));
                   //panels[2].setBorder(BorderFactory.createEtchedBorder());
                   //panels[2].setLayout(new BoxLayout(panels[2], BoxLayout.X_AXIS));
                   panels[2].setLayout(new FlowLayout(1,50,20));
                   //panels[2].setLayout(new GridLayout(1,2));
                   //panels[2].add(Box.createHorizontalStrut(5));
                   panels[2].add(inputFile);
                   //panels[2].add(Box.createVerticalStrut(5));
                   panels[2].add(openButton);
                   //panels[2].add(Box.createHorizontalStrut(15));
                   panels[3].setBorder(new TitledBorder("Output"));
                   //panels[3].setBorder(BorderFactory.createEtchedBorder());
                   panels[3].setLayout(new GridLayout(1,1));
                   textArea.setFont(new Font("Serif", Font.PLAIN, 16));
                   textArea.setMargin(new Insets(5,5,5,5));
                   textArea.setLineWrap(true);
                   textArea.setWrapStyleWord(true);
                   textArea.setEditable(false);
                   areaScrollPane.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS);
                   areaScrollPane.setPreferredSize(new Dimension(50, 50));
                   panels[3].add(areaScrollPane);
                   frameContainer = getContentPane();
                   frameContainer.setLayout(new GridLayout(2,2));
                   //frameContainer.setLayout(new FlowLayout());
                   for(int i=0;i<panels.length;++i)
                        frameContainer.add(panels);
                        //frameContainer.add(Box.createHorizontalStrut(5));
                   return (frameContainer);
         //void setupEventHandlers()
              //addWindowListener(new WindowHandler());
              //fileExit.addActionListener(new MenuItemHandler());
              //pushButton1.addActionListener(new ButtonHandler());
              //pushButton2.addActionListener(new ButtonHandler());
              //pushButton3.addActionListener(new ButtonHandler());
              //openButton.addActionListener(new OpenHandler());
              //inputFile.setActionCommand(textFieldString);
              //inputFile.addActionListener(new TextHandler());
              //cmdField.addAncestorActionListener(new TextAreaHandler());
              //status.addAncestorActionListener(new TextAreaHandler());
         public static void main(String[] args)
              JFrame frame = new JFrame();
              frame.addWindowListener(new WindowAdapter() {
    public void windowClosing(WindowEvent e) {
    System.exit(0);
              try
                   BlackBoxUIApplet app = new BlackBoxUIApplet(true);
              frame.setContentPane(app.buildGUI());
              frame.pack();
              frame.setVisible(true);
              catch (IOException e)
         public class MenuItemHandler implements ActionListener
              public void actionPerformed(ActionEvent e)
                   String cmd = e.getActionCommand();
                   if(cmd.equals("Exit")) System.exit(0);
         class ReaderThread extends Thread {
    PipedInputStream pi;
    ReaderThread(PipedInputStream pi) {
    this.pi = pi;
    public void run() {
    final byte[] buf = new byte[1024];
    try {
    while (true) {
    final int len = pi.read(buf);
    if (len == -1) {
    break;
    SwingUtilities.invokeLater(new Runnable() {
    public void run() {
    textArea.append(new String(buf, 0, len));
    // Make sure the last line is always visible
    textArea.setCaretPosition(textArea.getDocument().getLength());
    // Keep the text area down to a certain character size
    int idealSize = 100000;
    int maxExcess = 500;
    int excess = textArea.getDocument().getLength() - idealSize;
    if (excess >= maxExcess) {
    textArea.replaceRange("", 0, excess);
    } catch (IOException e) {

    I think I figured out why the applet is hanging. It is right after I call messages.MileMessage(inputValue). That method search the drive for a certain file type. the only problem is that I want to repaint the applet after that method is called and I don't understand how the method is called before I input hte "inputValue" variable! Is there any way to stall the method call until after everything is painted and the inputValue is entered? Sorry, but you hve to look to the previous post for the code.
    -Dave

  • Why is Java update asking me to install openoffice?

    I have installed Java jdk 1.6.
    Now the update notification is asking me if I want to install openoffice.
    I am not interested in that kind of notifications. (By the way I already have installed open office)
    There needs to be a differentiation between java updates and other updates (3th party tools). Then I can switch off that kind of notifications.
    I am only interested in Java updates.
    Why is Java update asking me to install openoffice?
    Thanks and regards,
    Cees

    It's probably asking you to update to iOS 8.2, which includes support for the upcoming Apple Watch.

Maybe you are looking for

  • Is Windows Server 2012 compatible with HP Officejet pro 8600 plus printers

    Hello,  I am wondering whether HP officejet pro 8600 plus printers compatible with Windows server 2012 - I have the driver installed on the server and deployed - installation of the driver and all was successful but it won't print from the server or

  • Paragon NTFS for MAC vs HFS for Windows?

    Hey fellas! Which of these 2 would you say it makes more sense to have in a bootcamp environment with a drive exclusively for data storage: NTFS for MAC or HFS for Windows? My setup is drive 1 for both OSs, MAC and WINDOWS, and drive 2 would be then

  • Edits in iPhoto not showing up on file

    I've made some changes using  a few of the edit functions in iPhoto. The changes seem to appear when the photo is displayed in smaller views using the slider, but when I double click on the image, only the original shows up. Are the edits not saved?

  • How can I protect the book in my Ibooks from being deleted?

    I allow my special needs child to use the Ipad for specific apps that promote learning, however, I am afraid he may delete the books I have purchased with my Ibook app. Is there a way to protect the content in my Ibook app from being deleted?

  • Funny reactions to bugs in tpsvrdone (strange Tuxedo behaviour)

    *** SAMPLE *** Try the following funny experiment: 1) Write the tuxedo server which in tpsvrdone crashes somehow. Something like extern "C" void tpsvrdone() char *c = 0; // Let's dump core... *c = 'a'; 2) Boot this server (and specify in tuxconfig RE