Java::Build::JVM

Java::Build::JVM is a Perl module that starts one JVM for compiling.
Download

Java::Build::JVM Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Phil Crow
  • Publisher web site:
  • http://search.cpan.org/~tkeefer/Gantry-3.51/lib/Gantry/Utils/FormMunger.pm

Java::Build::JVM Tags


Java::Build::JVM Description

Java::Build::JVM is a Perl module that starts one JVM for compiling. Java::Build::JVM is a Perl module that starts one JVM for compiling.SYNOPSIS use Java::Build::JVM; my $compiler = Java::Build::JVM->getCompiler(); $compiler->destination("some/path"); $compiler->classpath("some/pathto/jar.jar:some/other/path/javas"); $compiler->append_to_classpath("something/to/add/to/previous/path"); $compiler->compile();This class starts a single JVM which it then helps you contact for compiling tasks. This is the most important feature of the popular Ant build tool. Using this class, you can effectively replace Ant, and its notoriously unmaintainable build.xml files, with Perl scripts. Most Ant tasks are already built in to Perl with far more flexibility than Ant provides.To obtain a compiler, use this module, then call getCompiler. It has that name to prevent conflicts with the Java new keyword.Once you have a compiler, you may change the destination of subsequent compiles from the location of the source files to a directory of your choice using the destination method. You can create or append to a classpath with the classpath or append_to_classpath methods. Note that your CLASSPATH environment variable still works in its usual way.Finally, once you have the destination and classpath set, you can compile a list of files by passing them to the compile method. Note that they need to be in an array reference (if you don't know what that means, put the list in square brackets).Note that you must have tools.jar in your CLASSPATH when you run your script. Without that, JVM.pm will not be able use Inline::Java. The classpath you use inside the script may be the same or different than your environment variable, depending on how you use the classpath and append_to_classpath methods.Since Sun has, in its finite wisdom, chosen to deprecate the compiling methods that javac uses, there will be one warning for each time you call compile. It will say something like this: Note: sun.tools.javac.Main has been deprecated. 1 warningThis warning is not a problem in Java 1.4. Requirements: · Perl


Java::Build::JVM Related Software