classpath problems with jar files

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Murat Tasan

    classpath problems with jar files

    okay, i have an odd problem... and maybe it's platform-specific... but i
    figure give it a shot and ask about it in case someone has seen this.

    i have an application that is made up of numerous class files. this
    application at one point loads a class from another company using the
    command Class.forName(. ..).

    when i compile the .java files to bytecode and execute from the main()
    entry point, it works fine.

    than i create a jar file, and include a manifest line to point to the
    class containing the main() entry point. then i execute the jar file
    (java -jar jarfile).

    the program starts running fine, but throws a class not found exception
    when it hits the Class.forName() line.

    everything else is the same... same classpath setting, and the other class
    files haven't moved (the other classes are in fact in a jar file which is
    included in the classpath).

    so to sum it up... app works fine when not in jar file. jar it up, and
    run with everything else the same... cannot load some external classes.

    now, i am running jdk1.4.1 on mac os x.

    any thoughts?

    murat

    --
    Murat Tasan
    [email protected] u
    [email protected] .edu
    murat.tasan@cwr u.edu


Working...