Skip to main content
1-Visitor
February 29, 2012
Question

setting Java classpath

  • February 29, 2012
  • 2 replies
  • 1451 views
Hello everyone,

I'm planning an upgrade from 5.3 to 6.0, and have found that the Java
classpath is handled differently with the new version.

Using Arbortext Editor 5.3, I can use 'set javaclasspath' in the ACL
file specified with the APTRC environment variable. That doesn't work
in 6.0, giving the error: '[A11682] Cannot execute the "set
javaclasspath" command because the Java Virtual Machine has been
loaded.' Is there another way to set the Java classpath
programmatically? I have a clumsy workaround of setting the
APTCLASSPATH environment variable, but that's not preferred. Any
suggestions?

>> Randy

    2 replies

    1-Visitor
    February 29, 2012
    Greetings,



    I would recommend doing this in your "init" scripts if you are using a
    custom directory structure. This would be in the "init" directory in
    your custom directory structure.



    At the command line of Arbortext Editor:

    help 5046

    This topic discusses the structure of the init directory, and the
    sequence of startup.



    The java initialization happens earlier in EA 5.4 and 6.0 requiring
    earlier additions to the classpath before the JVM is initialized.



    Thanks.



    -Dave H.



    Dave Helfinstine

    - <">mailto:->




    rmcgarvey1-VisitorAuthor
    1-Visitor
    February 29, 2012
    Thanks, Dave. The init script is run before the JVM is loaded but
    generates an error when setting the javaclasspath variable:
    "[JavaPackage com.ptc.prowt.arbortext.WindchillAdapter] is not a
    function, it is org.mozilla.javascript.NativeJavaPackage." Have you
    seen that before? The java customizations run successfully once this
    message is cleared. We don't use Windchill or have any references to it
    in our code.



    I currently have the set javaclasspath command in the custom.acl file in
    the Arbortext/packages folder to get things to work as in v5.3, but
    that's a less than ideal solution.







    >> Randy