IBM i Global

 View Only

 custom java classes in acs hascript

Sabine Rein's profile image
Sabine Rein posted Wed September 17, 2025 01:41 PM

I'm wondering if someone can help me with this question about importing Java classes into Hascript in IBM i Access Client Solutions. We already use the standard java classes in hascript but want to also use custom classes.

In support document 6959665, I read that in the Emulator directory, the folders /macro/classes and /macro/lib can be created, and that custom classes placed there can be accessed by Hascript.

I identified the Session Manager directory via the Session Manager, created the subdirectories in the Emulator folder, and placed a compiled class in the classes folder for testing. However, when I try to call it, I keep getting the error : Macro.playThis(): Class de.meinprojekt.TestClass not found in classpath.

I’ve tried restarting the client, placing the classes in a different directory, and even changing the Session Manager directory, because my company uses OneDrive, and I suspect that the OneDrive path — which contains spaces — might be causing the conflict.

Is there anyone here who can help me solve this problem?

Marius le Roux's profile image
Marius le Roux IBM Champion

Hi Sabine, 

I am by no means an expert but I can suggest here two things: 

  1. check the JAVA_HOME / CLASSPATH directories , this might intefere if you are running ACS.
  2. this might also be worth something to consider : https://www.ibm.com/docs/en/host-on-demand/16.0.0?topic=database-steps-running-excel-sample-windows-only  (I know ACS is based on the HOD tool from IBM)

HTH