Integrations (PTC products, 3rd party products and code) > Code integration (Ada, ARINC 653, C, C#, C++, IDL, Java, SQL and VB) > Java code > Reverse engineering legacy Java code > Mapping information > Generating Java code for system simulation > Overview of generating Java code for system simulation
  
Overview of generating Java code for system simulation
This section of the Help provides only information for changing the generation of a system to allow simulation of that system.
Before using this section of the Help, you should be familiar with how to model and generate Java code for systems through ACS.
For more information about simulation of a target application, see Introduction to system generation and simulation (system simulation).
Generation of Java code for simulation of a system
To generate a Java code application for simulation, you do not have to make any changes to your model. Use ACS to generate the Java application using the following ACS Code Generator DLL:
Java Generator Animation
Changing the port on which Modeler receives notification calls from the application
By default, the generated application uses TCP/IP Port 15777 to send notification calls to Modeler when performing a simulation of an application.
* 
If your Modeler installation is an upgrade, the default TCP/IP Port may be set to 4242 rather than 15777.
If you want to use a different port, you must set up both the application and the computer performing the simulation to use the same port:
To set up the application to use a different port, on the computer that generates the application, set the value of the following registry key to the port you want to use:
HKEY_CURRENT_USER\Software\Artisan Software Tools\Synchronizer\Simulation\PortNumber
The class selected as the test harness will have a main function with a line similar to the following:
SimulationDelegate.GetSimDelegate().InitSimulation("de8ace4d-89b5-4199-8c75-e841e8204757", 15777, "localhost");
This is where the port number should be changed if necessary.
In order for a running application to communicate with Modeler the Java source project for which the code has been generated should reference the *.jar files in \PTC Integrity Modeler\Modeler\System\JavaGen.
To set up the computer that is to performing the simulation to use a different port, on that computer set the value of the following registry key to the port you want to use:
HKEY_CURRENT_USER\Software\Artisan Software Tools\Synchronizer\Simulation\PortNumber
When you start a simulation session through the Modeler State Simulation toolbar, Modeler uses the Port specified in the preceding registry entry.