0

我一直在尝试使用 JCO Java 连接器(最新版本 3.0.13)将 Java 程序连接到 SAP。我遇到了麻烦,有人告诉我问题是我试图直接连接,我需要通过 saprouter 连接。有一个名为 saprouter 的连接属性,我需要在其中放置 sap 路由器字符串。我只找到了为 JCO (v 2.xx) 指定此类字符串的方法,它是:/H//H/

JCO 在其最新版本中是否也是如此?如果是这样,连接属性的规范会像这样做好吗?

    Properties connectProperties = new Properties();
    connectProperties.setProperty(DestinationDataProvider.JCO_ASHOST, "xx.xx.x.xx");
    connectProperties.setProperty(DestinationDataProvider.JCO_SYSNR,  "00");
    connectProperties.setProperty(DestinationDataProvider.JCO_CLIENT, "020");
    connectProperties.setProperty(DestinationDataProvider.JCO_USER,   "xxxxx");
    connectProperties.setProperty(DestinationDataProvider.JCO_PASSWD, "xxxxxx");
    connectProperties.setProperty(DestinationDataProvider.JCO_LANG,   "en");
    connectProperties.setProperty(DestinationDataProvider.JCO_SAPROUTER,   "/H/<saprouter>/H/<hostname>");
4

0 回答 0