Graphics2D / Swing Density Issues

Hi all,
I'm relativley new to coding in java and first time posting in the forums so please be gentle.... I am writing a program that will work in unison w/ a graph drawing algorithm that was written in C. Java does the drawing and my C code does the calculations. The problem seems to be that my GUI when dealing with very large dense graphs starts to lag like crazy (long delay when buttons / menus are clicked). At first i thought it was constantly repainting the graph which would cause a lag but that does not seem to be the case. Can the graphics2d library just not handle something like a dense graph (like over 100,000 lines drawn to represent the edges)? Or have i fouled up my code. If you'd like, here is a link to it, it's not terribly complex (like i said, i'm new):
http://www.rpi.edu/~boceke/Drawer.java
Perhaps i'm going about drawing huge graphs in an inefficent way, like using a library i shouldn't be, and if that's the case please let me know what library i should be using to draw really dense graphs.
Thanks much in advance,
-Eli

Just running this code, it takes about 1.5 - 2 seconds to draw 100,000 lines from random numbers. There's 2 versions, one which generates random numbers each time thru the loop, one that generates them before painting. Either case, the results are the same, so that tells me that painting that much is really slow.
My only thought is that maybe somehow you can lessen what actually needs to be drawn. How you can do that, I don't know... I suppose it depends on the data.
import java.awt.*;
import javax.swing.*;
import java.util.*;
public class Draw extends JPanel {
     public static void main(String[] args) {
          JFrame f = new JFrame();
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          f.getContentPane().add(new Draw());
          f.pack();
          f.setSize(500, 500);
          f.setVisible(true);
     private Random r = new Random();
     public void paintComponent(Graphics g) {
          System.out.println("start " + System.currentTimeMillis());
          g.setColor(Color.black);
          g.fillRect(0, 0, getSize().width, getSize().height);
          g.setColor(Color.yellow);
          int size = 100000;
          int x1, y1, x2, y2 = 0;
          for(int j = 0; j < size; j++) {
               x1 = r.nextInt(400) + 50;
               y1 = r.nextInt(400) + 50;
               x2 = r.nextInt(400) + 50;
               y2 = r.nextInt(400) + 50;
               g.drawLine(x1, y1, x2, y2);
          System.out.println("end " + System.currentTimeMillis());
import java.awt.*;
import javax.swing.*;
import java.util.*;
public class Draw extends JPanel {
     public static void main(String[] args) {
          JFrame f = new JFrame();
          f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
          f.getContentPane().add(new Draw());
          f.pack();
          f.setSize(500, 500);
          f.setVisible(true);
     private static int size = 100000;
     private static int[] X1 = new int[size];
     private static int[] Y1 = new int[size];
     private static int[] X2 = new int[size];
     private static int[] Y2 = new int[size];
     private static Random r = new Random();
     static {
          for(int i = 0; i < size; i++) {
               X1[i] = r.nextInt(400) + 50;
               Y1[i] = r.nextInt(400) + 50;
               X2[i] = r.nextInt(400) + 50;
               Y2[i] = r.nextInt(400) + 50;
     public void paintComponent(Graphics g) {
          System.out.println("start " + System.currentTimeMillis());
          g.setColor(Color.black);
          g.fillRect(0, 0, getSize().width, getSize().height);
          g.setColor(Color.yellow);
          for(int j = 0; j < size; j++) {
               g.drawLine(X1[j], Y1[j], X2[j], Y2[j]);
          System.out.println("end " + System.currentTimeMillis());
}

Similar Messages

  • Swing Timer issues on a faster machine.

    Hi everyone,
    I'm having some trouble using Swing Timers. I have built a system which uses three javax.swing.Timers, these are as follows:
    timerLeft = new Timer(timerDelay, new ActionListener() {
    public void actionPerformed(ActionEvent evt)
    {if(pathPointerLeft==leftCyclePoints.length) {
    pathPointerLeft=0;
    leftHandX=leftCyclePoints[pathPointerLeft][0];
    leftHandY=leftCyclePoints[pathPointerLeft][1];
    pathPointerLeft++;
    jugglingPanel.repaint();
    timerRight = new Timer(timerDelay, new ActionListener() {
    public void actionPerformed(ActionEvent evt) {
    if(pathPointerRight==rightCyclePoints.length) {
    pathPointerRight=0;
    rightHandX=rightCyclePoints[pathPointerRight][0];
    rightHandY=rightCyclePoints[pathPointerRight][1];
    pathPointerRight++;
    jugglingPanel.repaint();
    myApp.timerBalls = new Timer(myApp.timerDelay, new ActionListener() {
    public void actionPerformed(ActionEvent evt){
    for(int i=0;i<myApp.ballCycleVector.capacity();i++){
    myApp.ballPoints = (int[][])myApp.ballCycleVector.elementAt(i);
    if(myApp.startAnimatingBall){
    if(myApp.ballPoints[myApp.pathPointerBalls][2]==1 && myApp.transitionDone){
    for(int j=0;j<200;j++) {
    if(myApp.ballPoints[myApp.pathPointerBalls][2]!=1) {
    break;
    myApp.pathPointerBalls++;
    if(lastLocationX==myApp.ballPoints[myApp.pathPointerBalls][0] && lastLocationY==myApp.ballPoints[myApp.pathPointerBalls][1]) {
    myApp.pathPointerBalls++;
    if(myApp.pathPointerBalls!=myApp.ballPoints.length) {
    myApp.ballLocations[0]=myApp.ballPoints[myApp.pathPointerBalls][0];
    myApp.ballLocations[1]=myApp.ballPoints[myApp.pathPointerBalls][1];
    lastLocationX= myApp.ballPoints[myApp.pathPointerBalls][0];
    lastLocationY = myApp.ballPoints[myApp.pathPointerBalls][1];
    } else{
    myApp.pathPointerBalls=0;
    for(int j=0;j<200;j++) {
    if(myApp.ballPoints[myApp.pathPointerBalls][2]!=1) {
    break;
    myApp.pathPointerBalls++;
    if(myApp.pathPointerBalls!=0 && myApp.ballPoints[myApp.pathPointerBalls-1][2]==1) {
    myApp.pathPointerBalls++;
    myApp.ballLocations[0]=myApp.ballPoints[myApp.pathPointerBalls][0];
    myApp.ballLocations[1]=myApp.ballPoints[myApp.pathPointerBalls][1];
    lastLocationX= myApp.ballPoints[myApp.pathPointerBalls][0];
    lastLocationY = myApp.ballPoints[myApp.pathPointerBalls][1];
    myApp.pathPointerBalls++;
    if(myApp.pathPointerBalls==myApp.ballPoints.length) {
    myApp.pathPointerBalls=0;
    if(myApp.pathPointerBalls!=0 && myApp.ballPoints[myApp.pathPointerBalls][2]==0 && myApp.ballPoints[myApp.pathPointerBalls-1][2]==1) {
    myApp.transitionDone=true;
    myApp.jugglingPanel.repaint();
    Apologies if these do not coform to standard coding conventions. When I run these on my home PC (P4 2.56GHz, 512MB RAM, 64MB Graphics) it runs beautifully. The same on a laptop (P3 1.8GHz, 512MB RAM, 64MB Graphics card). However, when I run it on the campus machines (3.20GHz, 1.5GB RAM, 128MB Graphics), the animated display (as controlled by the Timers above) stutters and does not remain in sync. I'm guessing that this is because it is being ran on a faster machine. Could anyone suggest a solution to this problem so that the animation remains in sync for a faster machine, or even suggest another reason why this problem is occuring. This is a very important project and I really need to resolve this issue. Thanks in advance.

    The code you posted means nothing:
    a) it is not readable, since you didn't use the "Code Formatting Tags" when you posted the code
    b) its not executable, so we can't see what it is attempting to do.
    c) we don't know the frequency of event firing
    Obviously a faster machine will be able to repaint Components faster then slower machines.
    I use a 3.3Ghz machine and my TimerAnimation example here seems to keep in sync:
    http://forum.java.sun.com/thread.jspa?forumID=57&threadID=631379

  • Client Density Issue

    Hello.
    I'm fairly new to the whole Cisco WLC system so this may be a more simple question than I realise.
    We are having an issue with some laptops dropping on and off the WLAN while sat on peoples desks not roaming anywhere.  I can see that some APs have Load profile failed.  Looking in the docs is says that client density may have been exceeded.  The AP in question has 12 clients attached however I read that the 1130's should be able to handle 24 clients.  Is there a setting on the WLC that limits each AP to 12 users?
    Also is there a way to identify the AP by making its light flash for example via the WLC?
    Thanks in advance
    Paul

    Hi Paul,
    In the WLC there is a feature called aggressive load balancing:
    http://www.cisco.com/en/US/docs/wireless/controller/7.0/configuration/guide/c70ccfg.html#wp1085099
    This cannot enforce a limit in the number of clients associating through an AP, but it can influence the client to choose a different AP.
    If the client is "sticky" and keeps trying to associate through the same AP (up to 11 times as a max.), it will eventually be allowed.
    To identify an AP, we can make its leds blink at the same time through the following commands on the WLC:
    debug ap enable
    debug ap command "led flash "
    Regards,
    Fede
    If  this helps you and/or answers your question please mark the question as  "answered" and/or rate it, so other users can easily find it.

  • Please help: RMI and Swing/AWT issue

    Hi guys, I've been having a lot of trouble trying to get a GUI application to work with RMI. I'd appreciate any help. Here's the story:
    I wrote a Java application and its GUI using Netbeans. In a nutshell, the application is about performing searches. I am now at the point where I need exterior programs to use my application's search capabilities, thus needing RMI. Such exterior programs are to call methods currently implemented in my application.
    I implemented RMI, and got the client --> server communication working. However, the GUI just breaks. It starts outputting exceptions, gets delayed, doesn't update properly, some parts of it stop working.... basically hysterical behavior.
    Now take a look at this line within my server class:
    Naming.rebind("SearchProgram", mySearchProgram);
    If I take it out, RMI obviously does not work... but the application and its GUI work flawlessly. If I put it in, the RMI calls work, but the GUI's above symptoms occur again. Among the symptoms are null pointer exceptions which all look similar, are related to "AWT-EventQueue-0", and keep ocurring. Here's just snippet of the errors outputted:
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.plaf.metal.MetalScrollBarUI.getPreferredSize(MetalScrollBarUI.java:102)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
    at javax.swing.JScrollBar.getMinimumSize(JScrollBar.java:704)
    at javax.swing.ScrollPaneLayout.minimumLayoutSize(ScrollPaneLayout.java:624)
    at java.awt.Container.minimumSize(Container.java:1598)
    at java.awt.Container.getMinimumSize(Container.java:1583)
    at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
    at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
    at java.awt.Container.minimumSize(Container.java:1598)
    at java.awt.Container.getMinimumSize(Container.java:1583)
    at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
    at java.awt.BorderLayout.minimumLayoutSize(BorderLayout.java:634)
    at java.awt.Container.minimumSize(Container.java:1598)
    at java.awt.Container.getMinimumSize(Container.java:1583)
    at javax.swing.JComponent.getMinimumSize(JComponent.java:1697)
    at javax.swing.BoxLayout.checkRequests(BoxLayout.java:433)
    at javax.swing.BoxLayout.layoutContainer(BoxLayout.java:375)
    at java.awt.Container.layout(Container.java:1401)
    at java.awt.Container.doLayout(Container.java:1390)
    at java.awt.Container.validateTree(Container.java:1473)
    at java.awt.Container.validateTree(Container.java:1480)
    at java.awt.Container.validateTree(Container.java:1480)
    at java.awt.Container.validateTree(Container.java:1480)
    at java.awt.Container.validateTree(Container.java:1480)
    at java.awt.Container.validate(Container.java:1448)
    at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    Exception in thread "AWT-EventQueue-0" java.lang.NullPointerException
    at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredMenuItemSize(BasicMenuItemUI.java:400)
    at javax.swing.plaf.basic.BasicMenuItemUI.getPreferredSize(BasicMenuItemUI.java:310)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1615)
    at javax.swing.BoxLayout.checkRequests(BoxLayout.java:434)
    at javax.swing.BoxLayout.preferredLayoutSize(BoxLayout.java:251)
    at javax.swing.plaf.basic.DefaultMenuLayout.preferredLayoutSize(DefaultMenuLayout.java:38)
    at java.awt.Container.preferredSize(Container.java:1558)
    at java.awt.Container.getPreferredSize(Container.java:1543)
    at javax.swing.JComponent.getPreferredSize(JComponent.java:1617)
    at javax.swing.JRootPane$RootLayout.layoutContainer(JRootPane.java:910)
    at java.awt.Container.layout(Container.java:1401)
    at java.awt.Container.doLayout(Container.java:1390)
    at java.awt.Container.validateTree(Container.java:1473)
    at java.awt.Container.validate(Container.java:1448)
    at javax.swing.RepaintManager.validateInvalidComponents(RepaintManager.java:379)
    at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(SystemEventQueueUtilities.java:113)
    at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:461)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:242)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:163)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:110)
    There are no complaints about anything within my code, it's all GUI related whenever I make a bind() or rebind() call.
    Again, any help here would be great... cause this one's just beating me.
    Thanks!

    Maybe you want to change that worker thread to
    not do RMI but anything else (dummy data) to see if it really is RMI, I doubt it, I think you are updating some structures that have to do with swing GUI and hence you will hang.
    Just check this out.

  • ADF Swing Graph Issue

    Hi,
    I am working on ADF Swings where i need to drag and drop the Data controller as Graph. I have Created a Datacontroller and Drap and Drop it as the Graph. I am able to see the Graph (BigGraphDef.xml is created). I am not able to set the o1, y1,y2 axis values for the graph . I am using JDev 11.1.1.3.
    Any Pointers in this regard will be highly helpful.
    TIA

    Can any one reply to the above question?

  • ADF Swing panel Issue

    Hi,
    I have requirement where i need to use 2 Panels in a form. I have used JPanel in ADF Swing like what we used Panel Box in ADF. When I am running the application, The data in the first panel is coming up where the second panel data is not showing. I am using J dev 11.1.1.3.
    Can you please help me in this regard.
    Regards,
    Kalyan.
    Edited by: Kalyan on Oct 7, 2010 5:33 AM

    As I understand you have 2 JPanels implemented as 2 separate Java classes and you invoke <tt>panel.setBindingContext(bctx)</tt> on each of them. This method binds the corresponding panel to its PageDef. If you use only one common PageDef instance then one of your panels will remain unbound. In order to resolve this problem you have to either combine your panels in a single JPanel or to provide a separate PageDef instance for each of them. You should either define a separate PageDef or you can try to duplicate PageDef's declaration in DataBindings.cpx (without duplicating the PageDef's XML file). If you choose the second one then open the <tt>DataBindings.cpx</tt> file and copy the corresponding line, for example:
    <pageDefinitionUsages>
      <page id="MyPanelPageDef"       path="view.myproject.pageDefs.MyPanelPageDef"/>
      <page id="MySecondPanelPageDef" path="view.myproject.pageDefs.MyPanelPageDef"/>
    </pageDefinitionUsages>In this way you will declare a new PageDef instance without duplicating the PageDef's file. Then go to the beginning of the 2nd panel's Java class and set the new PageDef ID into it, for example replace the line:
    private String pageDef = "MyPanelPageDef"; with private String pageDef = "MySecondPanelPageDef"; (Of course, these names are just sample ones and you should set the corrent ones).

  • JFC Swing Focus Issue : Help Needed :Urgent

    �In my application,Swing (JFC,jdk 1.6) calls C++ executables ,at times executable pop up comes before the main swing window (C++ is faster than swing window to come), as java window comes second it steals focus from C++ dialog , but our intention is to have focus on C++ Dialog (It is already set to modal and comes on TOP but it doesn�t retain focus) ,has anyone encountered similar problem ? �

    Why don't you wait until your Swing GUI is visible before running the C++ programs? If you're launching some other Process asynchronously while the Swing GUI is loading, and your GUI is slow to create, then you'll always have the problem of the other Process possibly displaying its window first.
    Again, my suggestion is to wait until your Swing GUI is realized before creating/displaying any native dialogs, to ensure things pop up in the "right order."

  • Swing thread issu

    I have a javax.swing.JFrame extended object that after running the code
            java.awt.EventQueue.invokeLater(new Runnable() {
                public void run() {
                    new chatUi().setVisible(true);
            });Continues to communicate with a network server over TCP and updates a table with information. By calls to System.out.println I can see that the communication with the server is succesfull but I cant update the gui. The only way i seme able to update the gui after that point is by events that are triggerd by the user and not by functions in my code.
    What am I missing ?
    Is the only way to work with the frame object by creating threads and running them by: SwingUtilities.invokeLater. ??
    Any help would be greatly appriciated // Tomas

    Hi,
    A little bit of more code would be nice to see where your app don't do what it should do.
    In general you should post every code that interacts with the gui into the EventDispatchThread(EDT)
    a common way is to use the EventQueue as you did.
    If one of your methods invokes changes on the gui you should them post on the EDT too.
    If you want to look timebased for a special value or some networkoperations you can use
    a Timer - in your case a javax.swing.Timer and not the java.util.Timer.
    for further informations look at this tutorials :
    http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html
    http://java.sun.com/products/jfc/tsc/articles/timer/
    An other nice way to let run longer threads posting intermediate results on the gui
    is to use a SwingWorker -> javax.swing.SwingWorker
    try those things
    Olek

  • Newbie Swing setText issue

    Hi to all,
    I'm developing a text editing Applet, have been using Jbuilder 3 initially. Adapted a Jbuilder sample which would update a JLabel with a Jtextfield's caret position.
    NOw I'm working within an Applet, which has two tabbed panes. in the 2nd, there's an outer manager, an inner one for a top row of buttons and another scrollpane one for the textfield. now when i try to setText on my JLabel, it won't even compile. Is there other way I need to reference it once it's deep in other components?
    JLabel cc2 = new JLabel();
    cc2.setText("update me!");
    JTextArea Meta_Titlex = new JTextArea("Enter Text Here");
    Meta_Titlex.addCaretListener(new javax.swing.event.CaretListener() {
    public void caretUpdate(CaretEvent e) {
    Meta_Titlex_caretUpdate(e);
    void Meta_Titlex_caretUpdate(CaretEvent e) {
    cc2.setText("cannot resolve this symbol");
    Many thanks in advance.

    It comes down to where is the JLabel defined and is it visible to the method/class that you are trying to update it in. That is not clear in your code snippet.

  • Funky GUI interop issues in thick client ReportViewerBean on Linux

    When I run up my app on Linux with the ReportViewerBean (in Swing), press the Export button, the click the Browse... button, I get an x11 error (below), and the file dialog never appears.
    <br><br>
    HOWEVER, if I then click on the Text Search button, the File Dialog magically appears with the Text Search dialog behind it.
    <br><br>
    This seems to happen intermittently...it seems as though it's quite possibly a swing focus issue...Sometimes it works fine, but other times - almost consistently - if I first click on the report nav arrows, then click Export > Browse, the file dialog won't come up and i'll get the stack trace from Eclipse...
    <br><br>
    I am running the ReportViewerBean in a JPanel which is embedded into an SWT application using an SWTAWT/Embedded composite.  That shouldn't be the issue though as the SWTAWT composite handles all of the swing-to-swt containerization automatically.
    <br><br>
    At first I thought this may be a JRC bug, but now I'm not so convinced after reading this thread:
    https://bugs.launchpad.net/ubuntu/source/sun-java6/bug/291135
    <br><br>
    I thought I would post this today as a service to anyone else that's seen this issue and in hopes of getting a workaround supplied by the good people at SAP?  Looks like it might be an applet issue with the GTK vs. the java version?
    <br><br>
    System Info:<br>
    java.version=1.6.0_20<br>
    java.vendor=Sun Microsystems Inc.<br>
    BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=en_US<br>
    <br><br>
    Crystal Reports Viewer 12.0.0.0<br>
    java.vendor = Sun Microsystems Inc.<br>
    java.version = 1.6.0_20<br>
    os.name = Linux  (SUSE)<br>
    os.version = 2.6.31.12-0.2-desktop<br>
    os.arch = amd64<br>
    <br><br>
    Here's the important part of the stack trace:
    <br><br>
    Exception occurred during event dispatching:
    java.lang.StackOverflowError
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)
         at sun.awt.X11.XToolkit.GlobalErrorHandler(XToolkit.java:136)
         at sun.awt.X11.XlibWrapper.CallErrorHandler(Native Method)
         at sun.awt.X11.XToolkit.SAVED_ERROR_HANDLER(XToolkit.java:125)

    Ted,
    <br>
    I think you've hit the nail on the head here...looks like my original suspicions were indeed correct or close thereabouts.
    <br>
    My workaround is as follows:
    <br>
    1.  Remove the export button on the viewer (do-able with the ReportViewerBean.setHasExportButton(false) method)
    <br>
    2.  Write your own SWT GUI interface for hooking into the export functions of the ReportViewerBean.
    <br>
    <br>
    I'm about wrapped with this product and we were going to remove all of the crystal toolbar controls, including the Search
    <br>
    capability as it's hosed as well...and the new SWT GUI that we are deploying looks more modern anyway, so it's probably
    <br>
    just as well.  I'll report back any other SWT-AWT issues w/the X11 overflow error if I find any once we begin full-scale testing
    <br>
    in Linux.
    <br>
    That's about it!  Thanks!

  • Slower graphics in JVM 6u23 than 6u03 w/o AGP Texture Acceleration

    We have two workstations:
    OS: XP SP3
    Video HW: NVIDIA Quaddro cards
    dxdiag: DirectDraw, Direct3D, and AGP Texture Acceleration are enabled, and can be disabled
    JRE: 6u23
    We have a laptop:
    OS: XP SP3
    Video HW: integrated video device
    dxdiag: DirectDraw and Direct3D are enabled, AGP Texture Acceleration is disabled / greyed out
    JRE: 6u23
    It seems obvious that the laptop just doesn't have the hardware capability to handle AGP Texture Acceleration, which is no surprise.
    We notice on the laptop that when we click on a button within our application, and a large panel gets swapped out for a different one, there is a scanning repaint problem. What I mean is that panel A disappears, and panel B appears in its place, painting from left to right ("scanning"), and takes about two to four seconds to fully paint the new panel. The tabs also flicker in a strange way when we mouse over them. This doesn't happen on our workstations.
    On our workstations, if we disable AGP Texture Acceleration within the dxdiag app, the undesired behaviors exhibitted by the laptop do not occur. However, if we disable DirectDraw (and by extension Direct3D / AGP Texture Acceleration), we can see the same behavior on the workstations as we see on the laptop. This also occurs if we use the jvm arg -Dsun.java2d.noddraw=true.
    If we run our application on the laptop with the jvm arg -Dsun.java2d.d3d=false, or =true, the problems remain. If the laptop uses JRE 6u03 instead of 6u23, the problems go away. I haven't tried using the -Dsun.java2d.noddraw jvm arg on the laptop, but I will attempt to do so later today.
    I originally posted this in the Swing forums, thinking that it was more of a Swing related issue, but I believe the real problem is more Java2D related. Any assistance would be greatly appreciated.

    Thank you for the information, BoBear. I have question about this technique. The paint method in my application is overloaded, and I have access to the component (tab) I'm drawing the image on. When I create the Graphics2D object from the compatible BufferedImage object, and try to draw my other BufferedImage to it, the image that I'm trying to paint doesn't appear. am I doing this right?
    public void paint(Graphics g) {
       Image image = this.getTab().getBackgroundImage(); // Get the image to draw as a background for the tab
       int tabW = this.getTab().getPreferredSize().getWidth();
       int tabH = this.getTab().getPreferredSize.getHeight();
       int imgW = image.getWidth(this); // this is an ImageObserver
       int imgH = image.getHeight(this);
       Graphics 2D g2d = this.getTab().getGraphicsConfiguration.createCompatibleImage(imgW, imgH).createGraphics();
       for (int x = 0; x < width; x += imgW){
          for (int y = 0; y < height; y += imageH){
             g2d.drawImage(img, x, y, this);
    }If I draw to the Graphics object g, the execution time of drawImage is problematically high. If I draw to the Graphics2D object g2d, the background image doesn't draw at all. Thank you in advance for your insight.

  • Error in ME23N and MIGO

    My Company is using IS-Oil related Solution with standard MM module, while dealing with IS-Oil related cases in ME23n MIGO and in some other transactions in QA and PRD environment, SAP R/3 is giving a dump that “A conversion error occurred”.
    Error detail in ME23N is given below.
    Screen name.............. "SAPLMIGO"       
    Screen number............ 0200             
    Screen field............. "GOITEM-BPMNG"   
    Error text............... "FX015: Sign lost.
    Due to dynamic temperature and density issues of oil related products; quantity received can be greater than quantity issue and difference of both quantities can be with –ve sign in such cases.
    Domain of GOITEM-BPMNG is MENG13, which do not support –ve sign. We executed the same transaction (ME23N) successfully in QA environment with same data after modifying domain to MENGV13, which supports –ve sign.
    Please suggest the solution of problems like mentioned above for IS – Oil products and what will be the consiquences of modifying the domain in SAP Standard.
    Thnx

    Did you apply OSS <a href="https://service.sap.com/sap/support/notes/774896">Note 774896 - IS-OIL MIGO DISPLAY MATERIAL DOCUMENT FAILED</a>
    Regards

  • HTML Editor and getting HTML Tags

    Hi
    i am using JTextPane to create Text Editor.I have added button to add Bold,or Italic Text.Text is shown as bold in the editor. I want to get the text of this Text Pane with HTML Text i mean in the form of Tags <B> text</b> for example.
    But on the view it should not display those tags in the editor
    Can any one please tell me how can i do it
    Regards

    I want to get the text of this Text Pane with HTML Text i mean in the form of Tags <B> text</b> This must be basic JTextPane question ! The method getText() will do this work for you.It will return the content within <html></html> with all required formatting.
    Again ,if you like to place the content in the JTextPane ,us setText(String content) and it will be reflected as you liked.
    But,the thing is your JTextPane's content type should be "text/html"
    PS. Please post the swing related issues in PROJECT SWING forum.
    Regards.

  • [1.2.0.29.98] connection with files of type plsqlnode

    Hi,
    open a file of type plsqlnode. choose connection with the selector in the right top corner doesn't work. nothing happens. its possible to let a connection "appear" but it won't open or anything else. its just written there.
    press compile, there appears a dialog a "select connection" dialog. sqldev will compile with that connection ...
    however, i couldn't find a way to choose another connection. even after i disconnected the choosen one, sqldev never asked me to choose any but just reconnected to the originally choosen one.
    Regards, Anita

    You're right. I've noticed it before but thought it was a hick-up.
    When selecting a connection, you notice the drop down doesn't accept; you'll have to double click to get it to close. Nevertheless, as said before, that doesn't help to really connect to the chosen connection.
    Then I tried closing the open file through the "x" on the tab, but sqldev just hung!
    I noticed 2 times this same exception in the console:
    Exception in thread "AWT-EventQueue-0" java.lang.ClassCastException: java.lang.S
    tring cannot be cast to javax.swing.JLabel
    at oracle.dbtools.raptor.plsql.PLSQLEditorToolbar$1.itemStateChanged(PLS
    QLEditorToolbar.java:107)
    at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1207)
    at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1255)
    at javax.swing.JComboBox.contentsChanged(JComboBox.java:1311)
    at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.j
    ava:100)
    at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel
    .java:88)
    at javax.swing.JComboBox.setSelectedItem(JComboBox.java:559)
    at javax.swing.JComboBox.setSelectedIndex(JComboBox.java:605)
    at javax.swing.plaf.basic.BasicComboPopup$Handler.mouseReleased(BasicCom
    boPopup.java:814)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
    73)
    at java.awt.Component.processMouseEvent(Component.java:6038)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at javax.swing.plaf.basic.BasicComboPopup$1.processMouseEvent(BasicCombo
    Popup.java:480)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4410)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
    java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    java.lang.ClassCastException: java.lang.String cannot be cast to javax.swing.JLa
    bel
    at oracle.dbtools.raptor.plsql.PLSQLEditorToolbar$1.itemStateChanged(PLS
    QLEditorToolbar.java:107)
    at javax.swing.JComboBox.fireItemStateChanged(JComboBox.java:1207)
    at javax.swing.JComboBox.selectedItemChanged(JComboBox.java:1255)
    at javax.swing.JComboBox.contentsChanged(JComboBox.java:1311)
    at javax.swing.AbstractListModel.fireContentsChanged(AbstractListModel.j
    ava:100)
    at javax.swing.DefaultComboBoxModel.setSelectedItem(DefaultComboBoxModel
    .java:88)
    at oracle.dbtools.raptor.controls.DBConnectionComboBox.setCurrentConnect
    ion(DBConnectionComboBox.java:61)
    at oracle.dbtools.raptor.plsql.PLSQLEditorToolbar$2.update(PLSQLEditorTo
    olbar.java:122)
    at oracle.ide.model.IdeSubject.notifyObservers(IdeSubject.java:94)
    at oracle.ide.model.Node.notifyObservers(Node.java:495)
    at oracle.dbtools.raptor.plsql.PLSQLController.handleEvent(PLSQLControll
    er.java:234)
    at oracle.ide.controller.IdeAction.performAction(IdeAction.java:551)
    at oracle.ide.controller.IdeAction$2.run(IdeAction.java:804)
    at oracle.ide.controller.IdeAction.actionPerformedImpl(IdeAction.java:82
    3)
    at oracle.ide.controller.IdeAction.actionPerformed(IdeAction.java:521)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:19
    95)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.jav
    a:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:236)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
    72)
    at java.awt.Component.processMouseEvent(Component.java:6038)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4410)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThre
    ad.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.
    java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    Another Swing related issue!
    Is this related to these swing provoked unrecoverable lock-ups?
    Java Deadlock
    [b]BUG: Unrecoverable lock-up[/b] - Hang on enableDbmsOutput
    Here's the thread dump after sqldev hung:
    "Timer-10" prio=6 tid=0x37920000 nid=0x5dc in Object.wait() [0x3ad3f000..0x3ad3f
    a94]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13cc5a00> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-9" prio=6 tid=0x35f2f400 nid=0x1f4 in Object.wait() [0x3ab3f000..0x3ab3fb
    94]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13cc5a88> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-8" prio=6 tid=0x37d63400 nid=0x6d4 in Object.wait() [0x3a93f000..0x3a93fc
    94]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13ae3678> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-7" prio=6 tid=0x36a56000 nid=0x27c in Object.wait() [0x3a73f000..0x3a73fd
    94]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13ae3700> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "WaitCursorTimer" daemon prio=6 tid=0x35f24800 nid=0x6bc in Object.wait() [0x3a2
    3f000..0x3a23fd14]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13a7dd30> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-5" prio=6 tid=0x37c66400 nid=0x6d0 in Object.wait() [0x3a13f000..0x3a13fb
    14]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x138915e0> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-4" prio=6 tid=0x37c64c00 nid=0x4a8 in Object.wait() [0x39f3f000..0x39f3fc
    14]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13891668> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Thread-8" prio=6 tid=0x37971800 nid=0x684 runnable [0x00000000..0x0189fb74]
    java.lang.Thread.State: RUNNABLE
    "WeakDataReference polling" prio=2 tid=0x3683c400 nid=0x658 in Object.wait() [0x
    39e3f000..0x39e3fa94]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x13326998> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at oracle.ide.util.WeakDataReference$Cleaner.run(WeakDataReference.java:
    88)
    at java.lang.Thread.run(Thread.java:619)
    "Timer-3" prio=6 tid=0x37e01400 nid=0x648 in Object.wait() [0x39b3f000..0x39b3fc
    14]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x13294e40> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13294e40> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-2" prio=6 tid=0x37dce800 nid=0x694 in Object.wait() [0x3993f000..0x3993fd
    14]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    - waiting on <0x13295460> (a java.util.TaskQueue)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x13295460> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Log Page Updater" prio=4 tid=0x3792e400 nid=0x314 waiting on condition [0x3873f
    000..0x3873fa94]
    java.lang.Thread.State: TIMED_WAITING (sleeping)
    at java.lang.Thread.sleep(Native Method)
    at oracle.dbtools.migration.workbench.core.ui.MigrationTreeTableLogPage$
    5.run(MigrationTreeTableLogPage.java:622)
    "IconOverlayTracker Timer" prio=6 tid=0x36c90400 nid=0x4cc in Object.wait() [0x3
    863f000..0x3863fb14]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.util.TimerThread.mainLoop(Timer.java:483)
    - locked <0x12c56738> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "Timer-0" prio=6 tid=0x379bdc00 nid=0x71c in Object.wait() [0x3823f000..0x3823fd
    14]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.util.TimerThread.mainLoop(Timer.java:509)
    - locked <0x12bf40c0> (a java.util.TaskQueue)
    at java.util.TimerThread.run(Timer.java:462)
    "TimerQueue" daemon prio=6 tid=0x35f39800 nid=0x724 in Object.wait() [0x3738f000
    ..0x3738fb14]
    java.lang.Thread.State: TIMED_WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at javax.swing.TimerQueue.run(TimerQueue.java:236)
    - locked <0x12887f10> (a javax.swing.TimerQueue)
    at java.lang.Thread.run(Thread.java:619)
    "AWT-Windows" daemon prio=6 tid=0x36b75c00 nid=0x718 runnable [0x3707f000..0x370
    7fc94]
    java.lang.Thread.State: RUNNABLE
    at sun.awt.windows.WToolkit.eventLoop(Native Method)
    at sun.awt.windows.WToolkit.run(WToolkit.java:290)
    at java.lang.Thread.run(Thread.java:619)
    "AWT-Shutdown" prio=6 tid=0x36b75000 nid=0x714 in Object.wait() [0x36f7f000..0x3
    6f7fd14]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
    - locked <0x1285ab20> (a java.lang.Object)
    at java.lang.Thread.run(Thread.java:619)
    "Java2D Disposer" daemon prio=6 tid=0x36b5ac00 nid=0x710 in Object.wait() [0x36e
    7f000..0x36e7fd94]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x1285abb8> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at sun.java2d.Disposer.run(Disposer.java:125)
    at java.lang.Thread.run(Thread.java:619)
    "Low Memory Detector" daemon prio=6 tid=0x35effc00 nid=0x6e0 runnable [0x0000000
    0..0x00000000]
    java.lang.Thread.State: RUNNABLE
    "CompilerThread0" daemon prio=6 tid=0x35efb000 nid=0x630 waiting on condition [0
    x00000000..0x3656f798]
    java.lang.Thread.State: RUNNABLE
    "Attach Listener" daemon prio=6 tid=0x35ef9c00 nid=0x614 runnable [0x00000000..0
    x00000000]
    java.lang.Thread.State: RUNNABLE
    "Signal Dispatcher" daemon prio=6 tid=0x35ef9000 nid=0x6a8 waiting on condition
    [0x00000000..0x00000000]
    java.lang.Thread.State: RUNNABLE
    "Finalizer" daemon prio=8 tid=0x35ee6400 nid=0x688 in Object.wait() [0x3626f000.
    .0x3626fd14]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:116)
    - locked <0x1279ac38> (a java.lang.ref.ReferenceQueue$Lock)
    at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:132)
    at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
    "Reference Handler" daemon prio=6 tid=0x35ee5400 nid=0x64c in Object.wait() [0x3
    616f000..0x3616fc94]
    java.lang.Thread.State: WAITING (on object monitor)
    at java.lang.Object.wait(Native Method)
    at java.lang.Object.wait(Object.java:485)
    at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:116)
    - locked <0x1279acc8> (a java.lang.ref.Reference$Lock)
    "main" prio=6 tid=0x01938400 nid=0x52c waiting on condition [0x00000000..0x0012f
    b44]
    java.lang.Thread.State: RUNNABLE
    "VM Thread" prio=6 tid=0x35ee2000 nid=0x128 runnable
    "VM Periodic Task Thread" prio=6 tid=0x35f1a800 nid=0x2d4 waiting on condition
    JNI global references: 1531
    Heap
    def new generation total 2304K, used 1369K [0x10020000, 0x102a0000, 0x1278000
    0)
    eden space 2048K, 65% used [0x10020000, 0x10170c58, 0x10220000)
    from space 256K, 8% used [0x10220000, 0x102258e8, 0x10260000)
    to space 256K, 0% used [0x10260000, 0x10260000, 0x102a0000)
    tenured generation total 29936K, used 22271K [0x12780000, 0x144bc000, 0x30020
    000)
    the space 29936K, 74% used [0x12780000, 0x13d3feb8, 0x13d40000, 0x144bc000)
    compacting perm gen total 36608K, used 36504K [0x30020000, 0x323e0000, 0x34020
    000)
    the space 36608K, 99% used [0x30020000, 0x323c63a0, 0x323c6400, 0x323e0000)
    No shared spaces configured.
    Please guys, bug & fix these issues!
    Thanks,
    K.

  • How to execute MS DOS command through Java program???

    Dear Sir,
    I want to run a MS-DOS command through my Java program. I have tried "Dir" command but no other command which takes command line args doesn't work at all. Please help.
    import java.io.*;
    class CommandPrompt
         public static void main(String[] args)
              try
                   File file = new File("C:/Temp/Java");
                   String[] cmd = {"command.com","/c","md folder"};
                   String[] envp = {""};
                   Process m;
                   String s = "";
                   m = Runtime.getRuntime().exec(cmd,null,file);
                   BufferedReader buf = new BufferedReader(new InputStreamReader(m.getInputStream()));
                   while ((s = buf.readLine())!=null)
                        System.out.println(s);
              catch (Exception ex)
                   System.out.println("Exception is "+ex);
                   ex.printStackTrace();

    1. This forum is for Swing-related issues only. This question should be posted to the "Java Programming" forum.
    2. Please enclose your sample code in code blocks; it's much easier to read that way. See here for how it's done: http://forum.java.sun.com/faq.jsp#messageformat
    3. Please provide more information, like what error messages you got and what OS you're running. For instance, if you're running WinXP, Win2k or NT4, your command processor should be "cmd.exe", not "command.com". When I made that change, your program worked for me.

Maybe you are looking for