Jdk1.4,a problem

I have used jdk1.3.1 write a application,in it,chinese can be shown well,but when i use jdk1.4,chinese changed to square,why? Is this a bug in jdk1.4?
How to resolve it?
thanks!

i can use setFont() method to resovle it,but why in jdk1.3 may not use method setFont()???

Similar Messages

  • Jdk1.4 Timer problem

    Hi all,
    I am using the Timer class provided with JDK1.4. During scheduling, you take the current time as the reference time for relative timer. Everything is ok if i dont change the system time.
    But consider this scenario. If i have a heartbeat timer (which dont worries about the current time) which ticks every 500 milliseconds ( after some 5 to 6 ticks I am disconnecting from the server) but when I change the system time, the heartbeat will tick many number of times depending on the changed time assuming that timout is happened and get disconnected with the server.
    How can I solve this? If it can't be done with jdk timer, please help in identifying a solution for this?
    TIA
    Karthik

    In response to cpolizzi: (Not in original posting order)
    One reason that I do not like the
    javax.swing.Timer is that it requires a
    graphical subsystem to be present.One would expect that from a javax.swing class, yes. Swing is a graphical toolkit.
    Digressing slightly, note that since Java 1.4, the AWT no longer needs a graphical subsystem to be present, so image manipulation (and such) is now possible on headless J2EE servers.
    The Java application created and started both J2SE
    supplied timers each for a one minute delay as well as
    two other threads. One thread does a
    Thread.sleep for one minute and the other
    thread does an Object.wait with a timeout for
    one minute on a locally created object to synchronize
    on. After the two timers and threads were started,
    which I tried to start as close as possible, the main
    application thread also does a Thread.sleep for
    one minute. After the main application thread went to
    sleep, I changed the system clock back by one minute.
    The results: the two threads doing a
    Thread.sleep and Object.wait "woke" back
    up after one minute even despite the change in the
    system clock as did the main application thread also
    doing a Thread.sleep. However, the two J2SE
    supplied timers did not. Instead, each of those
    timers "expired" when the system clock reached one
    minute after the time in which each one was scheduled
    or started. I encountered this behavior on both of
    the JVM's I have loaded on my W2K box.This is 100% correct behaviour, exactly as I would expect.
    I also tried setting the system clock ahead by 30
    seconds, one minute and even five minutes after
    everything is going and it seems that the J2SE timers
    were not affected - each expired right when other
    threads resumed from their sleep and wait. I
    encountered this behavior on both of the JVM's I have
    loaded on my W2K box.Once again, this behaviour is as close to correct as is reasonably possible.
    Without delving into the implementation into either
    one of the J2SE supplied timers, it seems to me that
    both of these timers, when they are effectively
    started ticking, calculate the expected expiration
    time relative to the current system time and use a
    polling mechanism on seperate threads.Perhaps you should have delved.
    java.util.Timer works on a priority queue of tasks. It will wait (using Object.wait()) for the time period required for the next task to expire, and then test if the task has indeed expired, through a comparison to System.currentTimeMillis(). If it hasn't, presumably because of spurious wakeup, it will again wait until it expects the task to expire and retest. Exceptions to this flow may occur if the task queue changes - if a task is scheduled or rescheduled, so the expected closest expiry time is closer than the current waiting time, then the wait will be interrupted and recalculated. If the next task is unscheduled, then the wait will be interrupted and recalculated for the next task in line.
    Thus, if you move the system time back, then the timer will indeed wait until the Task's scheduled expiry date/time has been reached... if you move the system time forward, then when the timer wakes up from its wait, it will realise that the task has indeed expired and it will fire as expected, unless it is deemed too late to fire.
    To summarise, java.util.Timer is an optimal implementation of a single-threaded event scheduler for events scheduled to execute at a particular time in the future, marked by a given date and time. See below for comments on spurious wakeup for why this is so.
    My bottom line expectation is that when it comes to
    relative timers, a duration is a duration regardless
    of what happens to the system's notion of current
    time.You will note that java.util.Timer offers a cron-like facility for tasks to be performed at set times during the day. It can also be used to perform tasks at set time intervals, but such behaviour requires a constant and predictable system time.
    You should further note that changing the system time will not prevent a task executing, unless the system time has been moved later than the allowable execution time for a particular task - which is exactly defined in the documentation, and the most correct behaviour that could be reasonably expected.
    Aside from the fact that I find this behavior of the
    supplied J2SE timers unacceptable, that is if the
    synopsis is correct, I need to find a way around this
    problem. The only reasonable course of action that I
    have is to implement my own timers. Fortunately, the
    impact to any dependent code at work will be isolated
    since I have already abstracted the J2SE timer
    dependencies from the clients.This is correct. If you want custom, specific behaviour in a context that provided system classes do not cater for, then you will need to either find an alternate implementation or build your own.
    Digressing again, all waits should be performed in a while loop to prevent against spurious thread wakeup. The wait condition should hold the definitive break condition for the wait loop... in the case of an accurate timer, the break condition is that the required number of milliseconds have passed since the wait was entered. I challenge you to implement an accurate timer that is not dependent on the system time and is protected against spurious wakeup.
    Spurious wakeup is not just theoretical - I have actually had to rework a non-protected wait() providing a simple delay into a time-dependent looping wait because I was experiencing consistent spurious wakeup in a particular circumstance. I still don't know what the circumstance was exactly, but double-checking against the system time meant I didn't have to (Incidentally, the spurious wakeup didn't recur, so the system was not ever reduced to polling)
    As for the java.util.Timer, each timer has its
    own queue which runs on a seperate VM thread. So, if
    I go and create thousands of timers (ala new
    java.util.Timer()) I get thousands of VM threads.Why would you expect any different? java.util.Timer supports arbitrarily many tasks being scheduled at any particular time (Subject to restrictions as mentioned in the java.util.Timer javadoc documentation), so only one Timer object needs to be created. More than one may be created, so distinct subsystems of a framework can execute completely distinct timers (ie- one subsystem's timer failing for any reason won't bring the other subsystems' timers down). If you dislike such flexibility, feel free to devise your own interface.

  • My JDK1.6.0_12 problems

    I downloaded JDk 6 update 12 the other day and I must have done something wrong like deleted a file or installed it wrong or something. But now when I try to uninstall the JDK it wont let me. It will load up the uninstall process but when it gets like half way through it just stops and sort of rewinds its self. No error message comes up or anything. Then when I search for the file in my computer nothing comes up. I was wondering if anybody out there knew how to fix this issue with my java. If you do I would really appreciate if you could leave a reply telling me how. Thank you.

    Welcome to the Sun forums.
    surajnikhil wrote:
    I am having an applet say A1, from which I am calling another applet say A2.
    From A2 I am try to open a webpage by using "ShowDocument(url,+name+)" method.
    I want to launch the webpage in the same Window of the applet A2.Why not say instead, something entirely more specific. Say a link to a live example on the net.
    It does not have to be the real applets(1), in fact it is probably better if it isn't. We just need a small example that acts as you describe. This example will allow us to determine many things, including whether intricacies in the HTML might contribute to the problem.
    (1) You might base the 2nd one around a little test applet I created to help test Appleteer.
    It is at [http://pscode.org/eg/applet/methods.html|http://pscode.org/eg/applet/methods.html].

  • Servlet Filter not working in JDK1.3.1

    Hi,
    I have an authorization filter which was deployed in WebSphere5.0 which is configured under datasource5(oracle thin driver) with jndi.
    observed facts
    ===============
    WebSphere 5.0 comes with jdk1.3.1. and supports datasource 4/5.0
    datasource 5.0 will support servlet2.3.
    Servlet 2.3 depends on jdk1.2.
    Problem
    ========
    When i am trying execute my filter in websphere its giving the below given error:
    IntranetAuthorizationFilter was found, but is missing another required class.
    ]: java.lang.NoClassDefFoundError: java/lang/CharSequence
    at java.lang.Class.newInstance2(Native Method)
    at java.lang.Class.newInstance1(Class.java(Compiled Code))
    at java.beans.Beans.instantiate(Beans.java(Compiled Code))
    at java.beans.Beans.instantiate(Beans.java:77)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.loadFilter(WebAppFilterManager.java:292)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterInstanceWrapper(WebAppFilterManager.java:161)
    at com.ibm.ws.webcontainer.filter.WebAppFilterManager.getFilterChain(WebAppFilterManager.java:208)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.handleWebAppDispatch(WebAppRequestDispatcher.java:1044)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.dispatch(WebAppRequestDispatcher.java:588)
    at com.ibm.ws.webcontainer.webapp.WebAppRequestDispatcher.forward(WebAppRequestDispatcher.java:206)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.doForward(WebAppInvoker.java:80)
    at com.ibm.ws.webcontainer.srt.WebAppInvoker.handleInvocationHook(WebAppInvoker.java:214)
    at com.ibm.ws.webcontainer.cache.invocation.CachedInvocation.handleInvocation(CachedInvocation.java:71)
    at com.ibm.ws.webcontainer.srp.ServletRequestProcessor.dispatchByURI(ServletRequestProcessor.java:182)
    at com.ibm.ws.webcontainer.oselistener.OSEListenerDispatcher.service(OSEListener.java:334)
    at com.ibm.ws.webcontainer.http.HttpConnection.handleRequest(HttpConnection.java:56)
    at com.ibm.ws.http.HttpConnection.readAndHandleRequest(HttpConnection.java:615)
    at com.ibm.ws.http.HttpConnection.run(HttpConnection.java:439)
    at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:672)
    My filter is not using java/lang/CharSequence anywhere.
    Can someone figureout why this problem is coming.
    Regards
    Srinivas

    As you probably know, CharSequence is an interface. Such classes as String implement this interface in JDK 1.4. So if you are trying to use filter compiled under JDK 1.4 then you certainly will meet the problem.

  • How to use jdk1.4 + jbuilder5

    In Jbuilder, Configure jdk for jdk1.4. And from Borland Open Tools website download the CompileFile1.5 .
    Install this tool, you can compile java file using jdk1.4\bin\javac in Jbuilder.
    Perhaps you would deselect Jbuilder Option: "Project->Default Project Properties->Run->Compile before running" and "Compile before debugging".
    Then you can compile and run java file using jdk1.4.

    The problem is, I need rmic as well - and that is NOT done by this (otherwise very useful) tool. Of course, I can do it by hand each time - but in that case: why use an IDE anyway?
    Has anyone got a solution for this itty bitty problem?

  • A rmiregistry problem!

    i type rmiregistry &
    but return a error...
    Invalid JAVA_HOME: .;d:\JBuilerX\jdk1.4;d:\JBuilderx\jdk1.4\jre\lib
    i don't know why ,look forward to answering

    But i have set my JAVA_HOME=d:\JBuilerX\jdk1.4,the problem is persist...
    i try another way:
    i run rmiregisty & at jre/lib directory,it can work,but when i back to my package and
    execute java RemoteBAnkServer,it return a error:
    java.rmi.ServerException: RemoteException occurred in server thread; nested exce
    ption is:
    java.rmi.UnmarshalException: error unmarshalling arguments; nested excep
    tion is:
    java.lang.ClassNotFoundException: graduatedesign.RemoteBankServer_Stub
    but i have use rmic generate the RemoteBankServer_Stub.class file....
    hope for help!

  • Printing problem!Please answer

    My program prints some images and texts , everything ok but images are colorless or grayscale , the strange thing ; it prints on hp deskjet printer well ,but on hp laserjet that problem occurs. Is there a problem with my program or there is a driver problem ?Any idea please?

    try the jdk1.3
    some problems were solved
    ...

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

  • Binding default action of JTextComponent  with JDK1.2 & 1.3

    Hello,
    I have a specific text component who extends JTextField. This component must work on JDK1.3 & 1.2.
    I catch certain key events in the method processComponentKeyEvent to have the control over my component (in particular VK_BACK_SPACE, VK_LEFT and VK_RIGHT) and I don't want the default action inherit from JTextComponent to be exectued. With JDK1.2 this problem doesn't appear because I think the event is consume when it is thread by the processComponentKeyEvent and the operation of searching in the default key actions is not executed. But, with JDK1.3 they change the model of mapping key to event and the default actions are executed although the event is passing by the processComponentKeyEvent and e.consume was call. I find something who work on JDK1.3 by binding the default actions of key events with a "null" action. I do something like :
    myField.getInputMap().put(myKeyStroke, "none");
    My problem is that my components must work both with JDK1.3 & 1.2 without having two different versions of the component but the solution doesn't compile because getInputMap(KeyStroke, objectKeyToAction) doesn't exist on JDK1.2.
    I try to removeActionFromKeyStroke method but it doesn't work and in plus, the change going to apply to all text component in the application.
    There is a solution who can compile on both JDK1.3 & 1.2 ?
    Is it a good idee to use reflection to test the presence of the method and apply the correction or you have a better idee.
    Tanks a lot
    Fred

    Try using a KeyListener instead. It allows you to consume the KeyEvent, at least it does on JDK1.3.
    keyListener = new KeyAdapter()
         public void keyPressed(KeyEvent e)
              switch (e.getKeyCode())
                   case KeyEvent.VK_RIGHT:
                        e.consume();
                        // add your code here
                        break;
                   case KeyEvent.VK_LEFT:
                        e.consume();
                        // add your code here
                        break;
    };

  • Performance optimization related.

    Hi.
    I am doing Performance optimization on code.
    Actually, I am doing performance optimization for old code where it is of JDK1.4 related. I met up with a doubt when I optimize code for JDK1.5.
    Problem statement:
    Collection errors = new ArrayList();
                errors.add(new GenericException(ErrorCodes.EMPLOYEE_INVALID_PERMISSION));
                setErrorsInRequest(request, errors);In the above code the compiler tells us to Parameterize the Collection type reference. If we don't make any parameterization for Collection type, will that be dealing with Performace issue?
    Please help me out to resolve the problem statement.
    Thanks and regards,
    Leslie V
    www.googlestepper.blogspot.com
    www.scrollnroll.blogspot.com

    If we don't make any parameterization for Collection type, will that be dealing with Performace issue?No. Not really. But performance isn't really the issue... it's runtime-type-safety which is at issue. There's nothing to prevent me from adding an Integer (like an error number) to your collection of exceptions.
    And "GenericException"... Sheesh, come down from the trees allready. WTF am I (the user of this class/method/package) supposed to with a friggin "GenericException"... you may as well have thrown a raw RuntimeException and saved all that cumbersom interveening try/catch code.

  • Embedding html in .java file comments

    for years now the convention has been to liberally use html in java source code comments
    to beautify javadocs. for example, i have taken this out of the source code for java.lang.System:
    * The <code>System</code> class contains several useful class fields
    * and methods. It cannot be instantiated.
    * <p>
    * Among the facilities provided by the <code>System</code> class
    * are standard input, standard output, and error output streams;
    * access to externally defined "properties"; a means of
    * loading files and libraries; and a utility method for quickly
    * copying a portion of an array.
    * @author Arthur van Hoff
    * @version 1.125, 12/03/01
    * @since JDK1.0
    the problem i see with this is that the tags must be stripped if one is producing
    documentation in formats other than html (swing doclet, or pdf doclet, or any
    application of xml).
    aren't we forever tying ourselves to html? is there any intention on the part of
    j2se/j2ee developers to discontinue this practice? i've begun working on a xul
    doclet and am having to enclose the documentation in cdata to maintain the
    validity of the document i produce (i could also just strip out the tags of course).
    thanks, eitan

    Hi Eitan,
    I see little problem as long we provide a way to
    parse whatever format is being used.
    Please take a look at the commentdom package in
    the "Doclet Refactoring Design" under "What's New"
    on the right side of the Javadoc home page:
    http://java.sun.com/j2se/javadoc/
    Here's its description:
    com.sun.tools.doclet.toolkit.util.commentdom
    DocComment to DOM Translator - Documentation comment contains embedded HTML,
    Javadoc inline tags as well as custom inline tags. This package will contain classes that will help
    generate a DOM tree for the documentation comment. This can be of great help for doclets that
    generate documentation in formats other than HTML. Such doclets don?t have to undergo the
    tedious task of parsing the documentation comments for all the tags. Doclets can then directly
    traverse the DOM tree and then convert the tags to appropriate format.
    The DOM tree will adhere to the doccomment DTD that will be published later. The DTD will
    allow required HTML tags along with their attributes as defined in HTML4.0 specifications. The
    DTD will also support Javadoc-defined inline tags as well as user-defined custom inline tags.
    We plan for the doclet toolkit other than this part to be in Tiger;
    we haven't committed dates to delivering this piece, but feel it
    would be an important part of the toolkit.
    -Doug Kramer
    Javadoc team

  • Exception: dispatcher.forwardException

    Hi All,
    I have done some enhancements to xMAM3.0_ECLIPSE application. I have compiled this application with jdk1.4.2_08 with precompiled jsp option. Application was deployed to PDA having CrEme327a_AX_CE50_PPC_minimal.CAB. My application is running fine except while creating notification and order it has to go to the details page, there it was giving an exception
    Internal Servlet Error:
    javax.servlet.forwardException:cannot find message associated with key:
    dispatcher.forwardException at org.apache.tomcat.facade.RequestDispatcherImpl.doForward() at
    org.apache.tomcat.facade.RequestDispatcherImpl.Forward()  at.....................
    But when I replace the files notification_0005fdetail.class and order_0005fdetail.class it was working fine. I have not done any changes to these JSP files, both standard files and custom files having same code.
    But why it was worked when replaced these custom files with standard files. Is this because I am compiling it with J2SDK1.4.2_08 (or) JDK1.3.
    Can any body please tell me wich jdk version I have to use for compilation.
    As per my knowledge Creme3.27a is of JDK1.1 compability. I have downloaded the jdk1.1, but could not set the path in NWDS, because it not gave me tools.jar file.
    Please resolve this error...
    Regards,
    Murthy.

    Hi Murthy,
    first a reply to your JDK1.1.8 problem: if you install JDK1.1.8 on your PC, then you can take this one as the standard compiler, but you still take the Tools.jar from 1.3 or 1.4 version. This normally works fine. Be aware, that you can not debug in 1.1.8. But your problem normally does not have to to with this.
    The JSP handling for MAM exists at least of 3 files. The JSP itself, the .view file where you define the messages/appFlow and the .java Action controller with your actual coding. If I see your error message and look into your explanation: It seems that your event is either not handeled by the view file or by the controller. Have you pointed to the super class in both cases, so the existing handlers are used as well? And while you have changed the logic, have you really no missspelling and the action is handeled in all three files?
    Inside the JSP you define the event with something like:
    createAction.do?event=onCreate&...
    so in the Vie whandler you have  something like
    and in the Action controller you have a function starting something like
      public Forward onLoad(Forwards forwards) {
    Ok, there are a lot of things that could go wrong here, but look into this, normally you will find the problem there. And if you have used the wrong syntax, as I said, just use the 1.1.8 JDK with the 1.3 tools jar, this will point you to the error.
    And even if you say the pages are the same, I think you have changed something there.
    One explanation for the tools.jar and that area:
    You can precompile the JSP files and you have the option to not delete the JSP generated code. Have a look inside that generated $JSP folder. Is the file ok? Well, the funny thing there is: once a file is generated, it will not be generated again necessarily, even after a change. So you need to delete the $JSP folder to be sure to have the correct version. On the other hand this is a good test if anything with your coding or with the compiler is wrong. The TOOLS.jar generate this $JSP fólder. From there you use the JDK to compile the finished version. So the JDK comes after the TOOLS.jar and this is the reasin why you easily can use a newer version of the TOOLS.jar file.
    Another good test if your coding is really ok will be, to first compile the .WAR file but not delete the generated $JSP folder. Then do the copy you descibed above in there with the .JAVA generated JSP files. Now compile the stuff again and then test the WAR file. In my understanding, now you are using in both cases really the same (original) JSP page. If you do not have the problem now, I guess you have changed the handler for the create method and you missed to tell either the VIEW or the ACTION controller what to do with that action - but that I described above already.
    Hope this helps to solve your problem and I have not lost you somewhere in the middle.
    Regards,
    Oliver

  • Changing the application wide default focus traversal policy

    Hi,
    I have a Swing application built using JDK1.3 where there lots of screens (frames, dialogs with complex screens - panels, tables, tabbed panes etc), in some screens layouts have been used and in other screens instead of any layout, absolute positions and sizes of the controls have been specified.
    In some screens setNextFocusableComponent() methods for some components have been called at some other places default focus traversal is used. (which I think is the order in which the components are placed and their postions etc). Focus traversal in each screen works fine.
    Now I have to migrate to JDK1.4. Problem now is that after migrating to JDK1.4.2, focus traversal has become a headache. In some screens there is no focus traversal and in some there is it is not what I wanted.
    So I thought to replace applicaiton wide default focus traversal policy and I did the following:
    ///////// Replace default focus traversal policy
    java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().setDefaultFocusTraversalPolicy(new java.awt.ContainerOrderFocusTraversalPolicy());
    But there is no change in the behaviour.
    Then I tried following:
    ///////// Replace default focus traversal policy
    java.awt.KeyboardFocusManager.getCurrentKeyboardFocusManager().setDefaultFocusTraversalPolicy(new java.awt.DefaultFocusTraversalPolicy());
    I did all this in the main() method of the application before anything else just to ensure that all the components get added after this policy has been set. But no luck.
    Does someone has any idea what is the problem here ? I do not want to define my own focus traversal policy for each screen that I use (because thats lot of codes).
    Thanks

    not that hard if you only have the one focus cycle ( > 1 cycle and it gets a bit harder, sometimes stranger)
    import javax.swing.*;
    import java.awt.*;
    class Testing
      int focusNumber = 0;
      public void buildGUI()
        JTextField[] tf = new JTextField[10];
        JPanel p = new JPanel(new GridLayout(5,2));
        for(int x = 0, y = tf.length; x < y; x++)
          tf[x] = new JTextField(5);
          p.add(tf[x]);
        final JTextField[] focusList = new JTextField[]{tf[1],tf[0],tf[3],tf[2],tf[5],tf[4],tf[7],tf[6],tf[9],tf[8]};
        JFrame f = new JFrame();
        f.setFocusTraversalPolicy(new FocusTraversalPolicy(){
          public Component getComponentAfter(Container focusCycleRoot,Component aComponent)
            focusNumber = (focusNumber+1) % focusList.length;
            return focusList[focusNumber];
          public Component getComponentBefore(Container focusCycleRoot,Component aComponent)
            focusNumber = (focusList.length+focusNumber-1) % focusList.length;
            return focusList[focusNumber];
          public Component getDefaultComponent(Container focusCycleRoot){return focusList[0];}
          public Component getLastComponent(Container focusCycleRoot){return focusList[focusList.length-1];}
          public Component getFirstComponent(Container focusCycleRoot){return focusList[0];}
        f.getContentPane().add(p);
        f.pack();
        f.setLocationRelativeTo(null);
        f.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
        f.setVisible(true);
      public static void main(String[] args)
        SwingUtilities.invokeLater(new Runnable(){
          public void run(){
            new Testing().buildGUI();
    }

  • CommunicationAPI

    I Have Converted our System from jdk1.4 to jdk1.6. getting problem in connection with weigh bridge machine.
    i have given them access of old code (jdk1.4) till the problem get solved. pls help me out
    Edited by: aawaj.jain on May 8, 2008 3:43 AM

    Take a look at your post. Then ask yourself whether anyone who's not actually working on your problem would even know what you're talking about, or even be able to find out what might be going wrong.
    If your answer to yourself is "yes", think again.
    Name the error message, exceptions, libraries used, the code that runs into problems, the environment you're running...

  • WebLogic Server - Firewall between proxy and cluster causes errors

              Product Name and Version, including Service Pack (if any):
              =============================================
              Weblogic 5.1 , SP8
              Platform (OS Version)
              =================
              Windows 2000 server,
              JDK Version (if applicable)
              =====================
              Jdk1.2
              Detailed Problem Description
              ======================
              We have 2 weblogic servers in a cluser on two windows 2000 Servers
              , NT01 and NT02.The webservers are in a DMZ behind the firewall
              and there is a second firewall between the webserver and the weblogic
              servers.The webserver is a Linux box , running Apache 1.3.9 with
              the weblogic Plugin(LIN01).The per server weblogic.properties file
              has the weblogic.system.DNSName=LIN01.
              We still get errors on the console when we run our jsp/Servlet
              application.The errors are listed below.Could you please help us
              identify the problem
              Thanks,
              Gigen Thomas
              Error Message/Stack Trace
              =====================
              ed Mar 21 16:38:50 PST 2001:<I> <ServletContext-General> Generated
              java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_driveway\_driveway.java
              Wed Mar 21 16:38:52 PST 2001:<I> <ServletContext-General> Generated
              java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_driveway\_driveway_45_leftframe.java
              Wed Mar 21 16:39:41 PST 2001:<I> <Cluster> Adding server -255280969513470611S192.168.6.12:[7001,7001,7002,7002,7001,-1]
              to cluster view
              Wed Mar 21 16:39:41 PST 2001:<E> <Kernel> ExecuteRequest failed.
              java.io.NotSerializableException: com.sun.mail.imap.IMAPStore
              at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:845)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
              at java.util.Hashtable.writeObject(Hashtable.java:738)
              at java.lang.reflect.Method.invoke(Native Method)
              at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1585)
              at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:907)
              at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
              at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(WLObjectOutputStreamBase.java:118)
              at weblogic.servlet.internal.session.ReplicatedSession.writeExternal(ReplicatedSession.java:74)
              at weblogic.common.internal.WLObjectOutputStreamBase.writePublicSerializable(WLObjectOutputStreamBase.java,
              Compiled Code)
              at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectBody(WLObjectOutputStreamBase.java,
              Compiled Code)
              at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(WLObjectOutputStreamBase.java,
              Compiled Code)
              at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(WLObjectOutputStreamBase.java,
              Compiled Code)
              at weblogic.rmi.extensions.AbstractOutputStream2.writeObject(AbstractOutputStream2.java:82)
              at weblogic.rmi.extensions.AbstractOutputStream.writeObject(AbstractOutputStream.java:83)
              at weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationManager_WLStub.java:86)
              at weblogic.cluster.replication.ReplicationManager.createSecondary(ReplicationManager.java,
              Compiled Code)
              at weblogic.cluster.replication.ReplicationManager.checkHosts(ReplicationManager.java,
              Compiled Code)
              at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(ReplicationManager.java:582)
              at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberStash.java:207)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              Code)
              --------------- nested within: ------------------
              weblogic.rmi.MarshalException: error marshalling arguments
              - with nested exception:
              [java.io.NotSerializableException: com.sun.mail.imap.IMAPStore]
              at weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationManager_WLStub.java:90)
              at weblogic.cluster.replication.ReplicationManager.createSecondary(ReplicationManager.java,
              Compiled Code)
              at weblogic.cluster.replication.ReplicationManager.checkHosts(ReplicationManager.java,
              Compiled Code)
              at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(ReplicationManager.java:582)
              at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberStash.java:207)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              Code)
              --------------- nested within: ------------------
              weblogic.rmi.extensions.RemoteRuntimeException: Undeclared checked
              exception - with nested exception:
              [weblogic.rmi.MarshalException: error marshalling arguments
              - with nested exception:
              [java.io.NotSerializableException: com.sun.mail.imap.IMAPStore]]
              at weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationManager_WLStub.java:108)
              at weblogic.cluster.replication.ReplicationManager.createSecondary(ReplicationManager.java,
              Compiled Code)
              at weblogic.cluster.replication.ReplicationManager.checkHosts(ReplicationManager.java,
              Compiled Code)
              at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(ReplicationManager.java:582)
              at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberStash.java:207)
              at weblogic.kernel.ExecuteThread.run(ExecuteThread.java, Compiled
              Code)
              Wed Mar 21 16:40:12 PST 2001:<I> <ServletContext-General> Generated
              java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_partner\_partner.java
              Wed Mar 21 16:40:14 PST 2001:<I> <ServletContext-General> Generated
              java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_partner\_partner_45_mainframe.java
              Wed Mar 21 16:40:14 PST 2001:<I> <ServletContext-General> Generated
              java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_partner\_partner_45_leftframe.java
              Wed Mar 21 16:43:41 PST 2001:<I> <RJVM> Signaling peer -255280969513470611S192.168.6.12:[7001,7001,7002,7002,7001,-1]
              gone: weblogic.rjvm.PeerGoneException:
              - with nested exception:
              [java.net.SocketException: Connection reset by peer]
              Wed Mar 21 16:44:28 PST 2001:<I> <ServletContext-General> Generated
              java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_dtlogout.java
              

              Thanks Prasad.Your comments are very much appreciated !!!
              Prasad Peddada <[email protected]> wrote:
              >This has nothing to do with firewall.
              >
              >
              >You have a non serializable object com.sun.mail.imap.IMAPStore
              >in session.
              >
              >You cannot have non serializable objects in sessions when
              >you are using inmemory replication/file/jdbc persistence.
              >
              >-- Prasad
              >
              >Gigen Thomas wrote:
              >
              >> Product Name and Version, including Service Pack (if
              >any):
              >> =============================================
              >> Weblogic 5.1 , SP8
              >>
              >> Platform (OS Version)
              >> =================
              >> Windows 2000 server,
              >>
              >> JDK Version (if applicable)
              >> =====================
              >> Jdk1.2
              >>
              >> Detailed Problem Description
              >> ======================
              >> We have 2 weblogic servers in a cluser on two windows
              >2000 Servers
              >> , NT01 and NT02.The webservers are in a DMZ behind the
              >firewall
              >> and there is a second firewall between the webserver
              >and the weblogic
              >> servers.The webserver is a Linux box , running Apache
              >1.3.9 with
              >> the weblogic Plugin(LIN01).The per server weblogic.properties
              >file
              >> has the weblogic.system.DNSName=LIN01.
              >>
              >> We still get errors on the console when we run our jsp/Servlet
              >> application.The errors are listed below.Could you please
              >help us
              >> identify the problem
              >>
              >> Thanks,
              >> Gigen Thomas
              >>
              >> Error Message/Stack Trace
              >> =====================
              >> ed Mar 21 16:38:50 PST 2001:<I> <ServletContext-General>
              >Generated
              >> java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_driveway\_driveway.java
              >> Wed Mar 21 16:38:52 PST 2001:<I> <ServletContext-General>
              >Generated
              >> java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_driveway\_driveway_45_leftframe.java
              >> Wed Mar 21 16:39:41 PST 2001:<I> <Cluster> Adding server
              >-255280969513470611S192.168.6.12:[7001,7001,7002,7002,7001,-1]
              >> to cluster view
              >> Wed Mar 21 16:39:41 PST 2001:<E> <Kernel> ExecuteRequest
              >failed.
              >> java.io.NotSerializableException: com.sun.mail.imap.IMAPStore
              >> at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:845)
              >> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
              >> at java.util.Hashtable.writeObject(Hashtable.java:738)
              >> at java.lang.reflect.Method.invoke(Native Method)
              >> at java.io.ObjectOutputStream.invokeObjectWriter(ObjectOutputStream.java:1585)
              >> at java.io.ObjectOutputStream.outputObject(ObjectOutputStream.java:907)
              >> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:342)
              >> at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(WLObjectOutputStreamBase.java:118)
              >> at weblogic.servlet.internal.session.ReplicatedSession.writeExternal(ReplicatedSession.java:74)
              >> at weblogic.common.internal.WLObjectOutputStreamBase.writePublicSerializable(WLObjectOutputStreamBase.java,
              >> Compiled Code)
              >> at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectBody(WLObjectOutputStreamBase.java,
              >> Compiled Code)
              >> at weblogic.common.internal.WLObjectOutputStreamBase.writeObject(WLObjectOutputStreamBase.java,
              >> Compiled Code)
              >> at weblogic.common.internal.WLObjectOutputStreamBase.writeObjectWL(WLObjectOutputStreamBase.java,
              >> Compiled Code)
              >> at weblogic.rmi.extensions.AbstractOutputStream2.writeObject(AbstractOutputStream2.java:82)
              >> at weblogic.rmi.extensions.AbstractOutputStream.writeObject(AbstractOutputStream.java:83)
              >> at weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationManager_WLStub.java:86)
              >> at weblogic.cluster.replication.ReplicationManager.createSecondary(ReplicationManager.java,
              >> Compiled Code)
              >> at weblogic.cluster.replication.ReplicationManager.checkHosts(ReplicationManager.java,
              >> Compiled Code)
              >> at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(ReplicationManager.java:582)
              >> at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberStash.java:207)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              >Compiled
              >> Code)
              >>
              >> --------------- nested within: ------------------
              >> weblogic.rmi.MarshalException: error marshalling arguments
              >> - with nested exception:
              >> [java.io.NotSerializableException: com.sun.mail.imap.IMAPStore]
              >> at weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationManager_WLStub.java:90)
              >> at weblogic.cluster.replication.ReplicationManager.createSecondary(ReplicationManager.java,
              >> Compiled Code)
              >> at weblogic.cluster.replication.ReplicationManager.checkHosts(ReplicationManager.java,
              >> Compiled Code)
              >> at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(ReplicationManager.java:582)
              >> at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberStash.java:207)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              >Compiled
              >> Code)
              >> --------------- nested within: ------------------
              >> weblogic.rmi.extensions.RemoteRuntimeException: Undeclared
              >checked
              >> exception - with nested exception:
              >> [weblogic.rmi.MarshalException: error marshalling arguments
              >> - with nested exception:
              >> [java.io.NotSerializableException: com.sun.mail.imap.IMAPStore]]
              >> at weblogic.cluster.replication.ReplicationManager_WLStub.create(ReplicationManager_WLStub.java:108)
              >> at weblogic.cluster.replication.ReplicationManager.createSecondary(ReplicationManager.java,
              >> Compiled Code)
              >> at weblogic.cluster.replication.ReplicationManager.checkHosts(ReplicationManager.java,
              >> Compiled Code)
              >> at weblogic.cluster.replication.ReplicationManager.clusterMembersChanged(ReplicationManager.java:582)
              >> at weblogic.cluster.MemberStash$ClusterMembersChangeDeliverer.execute(MemberStash.java:207)
              >> at weblogic.kernel.ExecuteThread.run(ExecuteThread.java,
              >Compiled
              >> Code)
              >>
              >> Wed Mar 21 16:40:12 PST 2001:<I> <ServletContext-General>
              >Generated
              >> java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_partner\_partner.java
              >> Wed Mar 21 16:40:14 PST 2001:<I> <ServletContext-General>
              >Generated
              >> java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_partner\_partner_45_mainframe.java
              >> Wed Mar 21 16:40:14 PST 2001:<I> <ServletContext-General>
              >Generated
              >> java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_partner\_partner_45_leftframe.java
              >> Wed Mar 21 16:43:41 PST 2001:<I> <RJVM> Signaling peer
              >-255280969513470611S192.168.6.12:[7001,7001,7002,7002,7001,-1]
              >> gone: weblogic.rjvm.PeerGoneException:
              >> - with nested exception:
              >> [java.net.SocketException: Connection reset by peer]
              >> Wed Mar 21 16:44:28 PST 2001:<I> <ServletContext-General>
              >Generated
              >> java file: E:\weblogic_cluster\FIPBEA01\classfiles\jsp_servlet\_dtlogout.java
              >
              

Maybe you are looking for

  • How to get the F4 help for a field in the selection screen

    Hi all, I am working on a report program. In the selection screen, I have the field 'Brand Node ID'(ZNODEID). The requirement is to have the F4 help for this field. This field is available in a 'Z' table ZNODETAB. There is no Value table maintained f

  • Error while assigning the role to the user

    Hi, error : CJS-30196. SAPBC JSF Communication role is not assigned to the user SAPJSF. i am getting the fallowing error in installation with NW04S. while trying to assign the above role to the user.any body help me with the solution. Thanks & Regard

  • Drag and Drop Contact for GW

    When I drag and drop a contact from the GroupWise Sddress book into the Contacts List in NM, I get the following error : "Novell Messenger does not regognize the User Id you entered" I am able to search and add users though. Steve

  • News on Reserved iPhone 4?

    I reserved a 16 GB iPhone 4 exactly a week ago and the Apple Store person said I would get an email in a week or two for when the phone will be in the store when I put my name down. Anyone have any news about when there should be iPhones available in

  • ASA 5510 tunnel dropping

    We have two ASA 5510 firewalls with a tunnel between two sites. The tunnel works without issue until one of the sites experiences a brief outage due to the service provider. The VPN tunnel is not automatically establishing after the outage. It takes