Menu

#27 Compiler: Classpath broken

closed-fixed
5
2004-01-05
2004-01-05
Arno Unkrig
No

The classes that the net.janino.Compiler accesses
through its "-classpath" don't see the other classes on
the "-classpath".

Discussion

  • Arno Unkrig

    Arno Unkrig - 2004-01-05
    • status: open --> closed-fixed
     
  • Arno Unkrig

    Arno Unkrig - 2004-01-05

    Logged In: YES
    user_id=865893

    The reason being was that the -classpath was resolved by the
    IClassLoader, not the underlying ClassLoader. Consequently,
    the classes loaded by the ClassLoader did not see the other
    classes on the -classpath.

    Rewrote the thing so that the class path is now resolved by
    the new "ClassPathClassLoader".

     
  • Chris Cleveland

    Chris Cleveland - 2004-01-06

    Logged In: YES
    user_id=68865

    I'm still getting "cannot determine simple type name" errors.

    Here's how to duplicate it:
    Download an application with an Ant build script. Jetty is a
    good one (http://sourceforge.net/project/showfiles.php?
    group_id=7322) because it doesn't have many inner classes.

    Install Ant and do the build. Try it first with javac to show
    that everything is set up correctly. Then delete the /classes
    and /classes1.4 directories and do it again with Janino.

    Doing a build with Ant is easy -- just set the environment
    variables, change to the directory that contains "build.xml",
    and run the "ant" script. Here a Windows batch file that does
    it:

    set JAVA_HOME=/j2sdk1.4.2
    set CLASSPATH=/apps/janino/lib/janino.jar

    REM this is the javac version
    /apps/apache-ant-1.6.0/bin/ant

    REM this is the janino version
    REM /apps/apache-ant-1.6.0/bin/ant -
    Dbuild.compiler=net.janino.AntCompilerAdapter

     
  • Arno Unkrig

    Arno Unkrig - 2004-01-07

    Logged In: YES
    user_id=865893

    I had only fixed it for net.janino.Compiler and not for
    AntCompilerAdapter. More or less rewrote the
    AntCompilerAdapter, but did not get around to testing it
    with Jetty, only with a minimal test project. Chris, can you
    please do me the favor?

    Released as 1.0.12

     
  • Chris Cleveland

    Chris Cleveland - 2004-01-07

    Logged In: YES
    user_id=68865

    I get the same error, "Cannot determine simple type name",
    when invoking Ant within the Eclipse environment.

    Running it from the command line on Jetty dies with a
    different error, so I'm not able to test it completely. Will post
    the other error as a new bug shortly.

     
  • Chris Cleveland

    Chris Cleveland - 2004-01-07

    Logged In: YES
    user_id=68865

    Oops -- I may have spoke too soon. The problem mysteriously
    went away. Let me keep testing...

     
  • Chris Cleveland

    Chris Cleveland - 2004-01-07

    Logged In: YES
    user_id=68865

    Sorry, I was right the first time. Using the AntCompilerAdapter
    within the Eclipse environment yields "cannot determine simple
    type name" errors.

     
  • Chris Cleveland

    Chris Cleveland - 2004-01-07

    Logged In: YES
    user_id=68865

    The error happens outside Eclipse as well. I got it to happen
    using an Ant compile on the command line.

    Please try compiling Jetty.

     

Log in to post a comment.

MongoDB Logo MongoDB