14.2s Java jvnrun Issue

I am trying to deploying a jvmrun file:
#IOSERVER
-heapsize 1M -classpath /usr/ReadingTagsV2.jar -emain prab.ewon.readingtags.TagMonitorApplication

If I start the eWon and deploy the jar file from Eclispe everything runs fine. When I deploy the jvmrun file and reboot the eWon, the communucation between the PLC and the eWon for the IOServer fails. There is no communication. I can see the IOServer starting in the logs and than the program starts.

Do I need to find a way to delay the starting of the program until after the IOServer starts?

Thanks

Rich

Hi Rich,

Did you make this IO server or did you grab this from our tech forum? Can you give me some more information on how you setup this IO server?

-Tim

We are using the default event handeler to read the tags.

import com.ewon.ewonitf.DefaultEventHandler;
import com.ewon.ewonitf.SysControlBlock;

public class TagMonitorApplication {

public static void main(String[] args) throws Exception {

	SysControlBlock SCB = new SysControlBlock(SysControlBlock.INF);
	String serialNumber = SCB.getItem("SerNum");

	TagEvent TagEvt = new TagEvent(serialNumber);

	DefaultEventHandler.setDefaultTagValueListener(TagEvt);
	DefaultEventHandler.runEventManager();
}

}

can you send me your full .jar file for this?

ReadingTagsV2.zip (19.6 KB)

Here’s the jar file.

Hi Rich,

I heard this back from my colleague on what issue you might be running into.

"They try to run an “IOServer” Java program --> See #IOSERVER flag in the jvmrun file while the IOServer Java Class is not used.

This may explain why they see problems.

Could they try by removing the line #IOSERVER from the JVMRUN file?"

-Tim