Incorporating Java code from other applications

You can incorporate Java™ code from other existing applications into your ZIETrans projects in a variety of ways.

If you want to incorporate the source code (.java files) from your existing business logic so you can modify the code, you can import the .java files into the Source folder in your existing project. Click File > Import > General > File System to open the Import wizard. In the Import wizard, select the location of your source files in the From directory field. For RCP projects, select the src folder of your project in the destination Into folder entry field. When your source .java files are imported, they are automatically compiled and packaged into your ZIETrans project. You can edit, set breakpoints, and debug your source files in the Eclipse workbench.

You can also incorporate a Java archive (.jar) file with compiled Java business logic. The entire Java archive is added; you cannot select individual classes to add.

To import .jar files to RCP projects, use the following steps:
  1. Create a directory (usually "lib" or "runtime") (optional).
  2. Click File > Import > General > File System to open the Import wizard to import the .jar file, and select either the directory just created in step 1 or import to the root of the project if you did not create a directory as indicated in step 1.
  3. Go to the Navigator view, and find the MANIFEST.MF file under the META-INF directory.
  4. Double-click the file to open it in the manifest editor.
  5. Go to Runtime tab, and under Classpath section, select Add...,
  6. Browse to the imported .jar file, check Update the build path, and click OK.
  7. Save the MANIFEST.MF file.