Compiling a Java Service
When you save a Java service, Designer automatically compiles the Java service in the Service Development Project and on Integration Server.
Before a Java service can be compiled, keep the following requirements and points in mind:
You must add any additional Java classes that the Java service requires to both the Service Development Project and to
Integration Server. For more information, see
Adding Classes to the Service Development
Project. For more information about adding classes to
Integration Server, see information about managing IS packages and how
Integration Server stores IS package information in
webMethods Integration Server Administrator’s Guide.
Integration Server must have a Java compiler that is the same version as the Java compiler used in the
Designer local workspace.
When compiling the Java service locally,
Designer uses the default Java compiler settings. You can update these settings by updating the Service Development Project’s Java Compiler properties.
By default, the Service Development Project uses the default JRE that is configured for
Designer. You can configure a different JRE using the Service Development Project’s Java Build Path properties and setting a new JRE on the
Libraries tab.
Important: You do
not need to use the jcode utility to compile and transfer the Java service to
Integration Server. The jcode utility is only necessary when you are using an IDE other than
Designer. For more information about building Java services using your own IDE, see
Building Java Services in Your Own
IDE.
To compile a Java service
1. If the service is not open in the Java service editor, open it by double clicking the Java service in the Package Navigator view.
2. Select File > Save to save and compile the Java service.
Designer displays compilation errors from compiling the service in:
Problems view for compilation errors from locally compiling the service
If Problems view is not already open, you can open it by selecting Window > Show View > Problems.
To view the line of code that caused the error, double click on the error in the Problems view and Designer shifts focus to the Java service editor, with the cursor positioned at the line of code that caused the error.
Popup window for compilation errors from
Integration Server Designer writes the error messages from the server to the Designer log file, making them visible within the Error Log View.
If you receive errors because the Java compiler cannot be found in Integration Server, ensure you have a Java compiler installed on the same machine as Integration Server and that you have added the location of the Java compiler to the system path.