BusinessWorks 6.x Importing a JAR file inside a TIBCO BW 6.x process

We are here today to introduce another post about how you develop using the new BusinessWorks version 6.x and to comment different tricks to get your work done. So, today we are going to learn how to include a JAR file inside a TIBCO BW 6.x  process so we can invoke using the Java Palette the code inside the JAR file.

To do this we have to do some configuration tricks (they are not trick really but  configuration options of our project). The first thing we have to do it to enable the Java configuration inside our project and to do this we have different approach depending on the project is a new one or a existing one.

If you are creating a new project, you should enable the checkbox about the Java configuration as you could see in this image:

PROJECT_JAVA_NEW

On the other hand, if you want to introduce java code into an existing TIBCO BW 6.x process you will have to use the context menu and select the option (Configure –> Convert to Java Project).

PROJECT_JAVA_EXISTED

After that you will be able to see the folder where you can put Java source files and the lib folder where you can put your JAR inside, as you can see here (You should be always aware to include any lib into the build path. That should be done automatically when you drop any JAR into the lib file, but you can verify if you see the correct icon or using the Project form to check the build path.

PROJECT_JAVA_LIB

After this configuration you can use the classes inside your JAR file the same way you do when you simple java source files, as you can see in the following sample process:

PROJECT_JAVA_PROCESS

This will be the first code that will be hosted only in our new GitHub repository so, please go to check it from here: Link to Project.

Advertisements

2 thoughts on “BusinessWorks 6.x Importing a JAR file inside a TIBCO BW 6.x process

  1. I am working on a BW 6.2 process that creates pdf files using 3rd party jar files. In that design time I can copy the jar files to lib directory, but I don’t want to include them in ear file as these jar files are big in size and would like to put in deployed application classpath(like in BW 5.x we have prepend class path). How to achieve this in BW 6.2?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s