JDialog jdk1.5 vs jdk1.6

Hi,
I'm having a different behaviour when I'm executing the following code on jdk1.5 and 1.6 :
import java.awt.BorderLayout;
import java.awt.Color;
import javax.swing.JButton;
import javax.swing.JDialog;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JPasswordField;
import javax.swing.JTabbedPane;
import javax.swing.JTextField;
import javax.swing.event.ChangeEvent;
import javax.swing.event.ChangeListener;
class test extends JFrame {
     private JTabbedPane tabbedPane;
     private JPanel panel1;
     private JPanel panel2;
     private JPanel panel3;
     // Main method to get things started
     public static void main(String args[]) {
          // Create an instance of the test application
          test mainFrame = new test();
          mainFrame.setVisible(true);
     public test() {
          // NOTE: to reduce the amount of code in this example, it uses
          // panels with a NULL layout. This is NOT suitable for
          // production code since it may not display correctly for
          // a look-and-feel.
          setTitle("Tabbed Pane Application");
          setSize(300, 200);
          setBackground(Color.gray);
          JPanel topPanel = new JPanel();
          topPanel.setLayout(new BorderLayout());
          getContentPane().add(topPanel);
          // Create the tab pages
          createPage1();
          createPage2();
          // Create a tabbed pane
          tabbedPane = new JTabbedPane();
          tabbedPane.addTab("Page 1", panel1);
          tabbedPane.addTab("Page 2", panel2);
          topPanel.add(tabbedPane, BorderLayout.CENTER);
          tabbedPane.addChangeListener(new ChangeListener() {
               // This method is called whenever the selected tab changes
               public void stateChanged(ChangeEvent evt) {
                    JTabbedPane pane = (JTabbedPane) evt.getSource();
                    // Get current tab
                    int sel = pane.getSelectedIndex();
                    if (sel == 1) {
                         JDialog dial = new JDialog();
                         dial.setModal(true);
                         dial.setVisible(true);
     public void createPage1() {
          panel1 = new JPanel();
          panel1.setLayout(null);
          JLabel label1 = new JLabel("Username:");
          label1.setBounds(10, 15, 150, 20);
          panel1.add(label1);
          JTextField field = new JTextField();
          field.setBounds(10, 35, 150, 20);
          panel1.add(field);
          JLabel label2 = new JLabel("Password:");
          label2.setBounds(10, 60, 150, 20);
          panel1.add(label2);
          JPasswordField fieldPass = new JPasswordField();
          fieldPass.setBounds(10, 80, 150, 20);
          panel1.add(fieldPass);
     public void createPage2() {
          panel2 = new JPanel();
          panel2.setLayout(new BorderLayout());
          panel2.add(new JButton("North"), BorderLayout.NORTH);
          panel2.add(new JButton("South"), BorderLayout.SOUTH);
          panel2.add(new JButton("East"), BorderLayout.EAST);
          panel2.add(new JButton("West"), BorderLayout.WEST);
          panel2.add(new JButton("Center"), BorderLayout.CENTER);
}On jdk1.5 when I press the 2nd tab, the popup is displayed but the tab 2 is only displayed when I close the popup.
On jdk1.6 when I press the 2nd tab, the popup is displayed and tab 2 is also displayed even when I don't close the popup.
Does anyone had this kind of problem ?
I would expect to have the same behaviour on 1.5 and 1.6..
Is there any workaround to display the 2nd tab only when popup is close on jdk 1.6 ?
Regards
Tiago

It can easily be solved by inelegant kludge.
class test extends JFrame
  private JTabbedPane tabbedPane;
  private JPanel panel1;
  private JPanel panel2;
  private JPanel panel3;
  private boolean dlgShown = false; // *** class variable
    tabbedPane.addChangeListener(new ChangeListener()
      public void stateChanged(ChangeEvent evt)
        JTabbedPane pane = (JTabbedPane) evt.getSource();
        int sel = pane.getSelectedIndex();
        if (sel == 1)
          if (!dlgShown) // ***
            pane.setSelectedIndex(0); // ***
            JDialog dial = new JDialog();
            dial.setModal(true);
            dial.setPreferredSize(new Dimension(200, 100));
            dial.pack();
            dial.setLocationRelativeTo(null);
            dial.setVisible(true);
            dlgShown = !dlgShown; // ***
            pane.setSelectedIndex(1); // ***
          else
            dlgShown = !dlgShown;
}note: more elegant solutions most welcome!

Similar Messages

  • Difference between JDB of jdk1.3 & jdk1.4 (hot swap)

    Hello all,
    I have compiled & enahnced ny classes using jdk1.3.
    By enhancing the classes I mean I am modifying the classfile at bytecode level & not at source code level. For enhancing the classes we load the original classes once & then change the bytecodes.
    When I try to debug the the classes after enhancement using JDB of jdk1.3 I am getting error like,
    "Unable to set breakpoint Person:11 : No linenumber information for Person. Try compiling with debugging on."
    But when debugged the class using JDB of jdk1.4 its working fine.
    Did anybody come around this situation anytime?
    Do anybody know , is there any difference in JDB of jdk1.3 & jdk1.4?
    According to jdk1.4 datasheet, JDB 1.4 provides one feature
    called "hotswap". Does this feature helping us to debug the classes even after enhancement? If yes then how it is doing?

    Hello all,
    I have compiled & enahnced ny classes using jdk1.3.
    By enhancing the classes I mean I am modifying the
    e classfile at bytecode level & not at source code
    level. For enhancing the classes we load the original
    classes once & then change the bytecodes.What kind of changes are you making when you "enhance"?
    Do you write the modified .class files out again, and
    then run them? Is the debug information in the new .class
    file (line number table, local variable information, etc)
    still accurate and consistent after your modification?
    Do the enhanced classes run OK when you turn on verification?
    EG: without debugging, can you run them with -Xfuture
    added to the command line?
    Can you use javap -l -verbose <class id> to inspect
    the modified class?
    When I try to debug the the classes after
    r enhancement using JDB of jdk1.3 I am getting error
    like,
    "Unable to set breakpoint Person:11 : No linenumber
    information for Person. Try compiling with debugging
    on."
    But when debugged the class using JDB of jdk1.4 its
    working fine.
    Did anybody come around this situation anytime?
    Do anybody know , is there any difference in JDB of
    jdk1.3 & jdk1.4?
    According to jdk1.4 datasheet, JDB 1.4 provides one
    feature
    called "hotswap". Does this feature helping us to
    debug the classes even after enhancement? If yes then
    how it is doing?"hotswap" allows you to redefine the bytecodes of a class. Not all
    JVM implementations support this feature. Refer to this page for more
    information:
    http://java.sun.com/j2se/1.4.1/docs/guide/jpda/jdi/com/sun/jdi/VirtualMachine.html#redefineClasses(java.util.Map)
    redefineClass is implemented in the jdb reference debugger
    via the redefine <class id> <class file name> command.

  • On solaris10, Performance of  JDK1.6_12/JDK1.6_19 is worse than JDK1.5_22?

    1. My test is ON solaris 10
    bash-3.00# cat /etc/release
                           Solaris 10 5/08 s10s_u5wos_10 SPARC
               Copyright 2008 Sun Microsystems, Inc.  All Rights Reserved.
                            Use is subject to license terms.
                                 Assembled 24 March 2008
             T-3000 Recovery Version:  T3.04.01.01  Tue Nov 25 08:25:07 CST 2008
    bash-3.00#
    bash-3.00# showrev
    Hostname: T2000G2
    Hostid: 84cb7384
    Release: 5.10
    Kernel architecture: sun4v
    Application architecture: sparc
    Hardware provider: Sun_Microsystems
    Domain: emsdomain
    Kernel version: SunOS 5.10 Generic_137111-052. My test code:
    public class Test {
        public static void main(String[] args){
            long start = System.currentTimeMillis();
            int n=0;
            for (long i=0;i<100000000;i++){
                n ++;
            System.out.println("time: "+(System.currentTimeMillis()-start)/1000.0);       
    }3.Test result
    a) Default JDK is JDK1.6_12.
    It print:
    bash-3.00# java Test
    time: 2.834b) Latest JDK1.6_19:
    It print:
    bash-3.00# java Test
    time: 2.912c) JDK1.5_22
    It print:
    bash-3.00# java Test
    time: 1.0394.Summary:
    JDK1.6_12/JDK1.6_19 is almost *3 times slower than* JDK1.5_22.
    After J2SE_Solaris_10_Recommended.zip is installed(ONLY part of them is installed successfully),
    the result is the same!!!
    Does this because the solaris 10 OS is not patched with the latest patch[10_Recommended.zip]?
    Edited by: xiangyingbing on Apr 8, 2010 8:31 PM

    I am wondering why the default JDK1.6_12 on solaris is sooooooooooooooooo slow&#65281;&#65281;&#65281;
    I am wondering why the default JDK1.6_12 on solaris is sooooooooooooooooo slow&#65281;&#65281;&#65281;
    I am wondering why the default JDK1.6_12 on solaris is sooooooooooooooooo slow&#65281;&#65281;&#65281;

  • 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?

  • Diff Between Jdk1.3 & Jdk1.4(abt stack trace)

    Jdk 1.4 gives a facility that we can aceess stack trace across jvms but we cant' do it through 1.3. If we want to achieve through jdk1.3 then how can we do it.

    See printStackTrace(PrintStream s) and printStackTrace(PrintWriter s)
    Kaj

  • Changing from JDK 1.2 to JDK1.3

    Hello,
    I have JDK1.2, JDK1.3 and JDK 1.4 in my system. By default the version is taken as JDK 1.2.
    I need to change this to 1.3. I have tried changing the registry settings which didn't work.
    Any suggestions on this would be appriciated
    Regards
    V123

    Maybe my question did not have the correct approach.
    I need to develop a web service client which must run on java virtual machine 1.2
    I ve tried with axis, glue and jax-rpc but all they need the java.lang.reflect.InvocationHandler interface available since jdk1.3
    So the question is: What can I use to write that client without that interface?

  • No ocijdbc8 Error (RH71,ORA816,JDK1.3)

    I meet same ploblem when change any element
    for connect remote db:
    Exception in thread "main" java.lang.UnsatisfiedLinkError: no ocijdbc8 in java.l
    ibrary.path
    at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
    at java.lang.Runtime.loadLibrary0(Runtime.java:749)
    at java.lang.System.loadLibrary(System.java:820)
    at oracle.jdbc.oci8.OCIDBAccess.logon(OCIDBAccess.java:209)
    at oracle.jdbc.driver.OracleConnection.<init>(OracleConnection.java:198)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.ja
    va:251)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:224)
    at java.sql.DriverManager.getConnection(DriverManager.java:517)
    at java.sql.DriverManager.getConnection(DriverManager.java:177)
    at JdbcCheckup.main(JdbcCheckup.java:42)
    the program is $ORACLE_HOME/jdbc/demo/samples/oci8/bisic_samplem/JdbcCheckup.java
    OS: RH7.1(japanese)
    JDK : JDK1.3(JDK1.2.2 dont work on RH71)
    ORACLE: oracle EE816 for Linux
    (libocijdbc8.so is in the $ORACLE_HOME/lib)
    JDBC: classes12.zip for solaris(oracle816)
    please help me,thank you.
    xu
    null

    Xu Fang,
    OCI8 (JDBC 1.2 'thick' driver) is not supported on Linux (8.1.5,8.1.6 or 8.1.7). You can use the thin driver, but not the OCI8 driver.
    Regards,
    Josue Amaro
    Linux Product Manager
    Oracle Corporation
    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Xu FANG ([email protected]):
    I meet same ploblem when change any element
    for connect remote db:<HR></BLOCKQUOTE>
    null

  • Pls help me, where can i find the place to download JDK1.2 ?

    pls help me, where can i find the place to download JDK1.2 ?
    i think the download site has been moved to elsewhere...
    i have searched for the site but it is coming as japanese site.
    kindly guide me to locate the download page

    Go to the URL:
    http://java.sun.com/products
    There you shall find a drop-down combobox listing all the products. Select the JDK1.2/JDK1.3 and proceed.
    Ironluca :D

  • JDK1.4 Vs JDK1.3

    Hello Gurus,
    Is there any doc saying what are all the differences between JDK1.4 &
    JDK1.3 ?
    Thanks In Advance,
    Olabora.

    If you are talking about new feature of JDK 1.4, check out:
    http://java.sun.com/j2se/1.4/docs/relnotes/features.html
    These are different from JDK 1.3.x

  • Application crashes when using JNI with Jdk 1,2, 1.3 and 1.4

    Hi!
    I have this application that has a GUI written in Java and a file parser written in C. JNI is used to connect these parts together. The problem is that the application only works when I am using jdk 1.1.8 but not when using jdk1.2, jdk1.3 or jdk1.4. I am running the application on a Solaris 8 machine.
    I have not written the application myself but I am going to be working with it from now on. But I have today little knowledge with JNI and I have tried different approaches to solve the problem. For example I have tried to used DDD together with GDB to find out what the problem is but with no luck. When I run the application using jdk1.4 I get the following error when the JVM crashes:
    An unexpected exception has been detected in native code outside the VM.
    Unexpected Signal : 10 occurred at PC=0xFA023164
    Function=Java_Bitmap_setDebug+0x1C
    Library=/usr/u/lal/micview/micview2_1_0_beta1/libBitmapImpl.so
    Current Java thread:
    at Bitmap.setDebug(Native Method)
    at DisplayPanel.loadFile(DisplayPanel.java:396)
    at MicPlot.loadFile(MicPlot.java:1452)
    at MicPlot.loadFile(MicPlot.java:1441)
    at MicPlot.miOpen_Action(MicPlot.java:1267)
    at MicPlot$SymAction.actionPerformed(MicPlot.java:1184)
    at java.awt.MenuItem.processActionEvent(MenuItem.java:588)
    at java.awt.MenuItem.processEvent(MenuItem.java:548)
    at java.awt.MenuComponent.dispatchEventImpl(MenuComponent.java:285)
    at java.awt.MenuComponent.dispatchEvent(MenuComponent.java:273)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:452)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:197)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:150)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:144)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:136)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:99)
    Dynamic libraries:
    0x10000 /opt/java/jdk1.4/bin/java
    0xff360000 /usr/lib/libthread.so.1
    0xff3a0000 /usr/lib/libdl.so.1
    0xff280000 /usr/lib/libc.so.1
    0xff270000 /usr/platform/SUNW,Ultra-4/lib/libc_psr.so.1
    0xfe000000 /opt/java/j2sdk1.4.1/jre/lib/sparc/client/libjvm.so
    0xff220000 /usr/lib/libCrun.so.1
    0xff200000 /usr/lib/libsocket.so.1
    0xff100000 /usr/lib/libnsl.so.1
    0xff1d0000 /usr/lib/libm.so.1
    0xff250000 /usr/lib/libw.so.1
    0xff0e0000 /usr/lib/libmp.so.2
    0xff0b0000 /opt/java/j2sdk1.4.1/jre/lib/sparc/native_threads/libhpi.so
    0xff080000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libverify.so
    0xff030000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libjava.so
    0xfe7e0000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libzip.so
    0xfe4e0000 /usr/lib/locale/en_US.ISO8859-1/en_US.ISO8859-1.so.2
    0xedd00000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libawt.so
    0xfc480000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libmlib_image.so
    0xfc410000 /opt/java/j2sdk1.4.1/jre/lib/sparc/motif21/libmawt.so
    0xeda80000 /usr/dt/lib/libXm.so.4
    0xfa090000 /usr/openwin/lib/libXt.so.4
    0xfa3d0000 /usr/openwin/lib/libXext.so.0
    0xfc7e0000 /usr/openwin/lib/libXtst.so.1
    0xed980000 /usr/openwin/lib/libX11.so.4
    0xfa2a0000 /usr/openwin/lib/libdps.so.5
    0xfa3b0000 /usr/openwin/lib/libSM.so.6
    0xfa1d0000 /usr/openwin/lib/libICE.so.6
    0xed880000 /opt/java/j2sdk1.4.1/jre/lib/sparc/libfontmanager.so
    0xfa390000 /usr/openwin/lib/locale/common/xlibi18n.so.2
    0xfa1b0000 /usr/openwin/lib/locale/iso8859-1/xomEuro.so.2
    0xfa190000 /usr/lib//liblayout.so
    0xfa050000 /usr/openwin/lib/locale/common/ximlocal.so.2
    0xfa010000 /usr/u/lal/micview/micview2_1_0_beta1/libBitmapImpl.so
    Local Time = Thu Oct 3 13:32:47 2002
    Elapsed Time = 35
    # The exception above was detected in native code outside the VM
    # Java VM: Java HotSpot(TM) Client VM (1.4.1-beta-b14 mixed mode)
    # An error report file has been saved as hs_err_pid27692.log.
    # Please refer to the file for further information.
    Abort
    From this information I think that the problem should be in the native method setDebug. But I have tried to set a breakpoint at the beginning of that function in the C part but with no luck. The application crashes before it reaches that position in the C file.
    What could possibly go wrong between the setDebug function in the C part and the function call in the Java part?
    When using GDB, GDB cannot figure out what is wrong it just returns a hex address, no function name.
    I would really appreciate some help. I have tried everything that I can come up with!
    Best regards
    Lars

    I have figured out that the application fails on its first call to the native methods.
    So I have this Bitmap class that contains all the native calls and it is defined shortly as follow:
    public class Bitmap {
    static {
    System.loadLibrary("BitmapImpl");
    native void setDebug(int debuglevel, int statistics);
    There are many more native methods defined in Bitmap, but I only show the setDebug method because that is the first one that is executed and also the one that immediately fails.
    My setDebug C function is defined as follow in BitmapImpl.c
    #include <time.h>
    #include <stdio.h>
    #include <limits.h>
    #include <fcntl.h>
    #include <jni.h>
    #include <math.h>
    #include <errno.h>
    #include "Bitmap.h"
    #include "data.h"
    jint debug = 0;
    jint statistics = 1;
    JNIEXPORT void JNICALL Java_Bitmap_setDebug
    (JNIEnv *jenv, jobject jo, jint d, jint s)
    debug = d;
    statistics = s;
    My libBitmapImpl.so file is compiled using the following Makefile and using GNU gcc:
    JAVAPATH=$(JAVAINCLUDEPATH)
    LMACRO=-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -DSOLARIS
    CSOURCE=BitmapImpl.c
    all:
    gcc -O3 -G $(LMACRO) -I$(JAVAPATH) -I$(JAVAPATH)/solaris \
    $(CSOURCE) -o libBitmapImpl.so
    It is still a total mystory why the application fails. I have tried it on a RedHat Linux machine and there it works fine. But not on Solaris. Only if I use the jdk1.1.8 but not a later one.
    Would really appreiciate some help!
    Best regards
    Lars

  • How to compile my java application for Personal Java??

    i write a simple program and want to run it in PJEE.
    program is:
    import java.awt.*;
    public class TestApp {
    public static void main(String[] args) {
    Frame f = new Frame();
    f.pack();
    f.setSize(300,300);
    f.show();
    and i compiled it using JDK1.4
    javac TestApp.javathen i want to test it by using pjava
    pjava TestAppbut i got a error message:
    Error loading class TestApp: Bad major version numberplease tell me what it is mean and how i can debug it, thanks.

    hi, all
    i have resolved my question by myself.
    because:
    |-> personal java
    |
    jdk1.1 -> jdk1.2 -> jdk1.4
    so, i must compile the java file by using jdk1.1.x
    :)

  • OBIEE 11.1.1.6.0 installation on Win 7 / 32bit OS

    Hi Guys,
    Tell me one thing, installing OBIEE 11.1.1.6.0 is on win 7 32 bit OS is possible ?
    I was trying to install it on my Lenovo thinkpad T430 laptop, but i t always failing at "Configuring Domain" failed, i tried for atleast 20 times but no luck.
    My Environment details are
    OS : Win 7, 32 bit OS
    Database: Oracle 11g R2 SE
    Java : Jdk1.7/Jdk1.6
    RAM : 4GB
    I set the below Environment variables
    TEMP : C:\TEMP
    TMP : C:\TMP
    CLASSPATH : .;C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip;C:\Java\jdk17\lib
    Path : C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\CgScripts\Support Tools\;C:\Java\jdk17\bin;
    JAVA_HOME : C:\Java\jdk17\bin
    Do i need to set up any thing apart from these, all above variables i have mentioned are pointing to right path ??????
    Edited by: Siva Budagam on Sep 10, 2012 1:52 AM

    Hi,
    install OBIEE 11g 4GB Ram required but 32 Bit OS Ram will show only 2.9GB Only?
    3GM RAM will work but it will be running very slow (for practice obiee11g apps simple ok. make sure can can't use more application install) you go with 2.9GB ..practicing
    How to install OBIEE 11G in 32 BIt version.
    refer the below just go with simple install
    Simple install:
    http://santoshbidw.wordpress.com/2012/05/12/obiee-11g-installation-11-1-1-6-on-windows-7-64bit-os/
    http://123obi.com/2011/01/obiee-11g-installation-on-windows7-64-bits-part1
    While install OBIEE 11g what option we need to select means(Simple,Enterprise,Software ).
    for practicing better to go with simple (default configuration)
    2. Second Laptop windows 7 64bit.
    I have installed successfully RC and web logic but while installing OBIEE 11g last 13 step configuration part its failed?
    please refer the below
    make sure the below thinks,
    1) Lookback adaptor (for setting Static IP address in your PC) check it CMD Propmt
    http://gerardnico.com/wiki/windows/loop_back_adaptater
    2) JDK 1.6.0_29 or 31 32bit should be installed on your PC make Enviromnet path (Javac comment in CMD)
    http://confluence.atlassian.com/display/DOC/Setting+the+JAVA_HOME+Variable+in+Windows
    3) if your obiee11g installation option is "Simple" you have to create and install RCU in your PC(execute RCU script,RUN rcu 32 bit on windos 7 os)
    if your installation option ("Enterprise" or "Software Only") method befor installing obiee you shold install weblogi server 10.3.5/6 win 32 bit version and configure you domain.
    Create Domain failed if it is failed almost remaining also fails finally my installation failed.?
    make sure static IP address configured properly (looback adaptor) and make sure u r jdk is running and environment variable working condition
    OBIEE 11g 64bit:- What type we need to select means(Simple/Enterprise, Software)
    your case go with simple install (default config.) because enterprise/software only will need some more memory due to weblogic separate install
    Ref:
    Simple install:
    http://santoshbidw.wordpress.com/2012/05/12/obiee-11g-installation-11-1-1-6-on-windows-7-64bit-os/
    http://123obi.com/2011/01/obiee-11g-installation-on-windows7-64-bits-part1
    Enterprise install
    http://allaboutobiee.blogspot.in/2012/04/obiee-111160-step-by-step-installation.html
    Software only install:just refer my blog
    http://obieeelegant.blogspot.com/2012/03/obiee-111160-installation-on-windows-7.html
    http://obieeelegant.blogspot.com/2011/09/obiee-11g-111150-software-only.html
    if its Development,UAT and Producton system--->the best way go for software only install (development and production) if u want to go for practice purpose then just go for simple install

  • Jvm 1.4,1.5 default memory usage in Ram in different operating systems

    Hi ,
    Can anyone help me with the default memory occupied by Jvm in different operating systems ?
    I have practically seen that jdk1.4,jdk1.5,jdk1.3 has around 64 Mb as the
    default size on 32 bit machines .
    I am in need of the similar data for jvms on Solaris,Unix and Linux machines . Also much curious to know about the default memory occupied on 64 bit machines. It would be really great if the statistical data is present in any link .
    Thanks and Regards
    Suman

    Default Heap sizes on 64 bit JVM are by default 30% bigger then the 32bit version to accomodate the extra memory used by 64 bit object pointers instead of 32 bit.
    This link plus documents close to it answers most questions.
    http://java.sun.com/docs/hotspot/gc5.0/gc_tuning_5.html#1.1.%20Types%20of%20Collectors%7Coutline

  • Install JAXB and JAXP only

    Hi,
    We want to use the funtion of JAXB and JAXP
    but do not want to use the whole java web service
    Can the JAXB and JAXP work separately on JDK1.2/JDK1.3.1
    Jacinle

    The Jaxb directory in jwsdp-1.2 dir has the JAXB implementation.
    The Jaxp directory in jwsdp-1.2 dir has the JAXP implementation.

  • RTPSocketPlayer run in failure

    I downloaded AVTransmit2.java, AVReceive2.java and RTPSocketPlayer.java
    I have 2 projects both using j2sdk1.4.2_04.
    one project run AVTransmit2 in Computer1 in my Lan,
    another project run AVReceive2 and RTPSocketPlayer in Computer2 in the same Lan.
    at the line no.50 in RTPSocketPlayer.java,
    I modified-->the String address="10.7.123.123";
    For traceing the error,I add
    two lines before and after "mysock.receive(dp);" at the line no.197 in RTPSocketPlayer.java
    as:
    long t=System.currentTimeMillis();
    mysock.receive(dp);               
    System.out.println("mysock.receive(dp) take : "+(System.currentTimeMillis()-t)+" miniSeconds");
    In Computer1,I run AVTransmit2 ,got as:
    (If the parameters "vfw://0" is replaced by "file:/C:/media/test.mov"
    I got same result ! In my case,I have no Mic in my webCam!)
    C:\>java AVTransmit2 vfw://0 10.7.123.123 9000
    Track 0 is set to transmit as:
    H263/RTP, 352x288
    Created RTP session: 10.7.123.123 9000
    Start transmission for 60 seconds...
    ...transmission ended.
    In Computer2,I run AVReceive2 ,got as:
    C:\>java AVReceive2 10.7.123.123/9000
    - Open RTP session for: addr: 10.7.123.123 port: 9000 ttl: 1
    - Recevied new RTP stream: H263/RTP
    The sender of this stream had yet to be identified.
    - Waiting for RTP data to arrive...
    - A new participant had just joined: Administrator@y64-fly
    - A new participant had just joined: Administrator@y640
    - The previously unidentified stream
    H263/RTP
    had now been identified as sent by: Administrator@y640
    - Got "bye" from: Administrator@y640
    Exiting AVReceive2
    This is as I expected,It succeed !
    In Computer1,I run AVTransmit2 again as:
    C:\>java AVTransmit2 vfw://0 10.7.123.123 9000
    Track 0 is set to transmit as:
    H263/RTP, 352x288
    Created RTP session: 10.7.123.123 9000
    Start transmission for 60 seconds...
    ...transmission ended.
    In Computer2,I run RTPSocketPlayer ,I get failure as:
    C:\>java RTPSocketPlayer
    mysock.receive(dp) take : 16 miniSeconds
    mysock.receive(dp) take : 16 miniSeconds
    mysock.receive(dp) take : 187 miniSeconds
    mysock.receive(dp) take : 0 miniSeconds
    mysock.receive(dp) take : 188 miniSeconds
    mysock.receive(dp) take : 171 miniSeconds
    Cannot create the RTP Session: 1
    java.lang.NullPointerException
    at com.sun.media.content.rtp.Handler.doClose(Handler.java:294)
    at com.sun.media.BasicController.close(BasicController.java:261)
    at com.sun.media.BasicPlayer.doFailedRealize(BasicPlayer.java:1331)
    at com.sun.media.content.rtp.Handler.doFailedRealize(Handler.java:277)
    at com.sun.media.RealizeWorkThread.failed(BasicController.java:1412)
    at com.sun.media.StateTransitionWorkThread.run(BasicController.java:1346)
    mysock.receive(dp) take : 16 miniSeconds
    java.lang.NullPointerException
    at com.sun.media.content.rtp.Handler.updateStats(Handler.java:670)
    at com.sun.media.StatsThread.process(BasicPlayer.java:1841)
    at com.sun.media.util.LoopThread.run(LoopThread.java:135)
    mysock.receive(dp) take : 3844 miniSeconds
    The main error is "Cannot create the RTP Session: 1"
    I really wonder why AVReceive2 can receive AVTransmit2
    but RTPSocketPlayer can not receive AVTransmit2 ?
    I have tried to use jdk1.3 ,jdk1.4 ,but I got same error.
    Thank for any response !

    Not recently. Most of that class has been depricated.

Maybe you are looking for

  • Can't open photo in Elements 9

    I am unable to open the edit page after not saving the last photo I worked on in elements 9 can anyone please advise

  • Can I put two h:dataTable in one page?

    I find that if I put two dataTables in the same page, something goes wrong. Any solution to this? Thanks in advance.

  • Cannot load webpage

    Sorry, reposting under new topic as I posted earlier in wrong thread. My problem is Safari automatically deletes first portions of legitimate website addresses and then I get an error message that Safari cannot find the server. For example i type in

  • MS office Word doc to Appleworks

    I have had MS Office on my Emac for the past two years. I have decided I want to go to AppleWorks. I can't seem to find information on how to do this. Jim

  • Can I change the default keyboard shortcuts?

    Hi, I was wondering if it was possible to change some of the default keyboard shortcuts. Some of the actions I use quite frequently have 4-button shortcuts that require a lot more dexterity than I have and I was hoping I can change them to something