hammant     02/03/08 05:12:13

  Modified:    altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers
                        DynamicGeneratorClassRetriever.java
  Added:       altrmi/src/java/org/apache/commons/altrmi/server
                        ProxyGenerationEnvironmentException.java
  Log:
  Handles absense of tools.jar better.
  
  Revision  Changes    Path
  1.1                  
jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/ProxyGenerationEnvironmentException.java
  
  Index: ProxyGenerationEnvironmentException.java
  ===================================================================
  /*
   * Copyright (C) The Apache Software Foundation. All rights reserved.
   *
   * This software is published under the terms of the Apache Software License
   * version 1.1, a copy of which has been included with this distribution in
   * the LICENSE.txt file.
   */
  package org.apache.commons.altrmi.server;
  
  
  
  /**
   * Class ProxyGenerationEnvironmentException
   *
   *
   * @author Paul Hammant <a 
href="mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]</a>
   * @version $Revision: 1.1 $
   */
  public class ProxyGenerationEnvironmentException extends PublicationException {
  
      /**
       * Constructor ProxyGenerationEnvironmentException
       *
       *
       * @param s
       *
       */
      public ProxyGenerationEnvironmentException(String s) {
          super(s);
      }
  }
  
  
  
  1.5       +12 -1     
jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/DynamicGeneratorClassRetriever.java
  
  Index: DynamicGeneratorClassRetriever.java
  ===================================================================
  RCS file: 
/home/cvs/jakarta-commons-sandbox/altrmi/src/java/org/apache/commons/altrmi/server/impl/classretrievers/DynamicGeneratorClassRetriever.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- DynamicGeneratorClassRetriever.java       24 Feb 2002 11:04:33 -0000      1.4
  +++ DynamicGeneratorClassRetriever.java       8 Mar 2002 13:12:13 -0000       1.5
  @@ -29,7 +29,7 @@
    *
    *
    * @author Paul Hammant <a 
href="mailto:[EMAIL PROTECTED]";>[EMAIL PROTECTED]</a>
  - * @version $Revision: 1.4 $
  + * @version $Revision: 1.5 $
    */
   public class DynamicGeneratorClassRetriever implements AltrmiProxyGenerator, 
ClassRetriever {
   
  @@ -270,6 +270,17 @@
               try {
                   proxyGenerator.generateClass(classLoader);
               } catch (Throwable t) {
  +                if (t instanceof NoClassDefFoundError && 
t.getMessage().equals("sun/tools/javac/Main")) {
  +                    System.out.println("***************************************");
  +                    System.out.println("*                                     *");
  +                    System.out.println("* AltRMI problem......                *");
  +                    System.out.println("* Please copy JAVA_HOME/lib/tools.jar *");
  +                    System.out.println("* to your applications classpath so   *");
  +                    System.out.println("* that proxys can be compiled.        *");
  +                    System.out.println("*                                     *");
  +                    System.out.println("***************************************");
  +                    throw new ProxyGenerationEnvironmentException("tools.jar not 
found in classpath.");
  +                }
                   System.out.println("******");
                   System.out.println("** Exception while making String : ");
                   System.out.flush();
  
  
  

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to