Changeset 4944


Ignore:
Timestamp:
12/02/03 19:51:21 (17 years ago)
Author:
piso
Message:

LOAD-COMPILED-FUNCTION

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/j/src/org/armedbear/lisp/CompiledFunction.java

    r4883 r4944  
    33 *
    44 * Copyright (C) 2003 Peter Graves
    5  * $Id: CompiledFunction.java,v 1.15 2003-11-24 01:09:21 piso Exp $
     5 * $Id: CompiledFunction.java,v 1.16 2003-12-02 19:51:21 piso Exp $
    66 *
    77 * This program is free software; you can redistribute it and/or
     
    2121
    2222package org.armedbear.lisp;
     23
     24import java.io.File;
    2325
    2426public class CompiledFunction extends Closure
     
    102104        public LispObject execute(LispObject arg) throws ConditionThrowable
    103105        {
    104             String className = ((LispString)arg).getValue();
    105             if (className.endsWith(".class")) {
     106            File file = Utilities.getFile(arg);
     107            if (file != null && file.isFile()) {
    106108                try {
    107109                    JavaClassLoader loader = new JavaClassLoader();
    108                     Class c = loader.loadClassFromFile(className);
     110                    Class c = loader.loadClassFromFile(file);
    109111                    if (c != null) {
    110112                        Class[] parameterTypes = new Class[0];
     
    125127                }
    126128            }
    127             throw new ConditionThrowable(new LispError("unable to load ".concat(className)));
     129            throw new ConditionThrowable(
     130                new LispError("unable to load ".concat(String.valueOf(arg))));
    128131        }
    129132    };
Note: See TracChangeset for help on using the changeset viewer.