In case of a pure Java project, use the example located in macros/examples/proj. Click on the project button (bottom of jHepWork IDE, left part of the status bar) and select the directory macros/examples/proj using a directory browser. The open the main class example_java.java (double click with the mouse button). This is a simple java program which calls the external library located in the example2 directory (Calc.java).
First, build Java library files located inside the macros/examples/proj/example* directories. To do this, select compile and jar project files from the run menu. After executing it, a jar file classes.jar will appear in the main project directory, which contains all the classes build from the source files located in the project library directories.
If example_java.java is already opened in the jHepWork IDE, press run (or Run java from the menu run. You will see the output from the class Calc in the BeanShell.
You can further adjust the class path of external libraries by modifying the BeanShell scrips in macros/user/run_java* files.