Jdk1.5's bug

It's very slow when eclipse connect CVS using jdk1.5(RC and FCS),
It's same when client connect Database.
Is this bug?

Hi
I used eclipse with JDK1.5 beta for my applications and it seems to work fine. Is it a problem only with CVS?
Regards,
Chandra

Similar Messages

  • Jdk1.3.1 bug with rmic -iiop?

    Hi
    Does anyone know whether there is a bug with the rmic -iiop feature of jdk1.3.1?
    When I try to use rmic -iiop, with the -classpath option, it throws a java.lang.ClassFormatError.
    e.g.
    rmic -classpath .;C\irfeclient\requestrecord.jar -iiop com.ch.irfe.curvegen.xtools.CurveGenImpl
    If I leave out the current directory when setting the classpath, the compiler says it can't find the implementation class com.ch.irfe.curvegen.xtools.CurveGenImpl.
    If I just try using rmic without -iiop, it works. However I need to generate iiop stubs.
    Has anyone managed to resolve this one?
    many thanks
    Lyndsey

    I've done some further investigation and I think it is a bug with jdk1.3.1. I have tried using IBMs JDK that comes with WebSphere 3.5, and it works fine.

  • JDK1.4 AWT bug?

    hi,
    the following code works just fine with JDKS 1.1, 1.2 and 1.3, but doesn't work under 1.4.
    can someone tell me what's wrong with it?
    import java.awt.*;
    public class AwtTest
    public static void main( String[] args )
    Window f = new Window( new Frame() );
    TextField tf = new TextField();
    f.setSize( 200, 400 );
    f.add( tf );
    tf.setSize( 200, 400 );
    tf.setLocation( 0, 0 );
    f.setLayout( null );
    f.pack();
    f.show();
    }

    hi nille,
    thanks for the suggestion. unfortunately, it doesn't work if i use null layout on my frame (my app requires the components to be placed in absolute positions..).
    i can't believe such a bug would pass Sun's JDK tests before the final release. i'll submit it to the bug database.
    thanks,
    mark
    Looks like a bug to me... try this:
    public static void main( String[] args ) {
    Frame f = new Frame();
    f.setUndecorated(true);
    f.setSize(200,400);
    f.add(new TextField());
    f.show();
    }This is a new feature in JDK 1.4. I know there has
    been some problem with windows and focus in 1.4.
    Report it to the bug database if you feel like it.
    Nille

  • Is this a bug in JDK1.4.1 regarding JDesktopPane

    Is this a bug in JDK1.4.1 regarding JDesktopPane, when i drag my JInternalFrame in JDesktopPane it becomes little bit sticky and flickery, but when i run same application with JDK1.4.0, works fine, any idea/comments why ?

    Is this a bug in JDK1.4.1 regarding JDesktopPane, when i drag my JInternalFrame in JDesktopPane it becomes little bit sticky and flickery, but when i run same application with JDK1.4.0, works fine, any idea/comments why ?

  • Is it a bug in JDK1.3?

    Here's a simple program that I compiled and executed by using JDK1.3. The program had worked all very well as long as I typed in 'C' , 'P', 'N', 'A', 'b', or other single characters. Just by curiosity, I kept keying 'c' for 6 or 7 times and of course the computer kept telling me "Entry must be C or P or N!". After that, when I key in 'C', 'P', or 'N' again, strange things happened. I was still confronted with the same message as if I had keyed in invalid characters. The situation lasted until after I typed the command java ChooseManager. Then I got the correct response for the last 'C', 'P' or 'N' that I had entered. Is it a bug in JDK1.3?
    Here is the program:
    public class ChooseManager
    static final double CORP_RATE = 75.99;
    static final double PRI_RATE = 47.99;
    static final double NON_PROF_RATE = 40.99;
    public static void main(String[] args) throws Exception
         char eventType;
         Chap4Event anEvent;
         System.out.println("Enter type of event you are scheduling");
         System.out.println("C for a corporate event");
         System.out.println("P for a private event");
         System.out.println("N for non-profit event");
         eventType=(char)System.in.read();
         while(eventType != 'C' && eventType != 'P' && eventType != 'N')
              System.in.read(); System.in.read();
              System.out.println("Entry must be C or P or N!");
              eventType = (char)System.in.read();
         System.out.print("The manager for this event will be ");
         switch (eventType)
              case 'C':
              System.out.println("Dustin Britt");
              anEvent = new Chap4Event(eventType, CORP_RATE);
              break;
              case 'P':
              System.out.println("Carmen Lindsey");
              anEvent = new Chap4Event(eventType, PRI_RATE);
              break;
              default:
              System.out.println("Robin Armanetti");
              anEvent = new Chap4Event(eventType, NON_PROF_RATE);
              break;
         System.out.println("Event type is " + anEvent.getEventType());
         System.out.println("Minimum rate charged is $" + anEvent.getEventMinRate());

    HELP, jsalonen. Something wrong with Readerbuffer. Why complier state can't resolve class:reader, InputStreamReader and BufferedReader ? Must I input something first?
    public class PetAdvice
         public static void main(String[] args) throws Exception
              char resiType;
              char hour;
              System.out.println("Please cateory your residence type");
              System.out.println("'A' for apartment;");
              System.out.println("'H' for house;");
              System.out.println("'D' for dormiory;");
              Reader resiType = new InputStreamReader(System.in);
              BufferedReader in = new BufferedReader(reader);
              String inputLine = in.readLine();
              while(!(inputLine.equals("A") |
                   inputLine.equals("H") |
                   inputLine.equals("D")))
                   {   System.out.println("entry: "+inputLine+" Entry must be A or H or D");
              inputLine = in.readLine();
              System.out.println("Please specify the average hours you will spend at home.");
              System.out.println("A) 18 or more;");
              System.out.println("B) 10 to 17;");
              System.out.println("C) 8 to 9;");
    System.out.println("D) 6 to 7;");
              System.out.println("E) 0 to 5;");
              hour = (char)System.in.read();
              while (hour != 'A' && hour != 'B' && hour != 'C' && hour != 'D' && hour != 'E')
    System.in.read(); System.in.read();
                   System.out.println("Invalid input, pls choose again.");
                   resiType = (char)System.in.read();
    if (resiType == 'H' && hour == 'A')
    System.out.println("Our recommendation is Pot bellied pig");
              else if (resiType == 'H' && (hour == 'B' || hour == 'C'))
                   System.out.println("Our recommendation is Dog.");
              else if (resiType == 'H' && (hour == 'D' || hour == 'E'))
              System.out.println("Our recommendation is Snake.");
              else if (resiType == 'A' && (hour == 'A' || hour == 'B' ))
              System.out.println("Our recommendation is Cat.");
              else if (resiType == 'A' && (hour =='C' || hour == 'D' || hour == 'E'))
              System.out.println("Our recommendation is Hamster.");
              else if (resiType == 'D' && (hour == 'D' || hour == 'C' || hour == 'B' || hour == 'A'))
              System.out.println("Our recommendation is Fish.");
              else if (resiType == 'D' && hour == 'E')
              System.out.println("Our recommendation is Ant Farm.");
              else
                   System.out.println("Sorry, no recommendation currently.");

  • How to fix the bug of JDK1.3?

    i installed Tomcat 3.2.3 as Windows NT service successfully. but when i logged out and logged in again, the tomcat service stopped! you know, i've set the service as auto-start. so i used jdk1.2.2 instead of jdk1.3, and it worked well.
    but i still want to use jdk1.3. how to solve the problem? i haven't tried it with jdk1.4 or tomcat4.0. i wonder whether tomcat4.0 can work with IIS.
    btw, i cannot understand the bug report on http://developer.java.sun.com/developer/bugParade/bugs/4323062.html well. can you help me out?
    thanks so much!
    freeado

    What you need to do is use JDK 1.3.1 instead, which has a fix for this issue. Then, add the flag -Xrs to your command line to stop it being terminated by logoff.

  • BUG; jdk1.3; Gridcontrol; Attention JDeveloper Team

    I have found yet another bug in the implementation of gridcontrol and jdk1.3.
    I have the following renderer for my text fields.
    import javax.swing.table.*;
    import java.awt.*;
    import java.awt.event.*;
    import javax.swing.*;
    * A Class class.
    * <P>
    * @author Linda B. Rawson
    public class DefaultTextRenderer extends DefaultTableCellRenderer
    * Constructor
    public DefaultTextRenderer() {
    public Component getTableCellRendererComponent(JTable table, Object value, boolean isSelected, boolean hasFocus, int row, int column)
    Component comp = super.getTableCellRendererComponent(table,value,isSelected,hasFocus,row,column);
    String myFlag = "";
    try {
    // this row index must correspond to the run flag column in the gridcontrol
    myFlag = (table.getValueAt(row,15).toString());
    myFlag = (myFlag == null) ? "" : myFlag;
    if (myFlag.equals("P") ) {
    comp.setBackground(Color.lightGray);
    } else if (myFlag.equals("S") ) {
    comp.setBackground(Color.yellow);
    } else if (myFlag.equals("F") ) {
    comp.setBackground(Color.red);
    } else {
    comp.setBackground(Color.white);
    } //This is to catch the null row in gridcontrol from jdev bug
    catch (NullPointerException e) {
    return comp;
    I implement the renderer like this:
    DefaultTextRenderer textRenderer = new DefaultTextRenderer();
    TableCellRenderer renderer;
    renderer = textRenderer;
    m_table = gridControl.getTable();
    m_table.getColumnModel().getColumn(1).setCellRenderer(renderer);
    In JDK 1.2 it colors the appropriate row just like I want.
    In JDK1.3 it will not do the first occurance of the row. In otherwords if I want the first row in the grid colored it fails.
    You need to test this in your upcoming version.
    Linda
    null

    Hi,
    we have faced similar compatibility problems
    when testing our application using JDEV3.2
    and JDK1.3 (Browser crashed);
    Since we use JDK1.3.1 (it has been released aready by SUN) this severe problem vanished.
    I really share your concerns about the grid
    control in JDEV3.2.3 and I hope that we find
    a way to track the successful treatment of
    BUG 1806180!
    Have fun
    @i

  • Help!! jdk1.4 is doing strange things.......bug?

    hi just installed new jdk 1.4.....and my program doesn't work anymore..........The program always 'hangs' at the statement prepareImage.......if i use jdk1.3 there ain't no problem anymore...Is this a bug..?
    package eralia;
    import java.awt.*;
    import java.awt.image.*;
    import java.io.*;
    import java.awt.print.*;
    import javax.swing.*;
    import java.util.*;
    public class PrintModule implements Printable, ImageObserver {
    PrintModule()
    protected Vector Images = new Vector();
    protected Vector lines = new Vector();
    protected boolean printFlag = true, checked=false;
    Image awtImage = null;
    int imgwi=90;
    int imghe=36;
    public void clearAll()
    Images = null;
    Vector lines = null;
    printFlag = true;
    checked=false;
    awtImage = null;
    public void setChecked(boolean bool)
    checked = bool;
    public void loadImage(String filename,Integer wi, Integer ht, Integer xpos, Integer ypos)
    Vector Im = new Vector();
    Image awtImage = null;
    try{
    checked=false;
    awtImage = Toolkit.getDefaultToolkit().getImage(filename);
    if (awtImage==null) System.out.println("oh noooooooooo"+awtImage.toString());
    while (!checked){checked = Toolkit.getDefaultToolkit().prepareImage(awtImage,90,36,this);//90.36
                      System.out.println(checked);}
    Im.addElement(awtImage);
    Integer imageWidth = wi;
    Integer imageHeight = ht;
    Im.addElement(imageWidth);
    Im.addElement(imageHeight);
    Im.addElement(xpos);
    Im.addElement(ypos);
    Images.addElement(Im);
    if((imageWidth.intValue() <0 )|| (imageHeight.intValue() <0)) {printFlag = false;}
    }catch(Exception x){x.printStackTrace();}
    public void loadString(String line, int xpos, int ypos, String Font, int FontPix, String style)
    Vector el = new Vector();
    el.addElement(line);
    el.addElement(new Integer(xpos));
    el.addElement(new Integer(ypos));
    el.addElement(Font);
    el.addElement(new Integer(FontPix));
    el.addElement(style);
    lines.addElement(el);
    public void print() {
    PrinterJob pj = PrinterJob.getPrinterJob();
    pj.setPrintable(this);
    initPaper(pj);
    //Include this statement if you need the print dialog
    //pj.printDialog();
    try{
    if (checked)pj.print();
    }catch(Exception e){System.out.println(e);}
    public void initPaper(PrinterJob printJob)
    PageFormat pgFormat = printJob.defaultPage();
    Paper paper = pgFormat.getPaper();
    // paper units equivalent to 0.3"
    double DEFAULT_MARGIN = 0.1*72;
    double w=6.2496;
    double h=24552;
    //paper.setSize(w,h);
    paper.setImageableArea( DEFAULT_MARGIN,
    DEFAULT_MARGIN,
    (paper.getWidth()-(2*DEFAULT_MARGIN)),
    (paper.getHeight()-(2*DEFAULT_MARGIN)));
    pgFormat.setPaper(paper);
    printJob.setPrintable(this,pgFormat);
    public int print(Graphics g, PageFormat f, int pageIndex){
    if(pageIndex >= 1) return Printable.NO_SUCH_PAGE;
    Graphics2D g2d = (Graphics2D) g;
    g2d.translate(f.getImageableX(), f.getImageableY());
    for (int i=0;i<Images.size();i++)
    printImage(g2d, (Vector)Images.elementAt(i));
    for (int i=0;i<lines.size();i++)
    printString(g2d, (Vector)lines.elementAt(i));
    return Printable.PAGE_EXISTS;
    public void printString(Graphics2D g2d, Vector string){
    if((string == null)|| (g2d == null)) return;
    int x = ((Integer)string.elementAt(1)).intValue();
    int y = ((Integer)string.elementAt(2)).intValue();
    if ((String)string.elementAt(5)=="PLAIN")
    g2d.setFont(new Font((String)string.elementAt(3), Font.PLAIN,
    ((Integer)string.elementAt(4)).intValue()));
    else {
    g2d.setFont(new Font((String)string.elementAt(3), Font.BOLD,
    ((Integer)string.elementAt(4)).intValue()));
    if (checked)g2d.drawString((String)string.elementAt(0),x,y);
    public void printImage(Graphics2D g2d, Vector image){
    if(((Image)image.elementAt(0) == null)|| (g2d == null))
    {return;}
    int wid = ((Integer)image.elementAt(1)).intValue();//imageWidth;
    int ht = ((Integer)image.elementAt(2)).intValue();//imageHeight;
    int x = ((Integer)image.elementAt(3)).intValue();//printLoc.x;
    int y = ((Integer)image.elementAt(4)).intValue();//printLoc.y;
    if (checked)g2d.drawImage((Image)image.elementAt(0),x,y,wid,ht, null);
    public boolean imageUpdate(Image img,int infoflags,int x,int y,int width,int height)
    if (printFlag = false) print();
    return true;}
    And another question.....I use JBuilder....when i compile the program and run it under jbuilder everything works fine......When i 'pack' it with installanywhere...install it...and execute it....not everything works fine.....strange...
    Anybody ideas.....?

    OH ! Boy its gonna be fun...
    problem like this is with me also..
    i have written some code with many classes..and i am trying to delete some elements from defaultlistmodel ..
    It is throwing error ArrayindexoutofBoundExcp. with 1.4 beta3 but not with 1.2.2 ..
    I have pasted this question in Swing topic , java language topic and to SUN bug contaniner also..
    Sorry baby !
    Sanjeev Dhiman

  • Does JOptionPane have a bug in jdk1.4?

    Sorry to post this again, but last time had posted it under a different title/topic. The following piece of code works fine with jdk1.3, but HANGS with jdk1.4-import java.awt.event.*;
    import javax.swing.*;
    public class TestDriver extends JPanel {
       JTextField textField1, textField2;
       MyInputVerifier inputVerifier;
       public TestDriver() {
          initPanel();
       private void initPanel() {
          textField1 = new JTextField(10);
          textField1.setName("Test");
          textField2 = new JTextField(10);
          this.add(textField1);
          this.add(textField2);
          inputVerifier = new MyInputVerifier();
          textField1.setInputVerifier(inputVerifier);
       public static void main(String[] args) {
          JFrame frame = new JFrame();
          frame.getContentPane().add(new TestDriver());
          frame.setSize(200, 100);
          frame.setVisible(true);
          frame.addWindowListener(new WindowAdapter() {
             public void windowClosing(WindowEvent e) {
                System.exit(0);
       class MyInputVerifier extends InputVerifier {
          public boolean verify(JComponent comp) {
             //only when the user enters "Test" in the first text field, should the focus be
             //transferred to the next text field
             if(comp.getName().equals("Test")) {
                String text = ((JTextField)comp).getText();
                if(("Test").equals(text)) {
                   return true;
                } else {
                   showError();
                   return false;
             return true;
       private void showError() {
          //this works fine with both jdk1.3 and jdk1.4
          System.out.println("Wrong!\n Enter \"Test\"");
          //this is where the program hangs when run with jdk1.4
          JOptionPane.showMessageDialog(this, "Wrong!\n Enter \"Test\"");
    }Can anyone please confirm that it really doesn't work with jdk1.4? Also please let me know if anything is wrong with the program.
    I searched in the bug database and found that a few bugs on similar topics have already been reported. But I didn't find one (which is open) particularly on this topic. Is anyone aware of a bug on this topic already reported? If so, could you please post the appropriate link here.
    Thanks a lot.

    Thanks for the reply. The problem is not related to JOptionPane. It's related to verify method of InputVerifier. First of all, as per the jdk1.4 Javadocs, the verify method is not allowed to have side effects. So calling JOptionPane.showMessageDialog() from within verify is not a correct implementation. But the javadocs say that shouldYieldFocus of InputVerifier is allowed to have side effects. So basically the shouldYieldFocus method needs to be implemented and it should pou up a dialog when the input is incorrect.
    BUT, it doesn't work either. It has a bug (4532517). Here is the link to the related bug report-http://developer.java.sun.com/developer/bugParade/bugs/4532517.html
    A workaround has been given there and after using that, the program works fine.
    I have no idea, why it works fine with 1.3. As you said, due to changes in the Focus mechanism in jdk1.4, this problem has arisen.
    Thanks.

  • JDK1.2.2.12 concurrent GC algorithm (incmarksweep) bug?

    Hi all,
    I have a jdk run time bug. Could you please help me?
    We are currently using Sun JDK 1.2.2.12 native threads. The operating system is Sun Solaris 2.8. Hardware is Sun Netra model 1405 with four processors (sparcv9 processor operates at 440 MHz with sparcv9 floating point processor) and 2G memory. We are using some concurrent GC options as following:
    /usr/jdk1.2.2_12/bin/sparc/native_threads/java -Xgenconfig:4m,4m,semispaces:256m,1200m,incmarksweep
    We had several core dumps with above configuration during long time performance tests last week. The frequency is about twice a week. The output on console is as following:
    SIGSEGV 11 segmentation violation
    si_signo [11]: SEGV
    si_errno [0]:
    si_code [1]: SEGV_MAPERR [addr: 0x4]
    stackpointer=FECC14B0
    We did some simulations and duplicated the core dumps. We figured out that core dumps are somehow associated with concurrent GC algorithm "incmarksweep". The core dump will disappear if we replace "incmarksweep" with "markcompact". There is no problem at all if we do not use concurrency GC options. The request malloc size has significant effect on the core dump frequency. The smaller the request malloc size, the less frequent the core dump occurs. The core dump will happen immediately if we use that option with large memory allocation request size. Just put included jar file in your class path and type,
    usr/jdk1.2.2_12/bin/sparc/native_threads/java -Xgenconfig:4m,4m,semispaces:600m,800m,incmarksweep test 100 1000000
    where,
    100 are the number threads you want to use in JVM and
    1000000 are the number bytes you want JVM to allocate it for you at one time.
    You will see a core dump within couple of minutes. The output on console is listed as following:
    IGSEGV 11 segmentation violation
    si_signo [11]: SEGV
    si_errno [0]:
    si_code [1]: SEGV_MAPERR [addr: 0x4]
    stackpointer=FDFB11B8
    *** Garbage Collection in process, a thread
    *** dump is not possible.
    Abort (core dumped)
    import java.io.*;
    import java.util.*;
    public class coredump extends Thread
        long timewait;
        int  mallocSize;
        public coredump(long time, int mallocSize)
            timewait=time;
            this.mallocSize=mallocSize;
        public void run()
            byte[] test;
            int  counter = 0;
            while(true)
                test = new byte[mallocSize];
                for(int j=0;j<mallocSize;j++)
                    test[j]=(byte)(j%256);
                counter++;
                System.out.println("Total allocated memory by thread " +Thread.currentThread().getName()+":"+counter*mallocSize+" bytes");
    //====================================================================================================================
    public class test
        public static coredump[] threads;
        public static int numThreads;
        public static int mallocSize;
        public test()
        public static void main(String[] args)
            if(args.length != 2)
                System.out.println("Usage: java -Xconfig: 4m,4m,semispaces:600m,800m,incmarksweep test numThreads mallocSize");
                System.exit(1);
            else
                numThreads=Integer.parseInt(args[0]);
                mallocSize=Integer.parseInt(args[1]);
                threads = new coredump[numThreads];
            try
                for(int i=0;i<numThreads;i++)
                    threads=new coredump(1000,mallocSize);
    threads[i].start();
    catch(Exception ee)
    ee.printStackTrace();

    Yes. Sun reproduced and confirmed the bug in JDK 1.2.2_12 and JDK 1.2.2_13(scheduled release on 7/31/02). They are working on fix...
    Thanks
    xin

  • JDk1.5.0beta3build58 security bug

    JWS isn't working with third party look and feel implementations wrt the FileOpenService.
    This seems to be a regression to 1.4.1 behaviour where I had to manually set the look and feel to the System LNF before trying to use the FileOpenService. I'm using JGoodies 1.2.2.
    I do not see this with JDk1.5.0 beta2.
    java.security.AccessControlException: access denied (java.io.FilePermission / read)
         at java.security.AccessControlContext.checkPermission(AccessControlContext.java:264)
         at java.security.AccessController.checkPermission(AccessController.java:427)
         at java.lang.SecurityManager.checkPermission(SecurityManager.java:532)
         at java.lang.SecurityManager.checkRead(SecurityManager.java:871)
         at java.io.File.exists(File.java:700)
         at javax.swing.filechooser.FileSystemView.getSystemDisplayName(FileSystemView.java:153)
         at javax.swing.plaf.basic.BasicFileChooserUI$BasicFileView.getName(BasicFileChooserUI.java:1157)
         at javax.swing.JFileChooser.getName(JFileChooser.java:1470)
         at javax.swing.plaf.metal.MetalFileChooserUI$DirectoryComboBoxRenderer.getListCellRendererComponent(MetalFileChooserUI.java:842)
         at javax.swing.plaf.basic.BasicComboBoxUI.getDisplaySize(BasicComboBoxUI.java:1182)
         at com.jgoodies.plaf.plastic.PlasticComboBoxUI.getMinimumSize(PlasticComboBoxUI.java:115)
         at javax.swing.plaf.basic.BasicComboBoxUI.getPreferredSize(BasicComboBoxUI.java:855)
         at javax.swing.JComponent.getPreferredSize(JComponent.java:1582)
         at javax.swing.plaf.metal.MetalFileChooserUI$1.getPreferredSize(MetalFileChooserUI.java:211)
         at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:690)
         at java.awt.Container.preferredSize(Container.java:1558)
         at java.awt.Container.getPreferredSize(Container.java:1543)
         at javax.swing.JComponent.getPreferredSize(JComponent.java:1584)
         at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:695)
         at javax.swing.plaf.metal.MetalFileChooserUI.getPreferredSize(MetalFileChooserUI.java:546)
         at javax.swing.JComponent.getPreferredSize(JComponent.java:1582)
         at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:690)
         at java.awt.Container.preferredSize(Container.java:1558)
         at java.awt.Container.getPreferredSize(Container.java:1543)
         at javax.swing.JComponent.getPreferredSize(JComponent.java:1584)
         at javax.swing.JRootPane$RootLayout.preferredLayoutSize(JRootPane.java:824)
         at java.awt.Container.preferredSize(Container.java:1558)
         at java.awt.Container.getPreferredSize(Container.java:1543)
         at javax.swing.JComponent.getPreferredSize(JComponent.java:1584)
         at java.awt.BorderLayout.preferredLayoutSize(BorderLayout.java:690)
         at java.awt.Container.preferredSize(Container.java:1558)
         at java.awt.Container.getPreferredSize(Container.java:1543)
         at java.awt.Window.pack(Window.java:478)
         at javax.swing.JFileChooser.createDialog(JFileChooser.java:772)
         at javax.swing.JFileChooser.showDialog(JFileChooser.java:708)
         at javax.swing.JFileChooser.showOpenDialog(JFileChooser.java:620)
         at com.sun.jnlp.FileOpenServiceImpl$1.run(FileOpenServiceImpl.java:95)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sun.jnlp.FileOpenServiceImpl.openFileDialog(FileOpenServiceImpl.java:74)
         at com.wss.calendar.client.swing.ScheduleWorldFrame.jMenuItemFileImportFileCSV_actionPerformed(ScheduleWorldFrame.java:7402)
         at com.wss.calendar.client.swing.ScheduleWorldFrame$86.actionPerformed(ScheduleWorldFrame.java:4239)
         at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1849)
         at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2169)
         at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:420)
         at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258)
         at javax.swing.AbstractButton.doClick(AbstractButton.java:302)
         at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1000)
         at javax.swing.plaf.basic.BasicMenuItemUI$Handler.mouseReleased(BasicMenuItemUI.java:1041)
         at java.awt.Component.processMouseEvent(Component.java:5488)
         at javax.swing.JComponent.processMouseEvent(JComponent.java:3093)
         at java.awt.Component.processEvent(Component.java:5253)
         at java.awt.Container.processEvent(Container.java:1966)
         at java.awt.Component.dispatchEventImpl(Component.java:3955)
         at java.awt.Container.dispatchEventImpl(Container.java:2024)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4212)
         at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3892)
         at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3822)
         at java.awt.Container.dispatchEventImpl(Container.java:2010)
         at java.awt.Window.dispatchEventImpl(Window.java:1766)
         at java.awt.Component.dispatchEvent(Component.java:3803)
         at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:234)
         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)

    Looks like the original bug (4772834), which was really in javax.swing.filechooser.FileSystemView.getSystemDisplayName, where it opened a file w/o wrapping call in a doPrivilige() block, was worked around in Java Web Start 1.5.0 beta 1, by putting the whole FileChooserDialog, along with the Security Dialog surronding it, in the Look and Feel of Java Web Start.
    This caused regressions (by running Dialogs with differant Look and Feels in the same AppCOntext) such as the one in the TCK test ( 5060636 ), which were fixed in b57 by partially removing the original fix, so now the original bug is back.
    I will re-open it.
    /Dietz

  • Is this a bug in Swing in JDK1.6/JDK1.7 but not in JDK1.5?

    I have an application for which GUI was developed in Java Swing JDK1.5.I am planning to upgrade the JDK to JDK1.6 but doing so produces problem for me.
    Problem Statement : If I open few dialogs(say 10) and dispose them and than call method 'getOwnedWindows()' , it returns 0 in JDK1.5 but returns 10 in JDK1.6. As in JDK1.6 it returns 10, my algorithm to set focus is not working correctly as it is able to find invlaid/disposed dialogs and try to set the focus on it but not on the correct and valid dialog or component because algorithm uses getOwnedWindows() to get the valid and currently open dialog.
    Can anyone suggest me the workaround to avoid this problem in JDK1.6?
    Following piece of code can demonstrate the problem.
    Custom Dialog Class :
    import javax.swing.JDialog;
    import java.awt.event.ActionListener;
    import javax.swing.JPanel;
    import javax.swing.JFrame;
    import javax.swing.JLabel;
    import javax.swing.JButton;
    import java.awt.event.ActionEvent;
    public class CustomDialog extends JDialog implements ActionListener {
        private JPanel myPanel = null;
        private JButton yesButton = null;
        private JButton noButton = null;
        private boolean answer = false;
        public boolean getAnswer() { return answer; }
        public CustomDialog(JFrame frame, boolean modal, String myMessage) {
         super(frame, modal);
         myPanel = new JPanel();
         getContentPane().add(myPanel);
         myPanel.add(new JLabel(myMessage));
         yesButton = new JButton("Yes");
         yesButton.addActionListener(this);
         myPanel.add(yesButton);     
         noButton = new JButton("No");
         noButton.addActionListener(this);
         myPanel.add(noButton);     
         pack();
         setLocationRelativeTo(frame);
         setVisible(true);
         //System.out.println("Constrtuctor ends");
        public void actionPerformed(ActionEvent e) {
         if(yesButton == e.getSource()) {
             System.err.println("User chose yes.");
             answer = true;
             //setVisible(false);
         else if(noButton == e.getSource()) {
             System.err.println("User chose no.");
             answer = false;
             //setVisible(false);
        public void customFinalize() {
             try {
                   finalize();
              } catch (Throwable e) {
                   e.printStackTrace();
    }Main Class:
    import java.awt.event.ActionListener;
    import javax.swing.JFrame;
    import javax.swing.JButton;
    import java.awt.event.WindowAdapter;
    import java.awt.event.WindowEvent;
    import java.awt.event.ActionEvent;
    import java.awt.FlowLayout;
    import java.awt.Window;
    public class TestTheDialog implements ActionListener {
        JFrame mainFrame = null;
        JButton myButton = null;
        JButton myButton_2 = null;
        public TestTheDialog() {
            mainFrame = new JFrame("TestTheDialog Tester");
            mainFrame.addWindowListener(new WindowAdapter() {
                    public void windowClosing(WindowEvent e) {System.exit(0);}
            myButton = new JButton("Test the dialog!");
            myButton_2 = new JButton("Print no. of owned Windows");
            myButton.addActionListener(this);
            myButton_2.addActionListener(this);
            mainFrame.setLocationRelativeTo(null);
            FlowLayout flayout = new FlowLayout();
            mainFrame.setLayout(flayout);
            mainFrame.getContentPane().add(myButton);
            mainFrame.getContentPane().add(myButton_2);
            mainFrame.pack();
            mainFrame.setVisible(true);
        public void actionPerformed(ActionEvent e) {
            if(myButton == e.getSource()) {
                   System.out.println("getOwnedWindows 1 " + mainFrame.getOwnedWindows().length);
                 createMultipleDialogs();
                int i = 0;
                   for (Window singleWindow : mainFrame.getOwnedWindows()) {
                        System.out.println("getOwnedWindows " + i++ + " "
                                  + singleWindow.isShowing() + " "
                                  + singleWindow.isVisible() + " " + singleWindow);
                   System.out.println("getOwnedWindows 2 " + mainFrame.getOwnedWindows().length);
                //System.gc();
                   System.out.println("getOwnedWindows 3 " + mainFrame.getOwnedWindows().length);
                //System.gc();
                   System.out.println("getOwnedWindows 4 " + mainFrame.getOwnedWindows().length);
            } else if (myButton_2 == e.getSource()) {
                   System.out.println("getOwnedWindows now: " + mainFrame.getOwnedWindows().length);
         public void createMultipleDialogs() {
              for (int a = 0; a < 10; a++) {
                   CustomDialog myDialog = new CustomDialog(mainFrame, false,
                             "Do you like Java?");
                   myDialog.dispose();
                   myDialog.customFinalize();
        public static void main(String argv[]) {
            TestTheDialog tester = new TestTheDialog();
    }Running the above code gives different output for JDK1.5 and JDK1.6
    I would appreciate your help in this regards.
    Thanks

    Fix your algorithm to check if the windows are displayable/showing instead of assuming they are?

  • Is this a bug in the JDK1.3.1 ?

    I get this error while using this method generated under forte 3.0 CE
    try {
                jInternalFrame1.setIcon(false);
            } catch (java.beans.PropertyVetoException e) {
                e.printStackTrace();
            }java.lang.NullPointerException
    at javax.swing.DefaultDesktopManager.maximizeFrame(DefaultDesktopManager.java:81)
    at javax.swing.plaf.basic.BasicInternalFrameUI.maximizeFrame(BasicInternalFrameUI.java:607)
    at javax.swing.plaf.basic.BasicInternalFrameUI$InternalFramePropertyChangeListener.propertyChange(BasicInternalFrameUI.java:423)
    at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:161)
    at javax.swing.event.SwingPropertyChangeSupport.firePropertyChange(SwingPropertyChangeSupport.java:130)
    at javax.swing.JComponent.firePropertyChange(JComponent.java:3208)
    at javax.swing.JInternalFrame.setMaximum(JInternalFrame.java:890)
    at TestInterface.initComponents(TestInterface.java:48)
    at TestInterface.<init>(TestInterface.java:15)
    at TestInterface.main(TestInterface.java:80)
    Has someone any idea of how i can maximise JinternalFrames without using the icon maximisable ??
    In advance thanks.

    at javax.swing.JInternalFrame.setMaximum(JInternalFrame.java:890)
    at TestInterface.initComponents(TestInterface.java:48)What you posted there cannot be the entire contents of the method. According to the stack trace, your initComponents method, at line 48, calls the setMaximum method of some JInternalFrame object. However, the problem remains: Why a NullPointerException? It's possible there is a bug in the JVM, but that theory doesn't get your problem solved if it's true. And it's more likely (MUCH more likely for most of us) that it's a bug in your program. But what could that be? I looked at the API documentation for JInternalFrame.setMaximum and noticed this:
    "A maximized frame is resized to fully fit the JDesktopPane area associated with the JInternalFrame."
    I don't know how you would "associate" a JDesktopPane with a JInternalFrame, but possibly if you failed to do that, then references to the JDesktopPane would fail with a NullPointerException.

  • Ridiculous bug in oracle jdeveloper compiler ojc with jdk1.4

    With simple class:
    public class Test
    public Test()
    public String toString()
    return null;
    public static void main(String[] args) throws Exception
    Test test = new Test();
    System.out.println("ooo" + test);
    After compile it with ojc (ojc Test.java) and run it with jdk 1.4.1_01 (java Test), it throws
    java.lang.NullPointerException
    at java.lang.String.concat(String.java:1541)
    But it works ok if compile it with standard java compiler(javac).

    Hi,
    Thanks for reporting this. It's a bug. I've logged it as 2809860, and you can track this on metalink.oracle.com.
    Brian
    JDev Team

  • Is That a bug of JDK1.4 beta3: too many paint times!!!!!

    Try to run the following program, ( u can use your img instead of mine)
    //package com.zhaoyoubing.java2d;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.awt.geom.*;
    import java.awt.image.*;
    import java.net.*;
    public class JavaImgTest extends JFrame {
    Image img;
    int it = 0;
    static String title = "Sooooooooo many paints ";
    public JavaImgTest() {
    super(title);
    setSize(300, 200);
    setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
    img = loadImage("http", "www.cad.zju.edu.cn", "/home/zhaoyb/yi-s.jpg");
    public void paint(Graphics g) {
    it++;
    setTitle(title + it);
    System.out.println(it);
    ((Graphics2D) g).drawImage(img, 10, 25, this);
    // this function from billday.com
    Image loadImage(String protocol, String machine, String file) {
    //Create the URL object representing our image bits.
    URL imageURL = null;
    try {
    imageURL = new URL(protocol,machine,file);
    } catch (MalformedURLException e) {
    System.out.println("Please verify your imageURL.");
    System.exit(1);
    //Now that we have a reference to the bits, let's create and
    //return the actual Image object to store them.
    Image myImage = getToolkit().getImage(imageURL);
    return myImage;
    public static void main(String[] args) {
    JavaImgTest img1 = new JavaImgTest();
    img1.show();
    following r my test paint times:
    1.4 beta3
    linux 66 84 48 90 75
    win2000 170 170 170 170 170
    1.3.1
    linux 3 3 3 3 3
    win2000 2 2 2 2 2
    1.2.2
    linux 5 6 6 4 3
    win2000 3 3 4 3 2
    I guess it should be a bug!!!

    I am not sure but shouldn't this line be:
    img = loadImage("http", "www.cad.zju.edu.cn", "/home/zhaoyb/yi-s.jpg");this:
    img = loadImage("http://", "www.cad.zju.edu.cn", "/home/zhaoyb/yi-s.jpg");

Maybe you are looking for