Running BDK1.1 in JDK1.5.0

I tried to run BDK1.1 located in .\beans\beanbox\run.bat, using
JDK1.5.0 (my environment is winXP), but there are error messages
in the console:
C:\Program Files\Java\bdk1_1\beans\jars\buttons.jar: jar load failed: java.lang.Error: java.beans.In
trospectionException: Method "actionPerformed" should have argument "ActionPerformedEvent"
java.lang.Error: java.beans.IntrospectionException: Method "actionPerformed" should have argument "A
ctionPerformedEvent"
at sunw.demo.buttons.ExplicitButtonBeanInfo.getEventSetDescriptors(ExplicitButtonBeanInfo.ja
va:60)
at java.beans.Introspector.getTargetEventInfo(Unknown Source)
at java.beans.Introspector.getBeanInfo(Unknown Source)
at java.beans.Introspector.getBeanInfo(Unknown Source)
at sun.beanbox.JarInfo.<init>(JarInfo.java:66)
at sun.beanbox.JarLoader.createJarInfo(JarLoader.java:292)
at sun.beanbox.JarLoader.loadJar(JarLoader.java:197)
at sun.beanbox.JarLoader.loadJarDoOnBean(JarLoader.java:207)
at sun.beanbox.ToolBoxPanel.addBeansInJar(ToolBox.java:175)
at sun.beanbox.ToolBoxPanel.<init>(ToolBox.java:105)
at sun.beanbox.ToolBoxScrollPane.<init>(ToolBox.java:69)
at sun.beanbox.ToolBox.<init>(ToolBox.java:28)
at sun.beanbox.BeanBoxFrame.<init>(BeanBoxFrame.java:124)
at sun.beanbox.BeanBoxFrame.main(BeanBoxFrame.java:91)
Any hints to solve these error messages?
Thank you in advance.
John

Hi!
I know it's not the exactly right topic, but I've nearly the same problem with a https connection for a webService. I'm not using turkish locale, I'm using BouncyCastle and the "Unlimited Strength" policy files. I've no problems if i start my application with eclipse, starting it with jdk1.5.0_03\jre\bin\java or jre1.5.0_03\bin\java form commandline i get the same stacktrace:
javax.net.ssl.SSLKeyException: RSA premaster secret error
Caused by: javax.net.ssl.SSLKeyException: RSA premaster secret error
Caused by: java.security.NoSuchAlgorithmException: Cannot find any provider supporting RSA/ECB/PKCS1Padding
Caused by: java.lang.IllegalArgumentException: can't support mode ECB
if i try to get the cipher with
Cipher c = Cipher.getInstance("RSA/ECB/PKCS1Padding");
I'll get the same stacktrace, with
Cipher c = Cipher.getInstance("RSA/ECB/PKCS1Padding", "BC");
i works fine, but I've no idea how to run this code out of axis...
Thanks & Regards
Helmut

Similar Messages

  • WebAS run with ibm jdk1.4.2 under window32 platform???

    WebAS run with ibm jdk1.4.2 under window32 platform???

    hi Guoging,
    Yes. Its better if u use Sun JDK 142_09 for all your Installations. we have used that and we have been successful in finishing installations.
    SAP recommends this one. so we follow that.
    Regards
    Arun.

  • What runs quicker under jdk1.5?

    Hello,
    I think I understood on sun's jdk1.5 pages that the startup times for swing applications is now reduced.
    But anyone know if the general speed of Java operations is now quicker, for example will the JMF run any faster in 1.5 rather than 1.4.2?
    Thanks

    And if a JMf application involved procesing data
    structures, and int arrays. I thought these might be
    now quicker to loop through an array then in 1.4.2.I doubt anything significant changed there. The optimizations in 1.5.0 dealt mostly with reducing the JVM start-up time and memory footprint size.

  • Will JMF run quicker in jdk1.5?

    Hello,
    I understand sun has improved the speed of Java in the 1.5 version.
    And just wondered if anyone had experienced a greater speed from the JMF under 1.5?
    Thanks

    Cross-post:
    http://forum.java.sun.com/thread.jspa?threadID=621280

  • How to run a java class as nt service in jdk1.1.8

    Hi,
    Could you help me , i try to start a service for a class who needs jdk1.1.8. I find javaservice.exe but it runs only for jdk1.2 or 1.3.
    HEEEEELLLLLPPPP

    Once old man was sitting in the park reading book "Learn C++ in 21 days". A passer by saw him and asked "You are such an old guy, why do you bother to learn C++?" "I have heard that now communication language at heaven is C++ only , so after my death when I will be in heaven, I don't want to face communication problem." old man replied. "But how come are U so sure that U will be in heaven? It could be a hell also." he asked. "Ya, doesn't matter .... I already know Java".

  • How Dom parser in jdk1.4 could not  run in jdk1.5?

    Hi,guys,I've wrote a class to parse XML file some easily for me , such as
    package eisen.util;
    * <p>Title: E-Future Pos Software</p>
    * <p>Description: A new version for E-Future Pos software on Linux text terminal and Windows GUI.</p>
    * <p>Copyright: E-Future Copyright (c) 2002</p>
    * <p>Company: E-Future</p>
    * @author Eisen Wang
    * @version 1.0
    import java.util.*;
    //import org.apache.xerces.parsers.*;
    import java.io.*;
    import javax.xml.parsers.*;
    import org.xml.sax.*;
    import org.xml.sax.helpers.*;
    import org.w3c.dom.*;
    public class Configurator
          * Constructor. Build by a xml file containing infomations about the node
          * @param fileName a String point to the XML file
         public Configurator(String fileName)
              try
                   DocumentBuilderFactory factory=DocumentBuilderFactory.newInstance();
                   DocumentBuilder parser = factory.newDocumentBuilder();
                   document = parser.parse(fileName).getFirstChild() ;
              }catch(Exception e)
                   e.printStackTrace() ;
                   return;
    //          document = parser.getDocument() ;
               * Now we get the real root node of whole document, but it's not
               * the actual first availble node . So we have to proceed the 1st child
               * node of it.
              NodeList nl = document.getChildNodes() ;
              document = nl.item(0) ;
         * constructor.build a confgurator by the root node
         * @param node root node of the configuration file.
         public Configurator(Node node)
              document = node;
         * constructor. copy another configurator object to itself
         * @param c the original Configurator object
         public Configurator(Configurator c)
              document = c.document;
         * get the name of the root node.
         * @return String the name of root of whole document
         public String getName()
              String strTemp = document.getNodeName() ;
              return(strTemp);
         * get the string content of the node property
         * @param flag a string point to the corresponds property
         * @return a string of the property content or null if flag is not existed.
         public String getString(String flag)
              NamedNodeMap nm = document.getAttributes() ;
              if (nm==null) return(null);
              Node node = nm.getNamedItem(flag);
              if (node==null) return(null);
              String str = node.getNodeValue() ;
              return (str);
          * get the integer value of the node property
          * @param flag a string point to the corresponds property
          * @return the value of the property
         public int getInt(String flag)
              NamedNodeMap nm = document.getAttributes() ;
              Node node = nm.getNamedItem(flag);
              int val ;
              if (node!=null) val = Integer.parseInt(node.getNodeValue())  ;
              else val = 0;
              return (val);
          * get the succeeding XML configuration file
          * @return the filename recording in the XML file of the node.
         public Configurator getProfile()
              Configurator conf;
              try
                   Node profile = document.getFirstChild() ;
                   String filename = null;
                   if (profile.getNodeType() == Node.TEXT_NODE )
                        filename = profile.getNodeValue() ;
                   conf=new Configurator(filename);
              }catch(Exception e)
                   conf = null;
              return (conf);
         * get all the Element child nodes of the root node usually the
         * child components of the container.
         * @return a Vector contains all the Configurators made by children nodes
         public Vector getChilds()
              if ((getString("profile")!=null)&&(getString("profile").toUpperCase() .equals("YES") ))
                   Configurator conf = getProfile();
                   if (conf != null) return(conf.getChilds() );
                   else return(null);
              else
                   Vector nl;
                   nl = new Vector();
                   NodeList nltemp = document.getChildNodes() ;
                   for (int i=0;i<nltemp.getLength() ;i++)
                        Node node = nltemp.item(i) ;
                        if (node.getNodeType() == node.ELEMENT_NODE ) nl.add(new Configurator(node));
                   return (nl);
          * get all the Element child nodes named of 'name' of the root node usually the
          * child components of the container.
          * @param name the assigned name of selected nodes
          * @return all the Configurators made by children nodes named of 'name'
         public Vector getChilds(String name)
              if ((getString("profile")!=null)&&(getString("profile").toUpperCase() .equals("YES") ))
                   Configurator conf = getProfile();
                   if (conf != null) return(conf.getChilds() );
                   else return(null);
              else
                   Vector nl;
                   nl = new Vector();
                   NodeList nltemp = document.getChildNodes() ;
                   for (int i=0;i<nltemp.getLength() ;i++)
                        Node node = nltemp.item(i) ;
                        if ((node.getNodeType() == node.ELEMENT_NODE)&&(node.getNodeName() .equals(name))) nl.add(new Configurator(node));
                   return (nl);
         public Configurator getChild(int no)
              Vector nltemp = getChilds();
              Configurator temp = (Configurator)nltemp.get(no) ;
              return (temp);
          * a Node of the configuration point to the actual root.
         private Node document;
    }This class could run well on jdk1.4, but while using jdk1.5, compling report no error but it would report "java.lang.VerifyError: (class: com/future/DataCommit, method: <init> signature: ()V) Incompatible object argument for function call" in run-time. I don't know how to solve it, and checked out all the file on internet I found-- can't find what error in my code. Please help me to correct it . Thanks a lot.

    Yeah .of course. the error occurs while init the DataCommit object in main(),and the error message is *"java.lang.VerifyError: (class: com/future/DataCommit, method: <init> signature: ()V) Incompatible object argument for function call"*
    package com.future;
    import java.io.*;
    import java.util.*;
    import eisen.util.*;
    public class DataCommit
         protected Configurator m_config = null;
         protected String m_ip = null;
         protected int    m_port = 21;
         protected String m_localfolder = System.getProperty("user.dir");
         protected String m_localbackupfolder = System.getProperty("user.dir")+File.pathSeparator+"bak";
         protected String m_Store = null;
         public DataCommit()
              m_config = new Configurator("d:\\temp\\future.xml");
    //          Configurator temp = (Configurator)m_config.getChilds("site").get(0);
    //          m_ip = temp.getString("ip");
    //          m_port = temp.getInt("port");
    //          temp = (Configurator)m_config.getChilds("folder").get(0);
    //          m_localfolder = temp.getString("local");
    //          m_localbackupfolder = temp.getString("backup");
    //          temp=(Configurator)m_config.getChilds("shop").get(0);
    //          m_Store = temp.getString("id");
         public static void main(String[] args)
              DataCommit dataCommit1 = new DataCommit();
         public void commit()
    }Edited by: Eisen on Oct 27, 2008 10:03 PM

  • Why dynamic table creation with struts working only for JDK1.3.1_02 version

    Row
    import java.util.Vector;
    public class Row
    private static int colsize;
    private Column[] columns;
    public void setColumns(Column[] columns)
    System.out.println("SetColumns");
    this.columns = columns;
    public void setColumn(int i, Column column)
         System.out.println("setting"+ i+"th column"+column);
    public Column[] getColumns()
    return null;
    public Column getColumns(int i)
    System.out.println("Column"+i);
    System.out.println("Colsize"+colsize);
    if(columns == null)
    columns= new Column[colsize];
    if(columns[i] == null)
    columns[i] = new Column();
    return columns;
    public int getColsize()
         return colsize;
    public static void setColsize(int size)
         colsize = size;
    Column:
    public class Column
    private String value;
    public void setValue(String value)
    System.out.println("Value="+value);
    this.value = value;
    public String getValue()
    return value;
    ApplicationResources:
    button.cancel=Cancel
    button.confirm=Confirm
    button.reset=Reset
    button.save=Save
    database.load=Cannot load database from {0}
    error.database.missing=<li>User database is missing, cannot validate logon credentials</li>
    error.fromAddress.format=<li>Invalid format for From Address</li>
    error.fromAddress.required=<li>From Address is required</li>
    error.fullName.required=<li>Full Name is required</li>
    error.host.required=<li>Mail Server is required</li>
    error.noSubscription=<li>No Subscription bean in user session</li>
    error.password.required=<li>Password is required</li>
    error.password2.required=<li>Confirmation password is required</li>
    error.password.match=<li>Password and confirmation password must match</li>
    error.password.mismatch=<li>Invalid username and/or password, please try again</li>
    error.replyToAddress.format=<li>Invalid format for Reply To Address</li>
    error.transaction.token=<li>Cannot submit this form out of order</li>
    error.type.invalid=<li>Server Type must be 'imap' or 'pop3'</li>
    error.type.required=<li>Server Type is required</li>
    error.username.required=<li>Username is required</li>
    error.username.unique=<li>That username is already in use - please select another</li>
    errors.footer=</ul><hr>
    errors.header=<h3><font color="red">Validation Error</font></h3>You must correct the following error(s) before proceeding:<ul>
    errors.ioException=I/O exception rendering error messages: {0}
    heading.autoConnect=Auto
    heading.subscriptions=Current Subscriptions
    heading.host=Host Name
    heading.user=User Name
    heading.type=Server Type
    heading.action=Action
    index.heading=MailReader Demonstration Application Options
    index.logon=Log on to the MailReader Demonstration Application
    index.registration=Register with the MailReader Demonstration Application
    index.title=MailReader Demonstration Application (Struts 1.0-b1)
    index.tour=A Walking Tour of the Example Application
    linkSubscription.io=I/O Error: {0}
    linkSubscription.noSubscription=No subscription under attribute {0}
    linkUser.io=I/O Error: {0}
    linkUser.noUser=No user under attribute {0}
    logon.title=MailReader Demonstration Application - Logon
    mainMenu.heading=Main Menu Options for
    mainMenu.logoff=Log off MailReader Demonstration Application
    mainMenu.registration=Edit your user registration profile
    mainMenu.title=MailReader Demonstration Application - Main Menu
    option.imap=IMAP Protocol
    option.pop3=POP3 Protocol
    prompt.autoConnect=Auto Connect:
    prompt.fromAddress=From Address:
    prompt.fullName=Full Name:
    prompt.mailHostname=Mail Server:
    prompt.mailPassword=Mail Password:
    prompt.mailServerType=Server Type:
    prompt.mailUsername=Mail Username:
    prompt.password=Password:
    prompt.password2=(Repeat) Password:
    prompt.replyToAddress=Reply To Address:
    prompt.username=Username:
    registration.addSubscription=Add
    registration.deleteSubscription=Delete
    registration.editSubscription=Edit
    registration.title.create=Register for the MailReader Demostration Application
    registration.title.edit=Edit Registration for the MailReader Demonstration Application
    subscription.title.create=Create New Mail Subscription
    subscription.title.delete=Delete Existing Mail Subscription
    subscription.title.edit=Edit Existing Mail Subscription
    LogonForm
    import javax.servlet.http.HttpServletRequest;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionMapping;
    public class LogonForm extends ActionForm
    private String username;
    private String password;
    private String errors;
    public String getUsername()
    return username;
    public void setUsername(String username)
    this.username = username;
    public void setPassword(String password)
    this.password = password;
    public String getPassword()
    return password;
    public String getErrors()
         return errors;
    public void setErrors(String errors)
         this.errors = errors;
    public ActionErrors validate(ActionMapping mapping,
    HttpServletRequest request) {
    ActionErrors errors = new ActionErrors();
    if ((username == null) || (username.length() < 1))
    errors.add("username", new ActionError("error.username.required"));
    if ((password == null) || (password.length() < 1))
    errors.add("password", new ActionError("error.password.required"));
    return errors;
    TableForm
    import org.apache.struts.action.ActionForm;
    import java.util.Vector;
    public class TableForm extends ActionForm
    private static int rowsize;
    private Row[] rows;
    public Row getRows(int i)
    System.out.println("Row"+i);
    System.out.println("Rowsize"+rowsize);
    if(rows == null)
    rows = new Row[rowsize];
    if(rows[i] == null)
    rows[i] = new Row();
    return rows[i];
    public Row[] getRows()
         return null;
    public void setRows(Row[] rows)
         System.out.println("SetRows");
         // this.rows=rows;
    public static void setRowsize(int size)
         rowsize = size;
    public int getRowSize()
         return rowsize;
    LogonAction
    import java.io.IOException;
    import java.util.Hashtable;
    import java.util.Locale;
    import javax.servlet.RequestDispatcher;
    import javax.servlet.ServletException;
    import javax.servlet.http.HttpServletRequest;
    import javax.servlet.http.HttpSession;
    import javax.servlet.http.HttpServletResponse;
    import org.apache.struts.action.Action;
    import org.apache.struts.action.ActionError;
    import org.apache.struts.action.ActionErrors;
    import org.apache.struts.action.ActionForm;
    import org.apache.struts.action.ActionForward;
    import org.apache.struts.action.ActionMapping;
    import org.apache.struts.action.ActionServlet;
    import org.apache.struts.util.MessageResources;
    public class LogonAction extends Action
    public ActionForward execute(ActionMapping mapping,
                        ActionForm form,
                        HttpServletRequest request,
                        HttpServletResponse response)
         throws IOException, ServletException {
    LogonForm logonForm = (LogonForm) form;
    System.out.println(logonForm);
    System.out.println(logonForm.getUsername());
    System.out.println(logonForm.getPassword());
    if(logonForm.getUsername().equals("test") && logonForm.getPassword().equals("test"))
    //TableForm tform = new TableForm();
    //tform.setRowsize(2);
    //tform.getRows(0).setColsize(2);
    //tform.getRows(1).setColsize(2);
    //request.getSession().setAttribute("tableForm",tform);
         System.out.println("Table Form setRowSize");
    TableForm.setRowsize(2);
         System.out.println("Table Form set ColSize");
    Row.setColsize(2);
         System.out.println("Returning success");
    return mapping.findForward("success");
    else
              ActionErrors errors = new ActionErrors();
              errors.add("password",
    new ActionError("error.password.mismatch"));
    saveErrors(request, errors);
    //logonForm.setErrors("LoginError");
    return mapping.findForward("failure");
    <?xml version="1.0" encoding="ISO-8859-1" ?>
    <!DOCTYPE struts-config PUBLIC
    "-//Apache Software Foundation//DTD Struts Configuration 1.0//EN"
    "http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd">
    <!--
    This is the Struts configuration file for the example application,
    using the proposed new syntax.
    NOTE: You would only flesh out the details in the "form-bean"
    declarations if you had a generator tool that used them to create
    the corresponding Java classes for you. Otherwise, you would
    need only the "form-bean" element itself, with the corresponding
    "name" and "type" attributes.
    -->
    <struts-config>
    <form-beans>
    <!-- Logon form bean -->
    <form-bean name="logonForm"
    type="LogonForm"/>
    <form-bean name="tableForm"
    type="TableForm"/>
    <form-bean name="profileForm"
    type="ProfileForm"/>
    </form-beans>
    <global-forwards>
    <forward name="success" path="/Profile.jsp"/>
    </global-forwards>
    <!-- ========== Action Mapping Definitions ============================== -->
    <action-mappings>
    <!-- Edit user registration -->
    <action path="/logon"
    type="LogonAction"
    name="logonForm"
    scope="request"
    validate="false"
    input="/Test.jsp">
    <forward name="success" path="/Table.jsp"/>
    <forward name="failure" path="/Test.jsp"/>
    </action>
    <action path="/table"
    type="TableAction"
    name="tableForm"
    scope="request"
    validate="false">
    <forward name="success" path="/Bean.jsp"/>
    <forward name="failure" path="/Table.jsp"/>
    </action>
    <action path="/profile"
    type="ProfileAction"
    name="profileForm"
    scope="request"
    validate="false"
    parameter="method">
    <forward name="edit" path="/EditProfile.jsp"/>
    <forward name="show" path="/Profile.jsp"/>
    </action>
    </action-mappings>
    </struts-config>
    Test.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html locale="true">
    <html:form action="/logon" >
    <center>
    <table>
    <tr>
    <td> Username </td>
    <td> <html:text property="username" size="16" maxlength="16"/> </td>
    <td> <html:errors property="username" /> </td>
    </tr>
    <tr>
    <td> Password </td>
    <td> <html:password property="password" size="16" maxlength="16"
    redisplay="false"/> </td>
    <td><html:errors property="password" /> </td>
    </tr>
    </table>
    </center>
    <center> <html:submit property="submit" value="Submit"/> </center>
    </html:form>
    </html:html>
    Table.jsp
    <%@ taglib uri="/WEB-INF/struts-html.tld" prefix="html" %>
    <html:html locale="true">
    <html:form action="/table" >
    <center>
    <table>
    <tr>
    <td> <html:text property="rows[0].columns[0].value" /> </td>
    <td> <html:text property="rows[0].columns[1].value" /></td>
    </tr>
    <tr>
    <td> <html:text property="rows[1].columns[0].value" /> </td>
    <td> <html:text property="rows[1].columns[1].value" /></td>
    </tr>
    </table>
    </center>
    <center> <html:submit property="submit" value="Submit"/> </center>
    </html:form>
    </html:html>

    The above application runs only with JDK1.3.1_02 and not with any other version. This application is creating dynamic table using struts.
    Can anybody help me on the same
    also appending web.xml contents:
    <?xml version="1.0" ?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>
    <!-- Action Servlet Configuration -->
    <servlet>
    <servlet-name>action</servlet-name>
    <servlet-class>org.apache.struts.action.ActionServlet</servlet-class>
    <init-param>
    <param-name>application</param-name>
    <param-value>ApplicationResources</param-value>
    </init-param>
    <init-param>
    <param-name>config</param-name>
    <param-value>/WEB-INF/struts-config.xml</param-value>
    </init-param>
    <init-param>
    <param-name>debug</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>detail</param-name>
    <param-value>2</param-value>
    </init-param>
    <init-param>
    <param-name>validate</param-name>
    <param-value>true</param-value>
    </init-param>
    <load-on-startup>2</load-on-startup>
    </servlet>
    <!-- Action Servlet Mapping -->
    <servlet-mapping>
    <servlet-name>action</servlet-name>
    <url-pattern>*.do</url-pattern>
    </servlet-mapping>
    <!--Welcome file list starts here -->
    <welcome-file-list>
    <welcome-file>
    /test.jsp
    </welcome-file>
    </welcome-file-list>
    <!-- Struts Tag Library Descriptors -->
    <taglib>
    <taglib-uri>/WEB-INF/struts-bean.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-bean.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-html.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-html.tld</taglib-location>
    </taglib>
    <taglib>
    <taglib-uri>/WEB-INF/struts-logic.tld</taglib-uri>
    <taglib-location>/WEB-INF/struts-logic.tld</taglib-location>
    </taglib>
    </web-app>
    validate-rules.xml
    <!DOCTYPE form-validation PUBLIC
    "-//Apache Software Foundation//DTD Commons Validator Rules Configuration 1.0//EN"
    "http://jakarta.apache.org/commons/dtds/validator_1_0.dtd">
    <!--
    This file contains the default Struts Validator pluggable validator
    definitions. It should be placed somewhere under /WEB-INF and
    referenced in the struts-config.xml under the plug-in element
    for the ValidatorPlugIn.
    <plug-in className="org.apache.struts.validator.ValidatorPlugIn">
    <set-property property="pathnames" value="/WEB-INF/validator-rules.xml,
    /WEB-INF/validation.xml"/>
    </plug-in>
    These are the default error messages associated with
    each validator defined in this file. They should be
    added to your projects ApplicationResources.properties
    file or you can associate new ones by modifying the
    pluggable validators msg attributes in this file.
    # Struts Validator Error Messages
    errors.required={0} is required.
    errors.minlength={0} can not be less than {1} characters.
    errors.maxlength={0} can not be greater than {1} characters.
    errors.invalid={0} is invalid.
    errors.byte={0} must be a byte.
    errors.short={0} must be a short.
    errors.integer={0} must be an integer.
    errors.long={0} must be a long.
    errors.float={0} must be a float.
    errors.double={0} must be a double.
    errors.date={0} is not a date.
    errors.range={0} is not in the range {1} through {2}.
    errors.creditcard={0} is an invalid credit card number.
    errors.email={0} is an invalid e-mail address.
    -->
    <form-validation>
    <global>
    <validator name="required"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequired"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    <javascript><![CDATA[
    function validateRequired(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oRequired = new required();
    for (x in oRequired) {
         var field = form[oRequired[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'file' ||
    field.type == 'select-one' ||
    field.type == 'radio' ||
    field.type == 'password') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (trim(value).length == 0) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oRequired[x][1];
         isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    // Trim whitespace from left and right sides of s.
    function trim(s) {
    return s.replace( /^\s*/, "" ).replace( /\s*$/, "" );
    ]]>
    </javascript>
    </validator>
    <validator name="requiredif"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateRequiredIf"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    org.apache.commons.validator.Validator,
    javax.servlet.http.HttpServletRequest"
    msg="errors.required">
    </validator>
    <validator name="minlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMinLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.minlength">
    <javascript><![CDATA[
    function validateMinLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMinLength = new minlength();
    for (x in oMinLength) {
    var field = form[oMinLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMin = parseInt(oMinLength[x][2]("minlength"));
    if ((trim(field.value).length > 0) && (field.value.length < iMin)) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMinLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="maxlength"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMaxLength"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.maxlength">
    <javascript><![CDATA[
    function validateMaxLength(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMaxLength = new maxlength();
    for (x in oMaxLength) {
    var field = form[oMaxLength[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea') {
    var iMax = parseInt(oMaxLength[x][2]("maxlength"));
    if (field.value.length > iMax) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMaxLength[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    }]]>
    </javascript>
    </validator>
    <validator name="mask"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateMask"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.invalid">
    <javascript><![CDATA[
    function validateMask(form) {
    var isValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oMasked = new mask();
    for (x in oMasked) {
    var field = form[oMasked[x][0]];
    if ((field.type == 'text' ||
    field.type == 'textarea') &&
    (field.value.length > 0)) {
    if (!matchPattern(field.value, oMasked[x][2]("mask"))) {
    if (i == 0) {
    focusField = field;
    fields[i++] = oMasked[x][1];
    isValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return isValid;
    function matchPattern(value, mask) {
    return mask.exec(value);
    }]]>
    </javascript>
    </validator>
    <validator name="byte"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateByte"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.byte"
    jsFunctionName="ByteValidations">
    <javascript><![CDATA[
    function validateByte(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oByte = new ByteValidations();
    for (x in oByte) {
         var field = form[oByte[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
                                  field.type == 'radio') {
                                  var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oByte[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -128 && iValue <= 127)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oByte[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="short"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateShort"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.short"
    jsFunctionName="ShortValidations">
    <javascript><![CDATA[
    function validateShort(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oShort = new ShortValidations();
    for (x in oShort) {
         var field = form[oShort[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                            value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oShort[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -32768 && iValue <= 32767)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oShort[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="integer"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateInteger"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.integer"
    jsFunctionName="IntegerValidations">
    <javascript><![CDATA[
    function validateInteger(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oInteger = new IntegerValidations();
    for (x in oInteger) {
         var field = form[oInteger[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
    var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                  if (si >= 0) {
                                       value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    if (!isAllDigits(value)) {
    bValid = false;
    if (i == 0) {
         focusField = field;
                                  fields[i++] = oInteger[x][1];
    } else {
         var iValue = parseInt(value);
         if (isNaN(iValue) || !(iValue >= -2147483648 && iValue <= 2147483647)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oInteger[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    function isAllDigits(argvalue) {
    argvalue = argvalue.toString();
    var validChars = "0123456789";
    var startFrom = 0;
    if (argvalue.substring(0, 2) == "0x") {
    validChars = "0123456789abcdefABCDEF";
    startFrom = 2;
    } else if (argvalue.charAt(0) == "0") {
    validChars = "01234567";
    startFrom = 1;
    } else if (argvalue.charAt(0) == "-") {
    startFrom = 1;
    for (var n = startFrom; n < argvalue.length; n++) {
    if (validChars.indexOf(argvalue.substring(n, n+1)) == -1) return false;
    return true;
    }]]>
    </javascript>
    </validator>
    <validator name="long"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateLong"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.long"/>
    <validator name="float"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateFloat"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.float"
    jsFunctionName="FloatValidations">
    <javascript><![CDATA[
    function validateFloat(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oFloat = new FloatValidations();
    for (x in oFloat) {
         var field = form[oFloat[x][0]];
    if (field.type == 'text' ||
    field.type == 'textarea' ||
    field.type == 'select-one' ||
    field.type == 'radio') {
         var value = '';
                                  // get field's value
                                  if (field.type == "select-one") {
                                       var si = field.selectedIndex;
                                       if (si >= 0) {
                                       value = field.options[si].value;
                                  } else {
                                       value = field.value;
    if (value.length > 0) {
    // remove '.' before checking digits
    var tempArray = value.split('.');
    var joinedString= tempArray.join('');
    if (!isAllDigits(joinedString)) {
    bValid = false;
    if (i == 0) {
    focusField = field;
    fields[i++] = oFloat[x][1];
    } else {
         var iValue = parseFloat(value);
         if (isNaN(iValue)) {
         if (i == 0) {
         focusField = field;
         fields[i++] = oFloat[x][1];
         bValid = false;
    if (fields.length > 0) {
    focusField.focus();
    alert(fields.join('\n'));
    return bValid;
    }]]>
    </javascript>
    </validator>
    <validator name="double"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDouble"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.double"/>
    <validator name="date"
    classname="org.apache.struts.validator.FieldChecks"
    method="validateDate"
    methodParams="java.lang.Object,
    org.apache.commons.validator.ValidatorAction,
    org.apache.commons.validator.Field,
    org.apache.struts.action.ActionErrors,
    javax.servlet.http.HttpServletRequest"
    depends=""
    msg="errors.date"
    jsFunctionName="DateValidations">
    <javascript><![CDATA[
    function validateDate(form) {
    var bValid = true;
    var focusField = null;
    var i = 0;
    var fields = new Array();
    oDate = new DateValidations();
    for (x in oDate) {
    var value = form[oDate[x][0]].value;
    var datePattern = oDate[x][2]("datePatternStrict");
    if ((form[oDate[x][0]].type == 'text' ||
    form[oDate[x][0]].type == 'textarea') &&
    (value.length > 0) &&
    (datePattern.length > 0)) {
    var MONTH = "MM";
    var DAY = "dd";
    var YEAR = "yyyy";
    var orderMonth = datePattern.indexOf(MONTH);
    var orderDay = datePattern.indexOf(DAY);
    var orderYear = datePattern.indexOf(YEAR);
    if ((orderDay < orderYear && orderDay > orderMonth)) {
    var iDelim1 = orderMonth + MONTH.length;
    var iDelim2 = orderDay + DAY.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderDay && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderDay) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[2], matched[1], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth < orderYear && orderMonth > orderDay)) {
    var iDelim1 = orderDay + DAY.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})(\\d{4})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{2})(\\d{2})[" + delim2 + "](\\d{4})$");
    } else if (iDelim2 == orderYear) {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})(\\d{4})$");
    } else {
    dateRegexp = new RegExp("^(\\d{2})[" + delim1 + "](\\d{2})[" + delim2 + "](\\d{4})$");
    var matched = dateRegexp.exec(value);
    if(matched != null) {
    if (!isValidDate(matched[1], matched[2], matched[3])) {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else {
    if (i == 0) {
    focusField = form[oDate[x][0]];
    fields[i++] = oDate[x][1];
    bValid = false;
    } else if ((orderMonth > orderYear && orderMonth < orderDay)) {
    var iDelim1 = orderYear + YEAR.length;
    var iDelim2 = orderMonth + MONTH.length;
    var delim1 = datePattern.substring(iDelim1, iDelim1 + 1);
    var delim2 = datePattern.substring(iDelim2, iDelim2 + 1);
    if (iDelim1 == orderMonth && iDelim2 == orderDay) {
    dateRegexp = new RegExp("^(\\d{4})(\\d{2})(\\d{2})$");
    } else if (iDelim1 == orderMonth) {
    dateRegexp = new RegExp("^(\\d{4})(\\d{2})[" + delim2 + "](\\d{2})$");
    } else if (iDelim2 == orderDay) {
    dateRegexp = new RegExp("^(\\d{4})[" + delim1 + "](\\d{2})(\\d{2})$");
    } else {
    dateRegexp = new Reg

  • Internal frame dragging perfermance problem in JDK1.4.1

    Hi there,
    When using internal frame with outline(not faster or LIVE_DRAG_MODE) property with JDK 1.4.1_01 (windows), the speed of internal frame dragging is terrible(very very slow).
    The same code runs fine with JDK1.3.X, and it's performance(dragging speed) is acceptable(not very good, so so) when using JDK 1.4.0_X.
    I've tried both motheds to set the property as follow, and got the same result:
    desktop.setDragMode(JDesktopPane.OUTLINE_DRAG_MODE);
    desktop.putClientProperty("JDesktopPane.dragMode", "outline");
    But, after I commented the line: g.setXORMode(Color.white); //line Num: 279
    in the class javax.swing.DefaultDesktopManager.java, the speed of dragging is very well(as same as when running with JDK1.3.X).
    My qestions are:
    - How can I improve the internal frame dragging performance in JDK 1.4.1_01(windows)?
    - Does my testing mean to a bug in the implementation of the abstract method Graphics.setXORMode() in the JDK 1.4.1_01 windows version ?
    TIA
    In terms of the test case, we may just use the follows:
    http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/InternalFrameDemo.java
    http://java.sun.com/docs/books/tutorial/uiswing/components/example-swing/MyInternalFrame.java

    Anyone know if this is registered as a bug? I couldn't find it.

  • XSLT recursion changed direction from JDK1.4 to JDK1.5?

    We make use of XSLT template recursion, and when we tried to test our code with JDK 1.5, the recursion "changed direction". I believe some sort of optimization is taking place that's inappropriately switching around the order or something.
    Here's a test case:
    test-data.xml:
    <?xml version="1.0" encoding="utf-8"?>
    <rating>3</rating>test-temp.xml:
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet
        version="1.0"
        xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:output method="html"/>
    <xsl:template match="/">
    <html>
    <body>
    <xsl:call-template name="showRating">
    <xsl:with-param name="num" select="'1'"/>
    </xsl:call-template>
    </body>
    </html>
    </xsl:template>
    <!-- SHOW RATED STARS -->
    <xsl:template name="showRating">
       <xsl:param name="num"/>
        <xsl:if test="$num <= rating">
        <img border="0" src="yellow_star.gif" valign="absmiddle"/>
        </xsl:if>
        <xsl:if test="$num > rating">
        <img border="0" src="white_star.gif" valign="absmiddle"/>
        </xsl:if>
    <xsl:if test="$num <= '4'">
    <xsl:text>
    </xsl:text>  <!-- CRLF -->
    <xsl:call-template name="showRating">
    <xsl:with-param name="num" select="$num + 1" />
    </xsl:call-template>
    </xsl:if>
    </xsl:template>
    </xsl:stylesheet>testxslt.java:
    import java.io.*;
    import javax.xml.transform.*;
    import javax.xml.transform.stream.*;
    public class testxslt {
      public static void main(String[] args) {
        try {
          new testxslt();
        catch(Throwable t) {
          System.err.println(t + ": " + t.getMessage());
          t.printStackTrace();
      private testxslt() throws Exception {
        String stylesheet = readFile("test-temp.xml");
        String data = readFile("test-data.xml");
        String out = transform(stylesheet, data);
        System.out.println(out);
      private String readFile(String filename) throws IOException {
        StringBuffer out = new StringBuffer();
        Reader r = new FileReader(filename);
        int count;
        char buf[] = new char[1024];
        while((count = r.read(buf)) > 0)
          out.append(buf, 0, count);
        r.close();
        return out.toString();
      private String transform(String stylesheet, String data) throws Exception {
        ByteArrayOutputStream resultStream = new ByteArrayOutputStream();
        StreamResult transStreamResult = new StreamResult(resultStream);
        Source xmlData = new StreamSource(new StringReader(data));
        StreamSource styleSource = new StreamSource(new StringReader(stylesheet));
        TransformerFactory tf = TransformerFactory.newInstance();
        Templates t = tf.newTemplates(styleSource);
        Transformer trans = t.newTransformer();
        trans.transform(xmlData, transStreamResult);
        return resultStream.toString();
    }If you run it with jdk1.4, the yellow stars will (correctly) print first. If you run it with JDK 1.5, the white stars will print first.
    WTF?

    More info: I downloaded xalan from xml.apache.org, and by adding xalan.jar to the classpath, I can get JDK1.5 to output the stars in the right order. So this appears to be some issue having directly to do with the XSLTC transformer.

  • Load Jar and access a class in jar at run time

    I need help from you.
    How to load a Jar and access a class in the jar at run time?
    When i try the following code it works fine while running in Java (Jdk1.5).If iam running the same code in servlet,ClassCastException occurs.
    Error Message : ClassCastExcption : jartest1 cannot be cast to Thing
    test.jar contains jartest.class and Thing.class
    jartest1.java
    try{
    File file =new File("test.jar");
    String lcStr ="jartest";
    URL jfile = new URL("jar", "", "file:" + file.getAbsolutePath() +"!/");
    URLClassLoader cl = URLClassLoader.newInstance(new URL[] { jfile });
    Class loadedClass = cl.loadClass(lcStr);
    Thing t=(Thing)loadedClass.newInstance();
    t.execute();
    catch(Exception e)
    System.err.println(e);
    Thing.java
    public interface Thing
    void execute();
    jartest.java
    public class jartest implements Thing
    public void exceute()
    System.out.println("Welcome");
    Thanks and Regards
    V.Senthil Kumar
    Edited by: senthilv_sun on Dec 16, 2008 8:30 PM

    senthilv_sun wrote:
    I need help from you.
    How to load a Jar and access a class in the jar at run time?
    When i try the following code it works fine while running in Java (Jdk1.5).If iam running the same code in servlet,ClassCastException occurs.
    Error Message : ClassCastExcption : jartest1 cannot be cast to ThingPresumably we can only hope that that is a transciption error. It always helps to use copy and past actual errors and code rather than manually typing them.
    test.jar contains jartest.class and Thing.classWrong.
    The interface class and plugable class must not be in the same jar.
    A plugable interface requires two components
    - Interface (generic sense)
    - Functional components.
    The Interface must be independant (own jar) so that it is available to the framework (user of plugin) and to the functional components. And the plugable component must not be on the java class path.
    This also means that we know for certain that the plugable component is also on the system class path. That is a bad idea as well.
    Given that it is pretty pointless to even speculate as to why this error is showing up. Create the correct jar layout. Test using the command line. Then test using servlets. Insure that the plugable jar is NOT on the java classpath for both tests.

  • Ctr+c and ctr+v in jdk1.4

    Hello,
    In a JTree, I want to use ctr+c and ctr+v to do tree node's copy and paste:
    miCopy.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_C,KeyEvent.CTRL_MAS
    K));
    and this programme runs OK in jdk1.3, but in jdk1.4 the shortcuts seem useless.
    Then I found it's jdk itself using these shortcuts.
    How can I get my shortcuts back?

    That is not a Ctrl key problem i have faced this too you can try to set the focus on that component then try
    for applet try this:
              this.requestFocus();
              jrootpane.grabFocus();

  • XML Schema Validations in JDK1.4?

    Hi,
    The below code errors out when run on JDK1.4-          
    SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
    Schema schemaXSD = schemaFactory.newSchema(new File("C:\\TestSchema.xsd"));
    Validator validator = schemaXSD.newValidator();
    SAXSource source = new SAXSource(new InputSource("D:\\test.xml"));
    validator.validate(source);
    The exception is-
    Exception Message=http://www.w3.org/2001/XMLSchema
    java.lang.IllegalArgumentException: http://www.w3.org/2001/XMLSchema
    at javax.xml.validation.SchemaFactory.newInstance(Unknown Source)
    I also tried by adding the JAR file xml-apis.jar. But, it gives the same Exception.
    The above code runs fine on JDK1.5 but the requirement of my project is to use only JDK1.4 and run it on UNIX platform.
    Is there any way that this can work with JDK1.4?
    Otherwise are there any other JAVA API in JDK1.4 for performing XML Schema Validations?
    Thanks,
    Tanu

    Thanks DrClap.
    Does that mean JDK1.4 does not have any inbuilt classes for Schema Validations?
    Which parser should I use?
    Thanks,
    Tanu

  • Jdk1.4 with JBOSS

    Dear Friends
    I develop one application in which i use servlet/jsp . I develop my application on JBoss-Tomcat and Mysql combination . My application run perfectly on JDK1.3 . Last night i install jdk1.4 and Start my jboss server . i got following error when i run my servler
    "Resultset is ambigious" Actually I use following methods to create resultset object
    Resultset rs = st.executeUpdate(mysql);
    in jdk1.3 Resultset define in java.sql.* package so i didnt find any diffculty But I come to know that in jdk1.4 Java.beans also define Resultset class so it gives me error ?
    So plese give me some ideas to avoid this error .
    Waiting for ur reply
    bye
    Mausam
    [email protected]

    Hi,
    I have the same configuration but for me no error is comming.I am using jdk1.4,jboss3.0.2 and Oracle8i it works fine.
    Any way can specify the error the JVM displays, little detailed description.
    regards
    Vicky

  • Pls help (running java on linux)

    Hello freinds,,
    I am in deep need..can anyone pls help me...
    I want to run my java programs on linux server.. Below are the steps I went thru to install jdk
    *** Download and copy j2sdk-1_3_1_10-linux-i586.rpm.bin to /usr/local/src.
    % su -
    # cd /usr/local/src
    # chmod +x j2sdk-1_3_1_10-linux-i586.rpm.bin
    # ./j2sdk-1_3_1_10-linux-i586.rpm.bin
    # rpm -ivh j2sdk-1_3_1_10-linux-i586.rpm
    Now test Java:
    # /usr/java/jdk1.3.1_10/bin/java -version
    Set the PATH environent variable.
    PATH="$PATH:/usr/java/jdk1.3.1_10/bin:."
    export PATH
    I went thru all above commands uninterruptedly.. Then I copied the folder containing programs in jdk1.3.1_10/bin folder
    Now when I am trying to complile or run an existing class it's gving following error message :
    java: command not found
    OR
    javac: command not found
    Can any one pls tell me where I am going wrong???
    Thanks in advance..

    From your query i understand you've installed java at "/usr/java/jdk1.3.1_10" location on your Linux box. I've a couple of queries -
    when u try to run "/usr/java/jdk1.3.1_10/bin/java -version" what do u see. Do u see the Java version information displayed on your screen ?
    and when you try export -ing the PATH variable with the following location added "/usr/java/jdk1.3.1_10/bin" and in the same shell type "which java" what do you see ? You should be seeing "/usr/java/jdk1.3.1_10/bin/java"
    If the above works then make changes to your profile file in order to ensure changes are saved for subsequent sessions.

  • DiveLog.java , i can't run it

    Hi,
    I have problem running DiveLog.java
    I was adviced to complie it in this way because to compile a packaged application i must include the classpath which points to, the directory where the files live.
    The way I compile:
    C:\jdk1.3.1\bin\>javac �classpath C:\jdk1.3.1\ DiveLog.java
    The way I run it
    C:\jdk1.3.1\bin\>java �classpath C:\jdk1.3.1\ divelog.DiveLog
    This is the error I get if I run the program
    Exception in thread "main" java.lang.NoClassDefFoundError: divelog/DiveLog
    My DiveLog.java program is in the bin folder
    I�m using windows 98
    What is wrong?
    Thank you for your kind help

    hi lisa
    i had the same problem a month ago trying to run DiveLog.java and the error message was the same.
    I did the following to solve my problem, may be you can try if it's relevant to you:
    I went and scrutinise my autoexec.bat file and found that some other programs had set some paths in the file. That's why Java was confused where the right path was. So, I removed those unnecessary paths, and left on Windows and Program Files paths in there.
    After deleting the redundant paths, I also added the correct path in the autoexec.bat. I added C:\JAVA\BIN
    In your case it would be C:\jdk1.3.1\BIN
    You will encounter this problem if you had installed QuickTime in your machine.
    Just scrutise the autoexec.bat and remove those redundant paths. If you are worried about making mistakes, what you can do is to make a copy of the existing autoexec.bat and call it autoexec-1.bat. If my method fail, you can always copy it back .
    Good luck

Maybe you are looking for