> Hi Steve,
> Thanks for the question. To run CAL code from Java, you will need the
> following Quark Platform JARs on your classpath:
> - Quark/bin/java/release/calUtilities.jar
> - Quark/bin/java/release/calPlatform.jar
> - Quark/bin/java/release/calLibraries.jar
> - Quark/bin/java/release/quarkGems.jar
> (this is needed if you use the high-level Gem API)
> - all JARs in Quark/lib/Resources/External/java/
> (icu4j.jar, log4j.jar, antlr.jar, asm-all-3.0.jar,
> commons-collections-3.1.jar, xercesImpl.jar,
> xmlParserAPIs.jar, junit.jar)
> In addition, you will need the Car-jar files and their external Java
> dependencies.
> If you are deploying the Gem Cutter tool as well, you will also need:
> - Quark/bin/java/release/quarkGems.jar
> (if not already included from the list above)
> - Quark/lib/Resources/GemCutterHelpFiles.jar
> - Quark/lib/Resources/External/Sun/JavaHelp/2.0_02/jh.jar
> If you are deploying an application written in CAL, and do not require
> metaprogramming facilities (e.g. running pieces of CAL expressions from
> within Java, adding new modules at runtime, querying for functions
> matching a particular type), you may want to consider using "standalone
> JARs" as an alternative deployment mechanism. It allows you to package
> up a CAL function of the type ([String] -> ()) into a JAR that includes
> only the classes necessary for running the function. This approach is
> described in more detail in the "Using Quark with Standalone JARs"
> document.
> If deploying with standalone JARs, the required set of core Quark
> Platform JARs is smaller:
> - Quark/bin/java/release/calUtilities.jar
> - Quark/bin/java/release/calPlatform.jar
> - Quark/bin/java/release/calLibraries.jar
> - Quark/lib/Resources/External/java/icu4j.jar
> - Quark/lib/Resources/External/java/log4j.jar
> - the generated standalone JAR, and its external Java dependencies
> To assist in building up this classpath, the Open Quark distribution
> includes a quarklaunch script that makes it easy to run an application
> packaged as a standalone JAR (documentation for the script is included
> in the "Using Quark with Standalone JARs" document).
> Hope this helps! :)
> Joseph
> -----Original Message-----
> From: cal_language@googlegroups.com
> [mailto:cal_language@googlegroups.com] On Behalf Of Steve Harris
> Sent: Tuesday, September 11, 2007 2:31 PM
> To: CAL Language Discussion
> Subject: Java classpath for Cal calling?
> If I were wanting to access Cal code from Java, what is the minimum I
> would need to add to my Java classpath? Would a car-jar file
> generated for just a given workspace and it's dependencies be enough
> to call the included Cal functions, using either the high-level Gem
> style api or the lower level "source-model" api? I didn't see any
> mention in "Java Meets Quark" about what is required on the classpath
> (though I may have missed it). I noticed the samples are just using
> the expanded Quark bin directory directly - would I need to jar this
> up for delivery with my app?
> Steve