To set and return the value of an Agent option you will use CommonOptions Class.  This will need to be imported in the import section:

import com.borland.silktest.jtf.common.CommonOptions;

To set an Agent option you will use desktop.setOption.  See example below that will set the XBrowser Sync mode to HTML:

desktop.setOption(CommonOptions.OPT_XBROWSER_SYNC_MODE, 1);

To retrieve the value of an agent option you will use desktop.getOption.  See below that will return the current value for the agent option above:

System.out.println(desktop.getOption(CommonOptions.OPT_XBROWSER_SYNC_MODE));