JDK configuration

Hello..i just installed JDK1.6.0_03 version and i would like to configure it to my computer running vista..any help will be much appreciated/ thanks.

Sun's Tutorial contains a HelloWorld type example to try out the compiler. There's also a list of common problems and their solutions.
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html
http://java.sun.com/docs/books/tutorial/getStarted/problems/index.html
(If these links aren't enough and you have to post back with a specific problem, it helps a great deal if you say exactly what commands you are using, and what the value of the operating system PATH variable is.)

Similar Messages

  • JRE/JDK Configuration

    Good Afternoon,
    Does anyone have an example of how they were able to setup their iPlanet 6.0 (Win2k) server to use an external JRE/JDK versus the internal JRE? I have been working with our software vendor along with several users (also looking at the responses on this forum and many other places), and the consensus seems to be �re-install�. One user suggested installing the new SDK into the area where the old JRE lived. I would like to basically know if it is possible to re-point iPlanet 6.0 to a new external (to the iPlanet server) JRE/SDK? And if it is possible, would you mind sharing it with me?
    Rob Smith

    Thanks to anyone who considered answering this post. A few moments ago I was able to point iPlanet to SDK 1.4.2_07.

  • How to upgrade jdk used in jbuilder 5.0?????

    Hi all
    i have jbuilder 5.0 Enterprise which use jdk1.3
    each time i change the jdk configuration and use jdk 6
    it gave me when i compile an error that the file version is incorrect
    and the design window doesnt parsing the components....so plz
    how would i solve this damm problem
    if i cant
    plz provide me with jbuilder 9 or 10x
    but not with jbuilder 2007 because it is soooo complex to me
    thnx all

    Please ask this question at another site, as these forums support Java language questions, not jBuilder (or other IDEe.)

  • Maybe there a bug in JDK 1.4 ?

    Hello , I use JBuilder 7 to design my application . When using the default JDK configuration(java 1.3.1-b24) ,my application runs well , but once turned to new JDK edition (java 1.4.0_01-b03),the application can not do any action but just quit ,and also there is not any message appeared . I do not know what is wrong ? Can anyone tell me how to resolve the problem ? Thanks.
    Liwei

    Test your application outside of JBuilder.

  • Problems in JDK upgrade while installing patches

    Hi ,
       I had done a complete installation of EP6.0 SP9 SR1 including Oracle 9.2.0.6 ,WAS6.0 SR1 with KMC . This was done on j2sdk1.4.2_06 . Now to install the patches the guide prompts to use j2sdk1.4.2_09 or higher . I proceeded to upgrade the jdk verison . I took the help of SAP notes 718901 and 731269 . In one of these notes it says
    "Option 1:
    Edit the instance profile in /usr/sap/<SID>/SYS/profile/<SID>_JC<num>_<host> and add the following line
    jstartup/vm/home = <location of the new jdk>
    Notes:
    Because this setting has precedence over individual JDK settings in the J2EE Engine configuration database and the sdm_jstartup.properties file, the new JVM will be picked up by all processes which are started through the startup framework including the SDM. Manually changing the sdm_jstartup.properties file is not necessary.
    The Visual Admin, ConfigTool, and SDM GUI have their JDK configured in the startup batch files. Please change these scripts for the new JDK."
    I edited the instance profile as said . I also made changes to sdm_jdk.sh to point to the newly installed jdk version .As suggested in one of the notes I did not delete the older version of jdk . After the installation and making changes to the newly installed version for JDK I restarted the server and all the server nodes are green which gives me the impression that the serccver is up and running but when i try to access the portal page by the URL http://<host>:50000/irj/portal it does not display the page . The error is "page cannot be displayed"
    The other problem is I am not able to run the visual administrator tool and the SDM server .
    While connecting to the default connection of the visual administrator I get the following error
    " Unable to lookup connection default
    http://<host>:8101/msgserver/text/logon returned empty list of connection parameters "
    While trying to connect to the SDM server the error is
    "Could not establish the connection to the server <host> at port 50018: Connection refused: connect "
    In the note it is mentioned that for configtool,visual administrator and SDM GUI you will have to make changes in their startup batch files . Where exactly do I need to make the changes because I could not locate any piece of code in their start batch files (.sh files) which is pointing to the JDK installed on the server machine . Can you please help me locate those files where these changes are to be made .
    Regards
    Deepak Singh

    I would Google/search on SDN with query for more information.
    Read and follow the Forum rules
    Search SDN/Google before posting your query

  • CLASSPATH and javac

    Hi all,
    I forgot a lot about Java, and need to relearn a few things. I had a JRE (5.0_06) already installed, and installed the JDK (1.5.0). It seems to me I do not need to use the "old" JRE. Comments? But first things first, I use XP Home SP 2.
    I am now doing a Wireless Development Tutorial where I had to install Tomcat. In the tutorial it says I need to set my classpath. It now points to the JRE (.;D:\Program Files\Java\jre1.5.0_06\lib\ext\QTJava.zip). Where should I point it to if I want to use the JDK instead of the JRE? To .;D:\Program Files\Java\jdk1.5.0\lib\ ?
    Next, I should be able to compile a simple program. But when I type javac, I get "'javac' is not recognized as an internal or external command". How come?
    I sat my JAVA_HOME in the System Properties (Advanced tab, Environmental Variables). I should think that would be enough to let the system find the javac program. The system does not agree with me, so who can enlighten me?
    Macamba

    Hi all,
    I forgot a lot about Java, and need to relearn a few
    things. I had a JRE (5.0_06) already installed, and
    installed the JDK (1.5.0). It seems to me I do not
    need to use the "old" JRE. Comments? But first things
    first, I use XP Home SP 2.
    I am now doing a Wireless Development Tutorial where
    I had to install Tomcat. In the tutorial it says I
    need to set my classpath. It now points to the JRE
    (.;D:\Program
    Files\Java\jre1.5.0_06\lib\ext\QTJava.zip). Where
    should I point it to if I want to use the JDK instead
    of the JRE? To .;D:\Program Files\Java\jdk1.5.0\lib\
    I, personally, do not set the CLASSPATH environment variable. I use the -cp option with the command line tools.
    Next, I should be able to compile a simple program.
    But when I type javac, I get "'javac' is not
    recognized as an internal or external command". How
    come?The is a PATH issue. In you system path, you need an entry that points to your <JDK INSTALL DIR>\bin folder.
    Also, with the JDK, the JRE is bundled under the <JDK Install Dir>\jre folder.
    I sat my JAVA_HOME in the System Properties (Advanced
    tab, Environmental Variables). I should think that
    would be enough to let the system find the javac
    program. The system does not agree with me, so who
    can enlighten me?Again, javac has to be on your system PATH.
    >
    MacambaThe JAVA_HOME environment variable should point to the <JDK INSTALL DIR>
    The CATALINE_HOME should point to the <Tomcat Install Dir>
    For Windows:
    Configuring the JDK
    Configuring Tomcat

  • Java FX not found

    I'm just starting to learn Java and I've been using NetBeans 7.3
    I was trying to test out JavaFX but when I tried to import different class files from the JavaFX library it says javafx does not exist.
    I installed Java JDK 7 which has javafx installed by default but it still can't find it. I've tried numerous different things to try to solve this but so far nothing has worked.
    If anyone could help it would be greatly appreciated.

    I think the problem here is that JavaFX is not on the classpath by default in JDK 7.
    I'd do the following:
    Copy the jfxrt.jar from you Java installation (jre/lib) to the lib/ext folder.
    This ensures that Maven finds it too, if you use it.
    Then specify the JDK in Netbeans and see if it can be found now. (I never worked with Netbeans so far, so I can't tell).
    Just make sure that jfxrt.jar is on the classpath in your JDK configuration.

  • Dynamically load local_policy.jar?

    Hi
    I'd like to use a 256bit-AES-Algorithm with my application.
    Is there any possibility to load the necessary
    Unlimited Strength Jurisdiction Policy Files dynamically?
    I don't really believe, that I have to suggest the user
    to alter the basic-jre/jdk-configuration, just in order
    to use my small app.
    (copy local_policy.jar/US_export_policy.jar to
    $JAVA_HOME/lib/security)
    Isn't there anything you can do to import the
    local_policy.jar/US_export_policy.jar at runtime
    or via runtime-parameter for the vm?
    thanks in advance.
    Oli4

    eg- this.getClass().getClassLoader().loadClass("class")Try using Thread.currentThread().getContextClassLoader() instead of this.getClass().getClassLoader().

  • Java version conflict - Unable to install Eclipse

    Hi all,
    Good day,
    I have downloaded and installed Java 6 (java_ee_sdk-5_08-jdk-6u17-windows.exe)
    Still my version ( C:\java -version ) shows as 1.4.2
    java version "1.4.2_04"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_04-b05)
    Java HotSpot(TM) Client VM (build 1.4.2_04-b05, mixed mode)
    This prevents me from installing Eclipse because Eclipse requires version 1.5 or higher.
    Any help people????
    Thanks n cheers,
    George, Toronto

    kajbj wrote:
    Huh? That isn't needed. I have don't have any JDK in my path, and I don't have JAVA_HOME set. I just specify the JDK to use in my launch shortcut.You can search eclipse jdk configuration by Google.
    May be following will work
    copy this setting to "eclipse.ini' file int eclipse installtion directory
    +-vm+
    +C:\Java\JDK\1.5\bin\javaw.exe+

  • Fast on Mac, Slow on CENTOS?

    I have a beautiful quad core, quad proc AMD Opteron box(16 cores!)
    which ran beaucoup bucks running CentOS, and a bottom-of-the-line Mac
    Mini that ran not so many beaucoup bucks. Both are using JDK1.6.
    One of my devs developed a .jar on the Mac Mini, where it runs a
    hundred times per second. When I transplant it to the big iron, it
    slows down to the mere 4 seconds per loop.
    I was wondering if there's any special JDK configuration parms I should be looking at
    on CentOS.

    I haven't found Centos to be significantly faster/slower than Windows, RedHat or SUSE.
    It sounds like your program is doing something differently when it is running on Centos. i.e. it is most likely a bug in your program.
    Either that our you are getting most of your data off a network device and running that data locally on your Mac.
    Do you see it using much CPU, if so, I suggest you try performance profiling on the Centos box.
    try adding the following to your program's command line.
    -Xrunhprof:cpu=samples,interval=1,depth=7,file=profile.hprof

  • Setting 'mail.smtp.localhost' to make things work

    Hello
    I was getting this error with my initial attempts to send myself an email using JavaMail:
    javax.mail.MessagingException: 501 Syntactically invalid HELO argument(s)
    After hunting around for a while I came across references to doing this:
    props.put( "mail.smtp.localhost", "localhost" )
    So I tried it, and it works!
    I'm happy about that, but I would like to find out why? I just cannot seem to find an answer anywhere.
    I run Windows XP, and my hosts file has not been changed - localhost is still there, as shipped. When I call this:
    InetAddress.getLocalHost().getHostName()
    I get the $COMPUTERNAME value for my PC which happenes to be "HARRY_PC".
    My real concern is what will happen when I deploy my application to other machines - is this little 'hack' likely to break things?
    Hmm...
    Many thanks!
    Harry Mantheakis
    London, UK

    Thanks for that link.
    I had actually looked at it earlier, and next to the 'mail.smtp.localhost' property it reads:
    Local host name. Defaults to InetAddress.getLocalHost().getHostName(). Should not normally need to be set if your JDK and your name service are configured properly.
    Which begs the question: how should my JDK and/or my name service be configured?
    I am sorry to say that I have no idea what JDK configurations to consider, and I do not think a name service is used in my simple test application.
    Regards
    Harry Mantheakis
    London, UK

  • 501 Syntactically invalid HELO argument(s)

    Hi all,
    When setting up Mail I got as far as getting the mail off the pop server (port 110). Sending is still not working (same server as for receiving but - port 25 - no authentication). Connection doctor shows the following message - *501 Syntactically invalid HELO argument(s)*.
    It looks like that in polling the server it adds a _2 to my name ie NAME_2 - my research has shown that SMTP servers do not like _ text, and that this is the most likely cause.
    Any logic why this may happen - and if it can be fixed?
    Thanks!

    Thanks for that link.
    I had actually looked at it earlier, and next to the 'mail.smtp.localhost' property it reads:
    Local host name. Defaults to InetAddress.getLocalHost().getHostName(). Should not normally need to be set if your JDK and your name service are configured properly.
    Which begs the question: how should my JDK and/or my name service be configured?
    I am sorry to say that I have no idea what JDK configurations to consider, and I do not think a name service is used in my simple test application.
    Regards
    Harry Mantheakis
    London, UK

  • How to install and configure WebLogic 10.3 to use 64-bit JDK?

    Hi,
    Is there a preferred/supported way to configure WebLogic to use the 64-bit JRockit that comes with JRockit Mission Control?
    I can't find any official documentation about how to configure WebLogic to use a 64-bit JDK. From other forum posts I can tell we need to use the 64-bit JRockit that is bundled with JRockit Mission Control (available at [http://www.oracle.com/technology/software/products/jrockit/index.html]) but then we are kind of stuck - the configure script which let me select a JDK for a domain doesn't seem to let me re-configure an existing domain, and I can't find anything within the admin console that would let me set the JDK to use.
    I was able to rename the existing jrockit_160_05 directory to e.g. jrockit_160_05_original and then rename the jrmc directory to "jrockit_160_05", effectively taking the place of the JDK being used but this seemed like a bad way to do it. I also found via Google this page: [http://java.sodeso.nl/application-servers/bea-weblogic/how-can-i-change-the-jdk-installation-that-weblogic-uses] which basically says to modify the JAVA_HOME environment variable in the start scripts, but this seems like the same thing.
    With the plethora of products and the different ways they are bundled, combined with all the documentation about everything, I thought I would find something but I keep coming up blank. Does anyone have suggestions or pointers?
    Thanks,
    KaJun

    Make sure your environment configuration is supported here:
    http://www.oracle.com/technology/software/products/ias/files/fusion_certification.html
    Then, you need to have the correct 64bit JDK installed. Sounds like you have done that.
    Then download and run the generic platform installer as described here with your 64bit supported JDK:
    http://download.oracle.com/docs/cd/E12839_01/doc.1111/e14142/start.htm#i1077535
    Notice how the link you post has the generic installer for all the 64bit JVM rows, but the other installer for the 32bit JVMs on the 64bit OS?

  • Configuring JBuilder JDK's

    Hello again,
    Well my CLASSPATH is now perfectly set and I can Compile my
    code of MySql in Java 1.4.1 but now the problem is with my JBuilder
    I changed the configuration of my project from the JDK from 1.3 the
    default JBuilder JDK to the Java 1.4.1 but when I make my project it
    gives me the following error
    Warning #: 910 : cannot check class java.awt.event.ItemEvent; class file has wrong version 48.0; assuming package java.awt.event is stable; use of -nomakestable is recommended
    Warning #: 910 : cannot check class gsales.SalesFrm$1; problem with import: class file has wrong version 48.0; assuming package gsales is stable; use of -nomakestable is recommended
    What's the problem?

    I tried to compile my project with the command line Java tools but ended up in the following errors
    SalesFrm.java:79: cannot resolve symbol
    symbol  : class Login_Dialog
    location: class gsales.SalesFrm
       Login_Dialog login = new Login_Dialog();
       ^
    SalesFrm.java:79: cannot resolve symbol
    symbol  : class Login_Dialog
    location: class gsales.SalesFrm
       Login_Dialog login = new Login_Dialog();
                                ^
    Note: SalesFrm.java uses or overrides a deprecated API.
    Note: Recompile with -deprecation for details.
    2 errorsThese are the two classes:
    Login_Dialog.java
    package gsales;
    import java.awt.*;
    import javax.swing.*;
    import java.awt.event.*;
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.SQLException;
    public class Login_Dialog extends JDialog {
      JPanel panel1 = new JPanel();
      JPanel south = new JPanel(new FlowLayout(FlowLayout.CENTER));
      JPanel center = new JPanel(new GridLayout(2,1));
      BorderLayout borderLayout1 = new BorderLayout();
      JButton Login_But = new JButton();
      JButton Cancel_But = new JButton();
      JPanel userpane = new JPanel();
      JPanel passpane = new JPanel();
      JLabel User_Label = new JLabel();
      JLabel Pass_Label = new JLabel();
      JLabel Top = new JLabel();
      JTextField UserName = new JTextField();
      JPasswordField Password = new JPasswordField();
      String user, pass;
      public Login_Dialog(Frame frame, String title, boolean modal) {
        super(frame, title, modal);
        try {
          jbInit();
          pack();
        catch(Exception ex) {
          ex.printStackTrace();
      public Login_Dialog() {
        this(null, "Sales Login", false);
      void jbInit() throws Exception {
        panel1.setLayout(borderLayout1);
        this.setResizable(false);
        this.setModal(true);
        Login_But.setFont(new java.awt.Font("SansSerif", 1, 30));
        Login_But.setMaximumSize(new Dimension(150, 49));
        Login_But.setPreferredSize(new Dimension(133, 49));
        Login_But.setText("OK");
        Login_But.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            UserLogin(e);
        Cancel_But.setFont(new java.awt.Font("SansSerif", 1, 30));
        Cancel_But.setText("Cancel");
        Cancel_But.addActionListener(new java.awt.event.ActionListener() {
          public void actionPerformed(ActionEvent e) {
            onCancel(e);
        User_Label.setText("User Name: ");
        Pass_Label.setText("Password: ");
        UserName.setPreferredSize(new Dimension(150, 21));
        Top.setFont(new java.awt.Font("Dialog", 1, 40));
        Top.setPreferredSize(new Dimension(206, 80));
        Top.setHorizontalAlignment(SwingConstants.CENTER);
        Top.setHorizontalTextPosition(SwingConstants.CENTER);
        Top.setText("User Login");
        Password.setText("");
        Password.setPreferredSize(new Dimension(150, 21));
        user = UserName.getText();
        pass = Password.getPassword().toString();
        getContentPane().add(panel1);
        panel1.add(Top, BorderLayout.NORTH);
        panel1.add(south, BorderLayout.SOUTH);
        panel1.add(center,BorderLayout.CENTER);
        userpane.add(User_Label,null);
        userpane.add(UserName, null);
        passpane.add(Pass_Label, null);
        passpane.add(Password, null);
        center.add(userpane, null);
        center.add(passpane, null);
        south.add(Login_But, null);
        south.add(Cancel_But, null);
      void onCancel(ActionEvent e) {
          System.exit(0);
      void UserLogin(ActionEvent e) {
      Connection con;
      try{
       Class.forName("com.mysql.jdbc.Driver");
      catch (Exception se){
      se.printStackTrace();
      try{
       con = DriverManager.getConnection("jdbc:mysql://localhost/test?user="+user+"&password="+pass);
       System.out.println(con.toString());
       catch (Exception se){
        se.printStackTrace();
       this.setVisible(false);
    }and here is the last class
    SalesFrm.java
    package gsales;
    import java.awt.*;
    import javax.swing.*;
    import javax.swing.border.*;
    import java.awt.event.*;
    import java.util.Date;
    import java.text.SimpleDateFormat;
    import java.sql.SQLException;
    public class SalesFrm extends JFrame {
      SimpleDateFormat DMY = new SimpleDateFormat("dd-MM-yyyy");
      JLabel TopLabel = new JLabel();
      JLabel DatLabel = new JLabel();
      JLabel NumLabel = new JLabel();
      JLabel DescLabel = new JLabel();
      JLabel AmntLabel = new JLabel();
      JLabel QtyLabel = new JLabel();
      JLabel PricLabel = new JLabel();
      JLabel NoItmLabel = new JLabel();
      JLabel TotalLabel = new JLabel();
      GridLayout grd = new GridLayout(7,1);
      Container myPane;
      Panel NorthPane = new Panel();
      Panel CenterPane = new Panel();
      Panel EastPane = new Panel();
      Panel SouthPane = new Panel();
      BorderLayout brdr = new BorderLayout();
      //Make the TextFields Public
      public JTextField DateFld = new JTextField();
      public JTextField NoFld = new JTextField();
      public JTextField Desc1 = new JTextField();
      public JTextField Desc2 = new JTextField();
      public JTextField Desc3 = new JTextField();
      public JTextField Desc4 = new JTextField();
      public JTextField Desc5 = new JTextField();
      public JTextField Desc6 = new JTextField();
      public JTextField Qty1 = new JTextField();
      public JTextField Qty2 = new JTextField();
      public JTextField Qty3 = new JTextField();
      public JTextField Qty4 = new JTextField();
      public JTextField Qty5 = new JTextField();
      public JTextField Qty6 = new JTextField();
      public JTextField Amount1 = new JTextField();
      public JTextField Amount2 = new JTextField();
      public JTextField Amount3 = new JTextField();
      public JTextField Amount4 = new JTextField();
      public JTextField Amount5 = new JTextField();
      public JTextField Amount6 = new JTextField();
      public JTextField Pric1 = new JTextField();
      public JTextField Pric2 = new JTextField();
      public JTextField Pric3 = new JTextField();
      public JTextField Pric4 = new JTextField();
      public JTextField Pric5 = new JTextField();
      public JTextField Pric6 = new JTextField();
      public JTextField TotalAmt = new JTextField();
      public JLabel StatusBar = new JLabel();
      public JLabel InfoBar = new JLabel();
      public Choice NoItm = new Choice();
      FlowLayout flowLayout1 = new FlowLayout();
      JButton OKbutton = new JButton();
      Border border1;
      JButton Canbutton = new JButton();
      TitledBorder titledBorder1;
      TitledBorder titledBorder2;
    public SalesFrm() {
        try {
               jbInit();
        catch(Exception e) {
          e.printStackTrace();
      public static void main(String[] args) {
       Login_Dialog login = new Login_Dialog();
        SalesFrm sale1 = new SalesFrm();
       login.setVisible(true);
        if (login.setVisible(false))
               sale1.setVisible(true);
        //sale1.setVisible(true);
      private void jbInit() throws Exception {
      //Initialize The Main Container
        myPane = this.getContentPane();
        border1 = BorderFactory.createBevelBorder(BevelBorder.RAISED,Color.lightGray,Color.white,Color.gray,Color.lightGray);
        titledBorder1 = new TitledBorder("");
        titledBorder2 = new TitledBorder("");
        this.setDefaultCloseOperation(3);
        this.setSize(new Dimension(753, 437));
        this.setTitle("<<NetWare>>  General Sales");
      //TopLabel Settings
        TopLabel.setFont(new java.awt.Font("SansSerif", 1, 20));
        TopLabel.setForeground(Color.red);
        TopLabel.setOpaque(true);
        TopLabel.setHorizontalAlignment(SwingConstants.CENTER);
        TopLabel.setHorizontalTextPosition(SwingConstants.CENTER);
        TopLabel.setText("General Sales");
      //Other Labels
       DatLabel.setText("Date: ");
       NumLabel.setText("Invoice No: ");
       QtyLabel.setText("Quantity:");
       DescLabel.setText("Description:");
       AmntLabel.setText("Amount:");
       PricLabel.setText("Price:");
       NoItmLabel.setText("No. of Items:");
       TotalLabel.setText("Total Amount: ");
       QtyLabel.setHorizontalAlignment(SwingConstants.CENTER);
       QtyLabel.setHorizontalTextPosition(SwingConstants.CENTER);
       DescLabel.setHorizontalAlignment(SwingConstants.CENTER);
       DescLabel.setHorizontalTextPosition(SwingConstants.CENTER);
       AmntLabel.setHorizontalAlignment(SwingConstants.CENTER);
       AmntLabel.setHorizontalTextPosition(SwingConstants.CENTER);
       PricLabel.setHorizontalAlignment(SwingConstants.CENTER);
       PricLabel.setHorizontalTextPosition(SwingConstants.CENTER);
       TotalLabel.setHorizontalAlignment(SwingConstants.CENTER);
       TotalLabel.setHorizontalTextPosition(SwingConstants.CENTER);
       //Status and Info
       StatusBar.setText("Status Bar");
       InfoBar.setBorder(titledBorder2);
        InfoBar.setMaximumSize(new Dimension(500, 29));
        InfoBar.setPreferredSize(new Dimension(210, 29));
        InfoBar.setText("Info Bar");
      //Descn
        Desc1.setNextFocusableComponent(Qty1);
        Desc1.setPreferredSize(new Dimension(160, 21));
        Desc2.setNextFocusableComponent(Qty2);
        Desc2.setPreferredSize(new Dimension(160, 21));
        Desc3.setNextFocusableComponent(Qty3);
        Desc3.setPreferredSize(new Dimension(160, 21));
        Desc4.setNextFocusableComponent(Qty4);
        Desc4.setPreferredSize(new Dimension(160, 21));
        Desc5.setNextFocusableComponent(Qty5);
        Desc5.setPreferredSize(new Dimension(160, 21));
        Desc6.setNextFocusableComponent(Qty6);
        Desc6.setPreferredSize(new Dimension(160, 21));
        //Qtyn
        Qty1.setNextFocusableComponent(Pric1);
        Qty1.setPreferredSize(new Dimension(80, 21));
        Qty1.setHorizontalAlignment(SwingConstants.RIGHT);
        Qty2.setNextFocusableComponent(Pric2);
        Qty2.setPreferredSize(new Dimension(80, 21));
        Qty2.setHorizontalAlignment(SwingConstants.RIGHT);
        Qty3.setNextFocusableComponent(Pric3);
        Qty3.setPreferredSize(new Dimension(80, 21));
        Qty3.setHorizontalAlignment(SwingConstants.RIGHT);
        Qty4.setNextFocusableComponent(Pric4);
        Qty4.setPreferredSize(new Dimension(80, 21));
        Qty4.setHorizontalAlignment(SwingConstants.RIGHT);
        Qty5.setNextFocusableComponent(Pric5);
        Qty5.setPreferredSize(new Dimension(80, 21));
        Qty5.setHorizontalAlignment(SwingConstants.RIGHT);
        Qty6.setNextFocusableComponent(Pric6);
        Qty6.setPreferredSize(new Dimension(80, 21));
        Qty6.setHorizontalAlignment(SwingConstants.RIGHT);
        //Amountn
        Amount1.setNextFocusableComponent(Desc2);
        Amount1.setPreferredSize(new Dimension(105, 21));
        Amount1.setHorizontalAlignment(SwingConstants.RIGHT);
        Amount2.setNextFocusableComponent(Desc3);
        Amount2.setPreferredSize(new Dimension(105, 21));
        Amount2.setHorizontalAlignment(SwingConstants.RIGHT);
        Amount3.setNextFocusableComponent(Desc4);
        Amount3.setPreferredSize(new Dimension(105, 21));
        Amount3.setHorizontalAlignment(SwingConstants.RIGHT);
        Amount4.setNextFocusableComponent(Desc5);
        Amount4.setPreferredSize(new Dimension(105, 21));
        Amount4.setHorizontalAlignment(SwingConstants.RIGHT);
        Amount5.setNextFocusableComponent(Desc6);
        Amount5.setPreferredSize(new Dimension(105, 21));
        Amount5.setHorizontalAlignment(SwingConstants.RIGHT);
        Amount6.setPreferredSize(new Dimension(105, 21));
        Amount6.setHorizontalAlignment(SwingConstants.RIGHT);
        //Pricn
        Pric1.setNextFocusableComponent(Amount1);
        Pric1.setPreferredSize(new Dimension(80, 21));
        Pric1.setHorizontalAlignment(SwingConstants.RIGHT);
        Pric2.setNextFocusableComponent(Amount2);
        Pric2.setPreferredSize(new Dimension(80, 21));
        Pric2.setHorizontalAlignment(SwingConstants.RIGHT);
        Pric3.setNextFocusableComponent(Amount3);
        Pric3.setPreferredSize(new Dimension(80, 21));
        Pric3.setHorizontalAlignment(SwingConstants.RIGHT);
        Pric4.setNextFocusableComponent(Amount4);
        Pric4.setPreferredSize(new Dimension(80, 21));
        Pric4.setHorizontalAlignment(SwingConstants.RIGHT);
        Pric5.setNextFocusableComponent(Amount5);
        Pric5.setPreferredSize(new Dimension(80, 21));
        Pric5.setHorizontalAlignment(SwingConstants.RIGHT);
        Pric6.setNextFocusableComponent(Amount6);
        Pric6.setPreferredSize(new Dimension(80, 21));
        Pric6.setHorizontalAlignment(SwingConstants.RIGHT);
      //DateFld
        DateFld.setFont(new java.awt.Font("SansSerif", 1, 12));
        DateFld.setMinimumSize(new Dimension(60, 21));
        DateFld.setPreferredSize(new Dimension(80, 21));
        DateFld.setHorizontalAlignment(SwingConstants.RIGHT);
        Date dt = new Date();
        String date = DMY.format(dt);
        DateFld.setText(date);
        //NoFld
        NoFld.setFont(new java.awt.Font("SansSerif", 1, 12));
        NoFld.setMinimumSize(new Dimension(60, 21));
        NoFld.setPreferredSize(new Dimension(80, 21));
        NoFld.setText("Number");
        NoFld.setHorizontalAlignment(SwingConstants.RIGHT);
      //NorthPane Settings
        NorthPane.setLayout(brdr);
        Panel in1 = new Panel();
        Panel in2 = new Panel();
        Panel NSPane = new Panel();
        OKbutton.setFont(new java.awt.Font("Dialog", 0, 18));
        OKbutton.setBorder(BorderFactory.createRaisedBevelBorder());
        OKbutton.setMaximumSize(new Dimension(100, 60));
        OKbutton.setPreferredSize(new Dimension(90, 32));
        OKbutton.setActionCommand("OK");
        OKbutton.setText("OK");
        Canbutton.setFont(new java.awt.Font("Dialog", 0, 18));
        Canbutton.setBorder(BorderFactory.createRaisedBevelBorder());
        Canbutton.setMaximumSize(new Dimension(100, 50));
        Canbutton.setPreferredSize(new Dimension(90, 32));
        Canbutton.setText("Cancel");
        StatusBar.setBorder(titledBorder1);
        StatusBar.setMaximumSize(new Dimension(800, 29));
        StatusBar.setPreferredSize(new Dimension(400, 29));
        TotalAmt.setHorizontalAlignment(SwingConstants.RIGHT);
        NoItm.addItemListener(new java.awt.event.ItemListener() {
          public void itemStateChanged(ItemEvent e) {
            ItemSelect(e);
        NorthPane.add(TopLabel,BorderLayout.CENTER);
        in1.add(DatLabel);
        in1.add(DateFld);
        in2.add(NumLabel);
        in2.add(NoFld);
        NSPane.add(in2, BorderLayout.WEST);
        NSPane.add(in1, BorderLayout.EAST);
        NorthPane.add(NSPane, BorderLayout.SOUTH);
      //CenterPane Settings
        Panel DescPane = new Panel();
        Panel amntPane = new Panel();
        Panel QtyPane = new Panel();
        Panel PricPane = new Panel();
        DescPane.setLayout(grd);
        QtyPane.setLayout(grd);
        amntPane.setLayout(grd);
        PricPane.setLayout(grd);
        DescPane.add(DescLabel, null);
        DescPane.add(Desc1, null);
        DescPane.add(Desc2, null);
        DescPane.add(Desc3, null);
        DescPane.add(Desc4, null);
        DescPane.add(Desc5, null);
        DescPane.add(Desc6, null);
        QtyPane.add(QtyLabel, null);
        QtyPane.add(Qty1, null);
        QtyPane.add(Qty2, null);
        QtyPane.add(Qty3, null);
        QtyPane.add(Qty4, null);
        QtyPane.add(Qty5, null);
        QtyPane.add(Qty6, null);
        PricPane.add(PricLabel,null);
        PricPane.add(Pric1,null);
        PricPane.add(Pric2,null);
        PricPane.add(Pric3,null);
        PricPane.add(Pric4,null);
        PricPane.add(Pric5,null);
        PricPane.add(Pric6,null);
        amntPane.add(AmntLabel,null);
        amntPane.add(Amount1, null);
        amntPane.add(Amount2, null);
        amntPane.add(Amount3, null);
        amntPane.add(Amount4, null);
        amntPane.add(Amount5, null);
        amntPane.add(Amount6, null);
        CenterPane.add(DescPane);
        CenterPane.add(QtyPane);
        CenterPane.add(PricPane);
        CenterPane.add(amntPane);
       //EastPane Settings
       EastPane.setLayout(new BorderLayout());
       //JLabel empty = new JLabel();
       Panel NoItmPane = new Panel();
       Panel TotPane = new Panel();
       NoItmPane.setLayout(flowLayout1);
       NoItm.addItem("1");
       NoItm.addItem("2");
       NoItm.addItem("3");
       NoItm.addItem("4");
       NoItm.addItem("5");
       NoItm.addItem("6");
       NoItm.setSize(new Dimension(20 , 21));
       NoItm.select(5);
       TotalAmt.setPreferredSize(new Dimension(120, 21));
       NoItmPane.add(NoItmLabel);
       NoItmPane.add(NoItm);
       EastPane.add(NoItmPane, BorderLayout.NORTH);
       TotPane.add(TotalLabel);
       TotPane.add(TotalAmt);
       EastPane.add(TotPane, BorderLayout.SOUTH);
       //SouthPane Settings
       SouthPane.setLayout(new BorderLayout());
       GridLayout grd1 = new GridLayout(2, 1);
       Panel butPane = new Panel();
       Panel StatPane = new Panel();
       StatPane.add(StatusBar);
       StatPane.add(InfoBar);
       butPane.setLayout(grd1);
       SouthPane.add(butPane, BorderLayout.EAST);
        butPane.add(OKbutton);
        butPane.add(Canbutton);
       SouthPane.add(StatPane, BorderLayout.SOUTH);
         //Add all into the main Container
        myPane.add(NorthPane, BorderLayout.NORTH);
        myPane.add(EastPane, BorderLayout.EAST);
        myPane.add(CenterPane, BorderLayout.CENTER);
        myPane.add(SouthPane, BorderLayout.SOUTH);
        //ItemSelect
      void ItemSelect(ItemEvent e) {
        String getItm;
        getItm =(String) e.getItem();
        int Itm = Integer.parseInt(getItm);
        switch (Itm) {
        case 1 : Desc2.setVisible(false);
                 Desc3.setVisible(false);
                 Desc4.setVisible(false);
                 Desc5.setVisible(false);
                 Desc6.setVisible(false);
                 Qty2.setVisible(false);
                 Qty3.setVisible(false);
                 Qty4.setVisible(false);
                 Qty5.setVisible(false);
                 Qty6.setVisible(false);
                 Pric2.setVisible(false);
                 Pric3.setVisible(false);
                 Pric4.setVisible(false);
                 Pric5.setVisible(false);
                 Pric6.setVisible(false);
                 Amount2.setVisible(false);
                 Amount3.setVisible(false);
                 Amount4.setVisible(false);
                 Amount5.setVisible(false);
                 Amount6.setVisible(false);
                 break;
        case 2 : Desc2.setVisible(true);
                 Desc3.setVisible(false);
                 Desc4.setVisible(false);
                 Desc5.setVisible(false);
                 Desc6.setVisible(false);
                 Qty2.setVisible(true);
                 Qty3.setVisible(false);
                 Qty4.setVisible(false);
                 Qty5.setVisible(false);
                 Qty6.setVisible(false);
                 Pric2.setVisible(true);
                 Pric3.setVisible(false);
                 Pric4.setVisible(false);
                 Pric5.setVisible(false);
                 Pric6.setVisible(false);
                 Amount2.setVisible(true);
                 Amount3.setVisible(false);
                 Amount4.setVisible(false);
                 Amount5.setVisible(false);
                 Amount6.setVisible(false);
                 break;
        case 3 : Desc2.setVisible(true);
                 Desc3.setVisible(true);
                 Desc4.setVisible(false);
                 Desc5.setVisible(false);
                 Desc6.setVisible(false);
                 Qty2.setVisible(true);
                 Qty3.setVisible(true);
                 Qty4.setVisible(false);
                 Qty5.setVisible(false);
                 Qty6.setVisible(false);
                 Pric2.setVisible(true);
                 Pric3.setVisible(true);
                 Pric4.setVisible(false);
                 Pric5.setVisible(false);
                 Pric6.setVisible(false);
                 Amount2.setVisible(true);
                 Amount3.setVisible(true);
                 Amount4.setVisible(false);
                 Amount5.setVisible(false);
                 Amount6.setVisible(false);
                 break;
        case 4 : Desc2.setVisible(true);
                 Desc3.setVisible(true);
                 Desc4.setVisible(true);
                 Desc5.setVisible(false);
                 Desc6.setVisible(false);
                 Qty2.setVisible(true);
                 Qty3.setVisible(true);
                 Qty4.setVisible(true);
                 Qty5.setVisible(false);
                 Qty6.setVisible(false);
                 Pric2.setVisible(true);
                 Pric3.setVisible(true);
                 Pric4.setVisible(true);
                 Pric5.setVisible(false);
                 Pric6.setVisible(false);
                 Amount2.setVisible(true);
                 Amount3.setVisible(true);
                 Amount4.setVisible(true);
                 Amount5.setVisible(false);
                 Amount6.setVisible(false);
                 break;
        case 5 : Desc2.setVisible(true);
                 Desc3.setVisible(true);
                 Desc4.setVisible(true);
                 Desc5.setVisible(true);
                 Desc6.setVisible(false);
                 Qty2.setVisible(true);
                 Qty3.setVisible(true);
                 Qty4.setVisible(true);
                 Qty5.setVisible(true);
                 Qty6.setVisible(false);
                 Pric2.setVisible(true);
                 Pric3.setVisible(true);
                 Pric4.setVisible(true);
                 Pric5.setVisible(true);
                 Pric6.setVisible(false);
                 Amount2.setVisible(true);
                 Amount3.setVisible(true);
                 Amount4.setVisible(true);
                 Amount5.setVisible(true);
                 Amount6.setVisible(false);
                 break;
        case 6 : Desc2.setVisible(true);
                 Desc3.setVisible(true);
                 Desc4.setVisible(true);
                 Desc5.setVisible(true);
                 Desc6.setVisible(true);
                 Qty2.setVisible(true);
                 Qty3.setVisible(true);
                 Qty4.setVisible(true);
                 Qty5.setVisible(true);
                 Qty6.setVisible(true);
                 Pric2.setVisible(true);
                 Pric3.setVisible(true);
                 Pric4.setVisible(true);
                 Pric5.setVisible(true);
                 Pric6.setVisible(true);
                 Amount2.setVisible(true);
                 Amount3.setVisible(true);
                 Amount4.setVisible(true);
                 Amount5.setVisible(true);
                 Amount6.setVisible(true);
                 break;
    }

  • JDK Logging configuration

    Hi ,
    trying to configure logging for an EAR application.
    Environment:
    ============
    Oracle fustion middlware 11g (Weblogic 10.3)
    OS: 64bit RH linux
    Deployment target for the application is the AdminServer in the ECM domain. This domain constains the managed server UCM_server1 and IBR_server1.
    WL Startup params for logging:
    -Dorg.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
    -Djava.util.logging.config.file=/opt/oracle/middleware/user_projects/domains/ecm_domain/logging.properties
    admin console settings:
    ==============================
    Environment->Servers->AdminServer->Logging the logging implementation is set to JDK
    logging.properties
    ==================
    handlers=weblogic.logging.ServerLoggingHandler,java.util.logging.FileHandler
    .level=INFO
    #default file output is in user's home directory.
    java.util.logging.FileHandler.pattern = /opt/oracle/middleware/user_projects/domains/ecm_domain/cust.log
    java.util.logging.FileHandler.limit = 50000
    java.util.logging.FileHandler.count = 1
    java.util.logging.FileHandler.formatter = java.util.logging.SimpleFormatter
    # Limit the message that are printed on the console to INFO and above.
    java.util.logging.ConsoleHandler.level = FINE
    java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
    weblogic.logging.ServerLoggingHandler.level=FINE
    # set 3rd party libs to SEVERE
    org.apache.commons.level=SEVERE
    org.apache.commons.httpclient.level=SEVERE
    httpclient.wire.level=SEVERE
    org.apache.struts2.level=SEVERE
    # com.opensymphony.level=SEVERE
    com.opensymphony.level=SEVERE
    org.apache.tiles.level=SEVERE
    org.apache.axis.level=SEVERE
    org.apache.tiles.level=SEVERE
    freemark.level=SEVERE
    com.<our own package>.level=FINE
    com.<our other package>.level=INFO
    jar file setup: (according to doc http://download.oracle.com/docs/cd/E14571_01/web.1111/e13739/config_logs.htm#i1015532)
    ===============
    placed
    com.bea.core.apache.commons.logging_1.1.0.jar (found this file in modules, although the docs say wl does not ship these . . . )
    com.bea.core.weblogic.commons.logging_1.4.0.0.jar (the documentation specified 1.3.0.0 but i couldn't find that one)
    checked that the wlcommons-logging.jar exists in /opt/oracle/middleware/wlserver_10.3/server/lib
    The deployment unit is a standard EAR file with WEB and EJB modules. Packages within APP-INF/lib and WEB-INF/lib
    are various thirdparty jars (commons, struts, tiles etc.)
    Unfortunately, I don't see any of the FINE (commons.Logger.debug) messages. All messages from the 3rd party packages seem to be ignored, when the severity levels were set to INFO, FINE etc.
    What am i missing something in the configuration ? Are the messages (debug,info, 3rd party messages) written to another logfile ? I've checked
    the console, the AdminServer.log and the cust.log files.
    thanks
    Michael

    Hi,
    i gave up on jdk logging and attepted log4j.
    Found an interesting article: http://www.theserverlabs.com/blog/2010/04/22/dynamically-changing-log-level-with-weblogic-log4j-jmx-and-wlst/
    and forcing JCL and log4j to read from the app classpath worked.
    in the weblogic-application.xml
         <wls:prefer-application-packages>
    <wls:package-name>org.apache.commons.logging.*</wls:package-name>
              <wls:package-name>org.apache.log4j.*</wls:package-name>
         </wls:prefer-application-packages>
    basically this works (haven't tried the dynamic changing of loglevels). But this led to further problems.
    I'm using struts2 (2.2.1) with tiles (2.0.6) plus various other 3rd party libraries. One of these libs depends on an XML implementation (xerces). When deploying with the above configuration deployment failed when the tiles container tried to initialise the definitions while reading the tiles.xml file. The problem was that it was loading the xercesImpl.jar shipped for one of the 3rd party apps.
    Removing xercesImpl.ja from APP-INF/lib fixed that problem but caused the 3rd party app to fail. Upgrading the xercesImpl caused the deployment to fail (stacktrace below)
    I guess i'm delving into the reamlms of classloading within weblogic. What i don't quite understand yet is if the packages org.apache.commons, and log4j where specified as those to be preferred from the local classpath why would that effect the loading of the XML parser ?
    I would have thought that the instructiosn above mean 'only prefer those packages from the APP-INF/lib dir' ...
    any help in this matter would be greatly appreciated.
    thanks,
    Michael
    weblogic.management.DeploymentException: javax.xml.stream.XMLStreamException: Premature end of file encountered
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:188)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:89)
         Truncated. see log file for complete stacktrace
    Caused By: javax.xml.stream.XMLStreamException: Premature end of file encountered
         at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:69)
         at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:99)
         at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:316)
         at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:49)
         at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:111)
         Truncated. see log file for complete stacktrace
    >
    <09.05.2011 10:17 Uhr MESZ> <Error> <Deployer> <BEA-149265> <Failure occurred in the execution of deployment request with ID '1304929068317' for task '0'. Error is: 'weblogic.management.DeploymentException: javax.xml.stream.XMLStreamException: Premature end of file encountered'
    weblogic.management.DeploymentException: javax.xml.stream.XMLStreamException: Premature end of file encountered
         at weblogic.application.internal.EarDeploymentFactory.findOrCreateComponentMBeans(EarDeploymentFactory.java:188)
         at weblogic.application.internal.MBeanFactoryImpl.findOrCreateComponentMBeans(MBeanFactoryImpl.java:48)
         at weblogic.application.internal.MBeanFactoryImpl.createComponentMBeans(MBeanFactoryImpl.java:110)
         at weblogic.application.internal.MBeanFactoryImpl.initializeMBeans(MBeanFactoryImpl.java:76)
         at weblogic.management.deploy.internal.MBeanConverter.createApplicationMBean(MBeanConverter.java:89)
         Truncated. see log file for complete stacktrace
    Caused By: javax.xml.stream.XMLStreamException: Premature end of file encountered
         at weblogic.xml.stax.XMLStreamReaderBase.prime(XMLStreamReaderBase.java:69)
         at weblogic.xml.stax.XMLStreamReaderBase.setInput(XMLStreamReaderBase.java:99)
         at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:316)
         at weblogic.xml.stax.XMLStreamInputFactory.createXMLStreamReader(XMLStreamInputFactory.java:49)
         at weblogic.application.descriptor.BasicMunger2.<init>(BasicMunger2.java:111)

Maybe you are looking for