JAVA agent on iSeries

I have an agent that needs to be able to run on an iSeries but I get an error about the rawt property not being set. I am really new to JAVA and am not sure if there is something I need to set in the agent itself or in the .ini?? Does anybody have any idea?

error message: java.awt.AWTError: AWT class or

API used without specifying property os400.class.path.rawt=1

Subject: JAVA agent on iSeries

Are you actually using the AWT classes in the agent? If it’s a Java agent on running on your server, it doesn’t seem as though you would want to. If you really need the AWT classes, you could try this:System.setProperty(“os400.class.path.rawt”, “1”);

But somehow, I just don’t think it’ll let you set the property. I would bet that it throws a SecurityException. If so, you may need to have some help from your AS/400 Admin.

hth,

dgg

Subject: RE: JAVA agent on iSeries

I can’t compile it withSystem.setProperty(“os400.class.path.rawt”, “1”);

I get ‘type expected’.

I am using the java.awt.image to create a small graphics file.

Subject: RE: JAVA agent on iSeries

You’ve got a typo somewhere. Create a new agent and paste this code into it to see if the SecurityManager will even let you set the property (I still doubt that it will).dgg

import lotus.domino.*;

public class JavaAgent extends AgentBase {

public void NotesMain() {



	try {

		Session session = getSession();

		AgentContext agentContext = session.getAgentContext();

		

		System.out.println("BEFORE: " + System.getProperty("os400.class.path.rawt"));

		System.setProperty("os400.class.path.rawt", "1");

		System.out.println("AFTER: " + System.getProperty("os400.class.path.rawt"));

	} catch(Exception e) {

		e.printStackTrace();

	}

}

}

Subject: RE: JAVA agent on iSeries

I copied and pasted this into a brand new agent and I get method setProperty…not found in class java.lang.System.

So I can’t even compile it.

Subject: NEVERMIND

I was trying to compile it in r5!

Subject: RE: JAVA agent on iSeries

So, if the SecurityManager won’t let me, which direction do I need to be going? Is it something that needs to be done on the as400? I am having a really hard time finding information to help me out.

Thanks!

Subject: RE: JAVA agent on iSeries

I’m no AS/400 expert, but that would be my guess, judging from what I read at a glance. Have a look at the first few results here. Incidentally, you may want to have a look at the Java Advanced Imaging API too.dgg