Cloud Application Integration (On-Premises) : Service Development : Building Java Services in Your Own IDE : Using the jcode Utility : Using jcode make/makeall to Compile Java Source
Using jcode make/makeall to Compile Java Source
Use the jcode make or makeall command to examine source files for one or more folders in a package and compile the source files that have been modified since the last compilation. The jcode utility saves the resulting class files in the classes directory of the package. After compiling the Java source, reload the Integration Server package so that the next time a service is invoked, Integration Server executes the updated class file.
The jcode utility reports which files were compiled, as well as any errors that it encountered during the compiling process.
Important:  
Before you can compile a Java service using the jcode utility, you must set the environment variable, IS_DIR, to point to the directory in which Integration Server is installed.
Specifying the Compiler the jcode make/makeall Command Uses
By default, the jcode utility uses one of the following to compile the Java source, based on the settings of the watt.server.compile and watt.server.compile.unicode server configuration parameters.
*If the watt.server.compile and watt.server.compile.unicode parameters are omitted from the Integration Server configuration or if they are empty, by default the jcode utility uses the JVM internal Java compile tool to compile the Java source.
*If the watt.server.compile parameter specifies a compiler command, the jcode utility uses that compiler command to compile Java source that is not stored in Unicode encoding.
*If the watt.server.compile.unicode parameter specifies a compiler command, the jcode utility uses that compiler command to compile Java source that is stored in Unicode encoding.
For more information about the watt.server.compile and watt.server.compile.unicode server configuration parameters, see webMethods Integration Server Administrator’s Guide.
If you want the jcode utility to use a different compiler than the default, update the jcode.bat file, which resides in the following location:
Integration Server_directory \instances\instance_name\bin
where instance_name is the name of the Integration Server instance.
In the jcode.bat file, update the line with the Java command to specify the watt.server.compile system property that is set to the compiler you want to use. The property must have the following format:
"-Dwatt.server.compile="path_to_your_java_compile -classpath {0}
-d {1} {2}"
For example:
"-Dwatt.server.compile="C:\java\jdk1.6.0_11\bin\javac -classpath {0}
-d {1} {2}"
Using this example, the Java command would be the following:
"%JAVA_DIR%\bin\java" -Dwatt.server.compile="C:\java\jdk1.6.0_11\bin\javac
-classpath {0} -d {1} {2}"
-classpath "%IS_DIR%\..\common\lib\ext\mail.jar;%IS_DIR%\..\common\lib\ext\
enttoolkit.jar;%IS_DIR%\..\common\lib\wm-g11nutils.jar;%IS_DIR%\..\common\
lib\ext\icu4j.jar;%IS_DIR%\..\common\lib\wm-isclient.jar;%IS_DIR%\lib\
wm-isserver.jar" com.wm.app.b2b.server.NodeUtil "%IS_DIR%" %1 %2 %3 %4 %5
The watt.server.compile property specifies the compiler command that you want Integration Server to use to compile Java services. For more information about this property, see the webMethods Integration Server Administrator’s Guide.
Important:  
If the Java source code contains any non-ASCII characters, set the property watt.server.java.source=Unicode | UnicodeBig | UnicodeLittle. The default value is file.encoding. When Unicode is set, the compile command line specified in the property watt.server.compile.unicode is used. The default value of this property is the following:
“javac -encoding Unicode -classpath {0} -d {1} {2}”
Command Syntax for jcode make
Use the jcode make command to compile Java source for a single folder of an Integration Server package (that is, a single Java source file).
jcode make package folder
*package is the name of an Integration Server package.
*folder is the name of the folder in the specified package. This folder contains the source you want to compile.
Command Syntax for jcode makeall
Use the jcode makeall command to compile Java source for all folders of an Integration Server package.
jcode makeall package
*package is the name of the Integration Server package containing the source code you want to compile.
Building Java Services in Your Own IDE
How Java Services are Organized on Integration Server
Requirements for the Java Service Source Code
IData Object for Java Service Input and Output
Adding Comments to Your Java Code for the jcode Utility
Using the jcode Utility
Using jcode frag/fragall to Split Java Source for Designer
Using jcode comp to Create Java Source from Fragments
Using jcode Shortcut Commands
Copyright © 2015- 2016 Software AG, Darmstadt, Germany.

Product LogoContact Support   |   Community   |   Feedback