Using SAP JCO to connect SAP server to JAVA application


I would suggest you to use below instead of JCO_AHOST and JCO_SYSNR:

Use JCO_R3NAME with system ID of the target host

Use JCO_MSHOST with message server host name or IP address

Use JCO_MSSERV with message server port number

Use JCO_GROUP with the name of the logon group

You can refer to below link to check a working example:

Published on 19-Dec-2017 09:32:45