gpt4 book ai didi

java - 业务对象程序对象时间表

转载 作者:行者123 更新时间:2023-12-02 04:25:20 25 4
gpt4 key购买 nike

package com.ghc.bo.extract;

//import com.crystaldecisions.sdk.plugin.desktop.program.IProgramBase;
import com.crystaldecisions.sdk.framework.IEnterpriseSession;
import com.crystaldecisions.sdk.occa.infostore.IInfoStore;
import com.crystaldecisions.sdk.exception.*;
import com.crystaldecisions.sdk.framework.*;


public class ExecuteExtract implements com.crystaldecisions.sdk.plugin.desktop.program.IProgramBase
{


public void run(IEnterpriseSession boEnterpriseSession, IInfoStore InfoStore, String[] args)
{
System.out.println("Arguments are: ");

for (int i=0; i<args.length; i++)
{
System.out.println("args[" + i + "]=" + args[i]);
}

try
{
String name = boEnterpriseSession.getUserInfo().getUserName();
System.out.println("user \"" + name + "\" logged in via run() method");
}
catch(SDKException ske)
{
System.out.println(ske);
}

System.out.println("CMS is " + boEnterpriseSession.getCMSName());
}

public static void main(String[] args)
{

IEnterpriseSession boEnterpriseSession = null;
ISessionMgr boSessionMgr = null;
IInfoStore boInfoStore = null;

String userName = null;
String cmsName = null;
String password = null;
String authType = null;

userName = args[0];
password = args[1];
cmsName = args[2];
authType = args[3];


if ((args.length == 4 || args.length == 5) && args[0] != null)
try
{
boSessionMgr = CrystalEnterprise.getSessionMgr();

boEnterpriseSession = boSessionMgr.logon(userName, password, cmsName, authType);
System.out.println("user \"" + userName + "\" logged in via main() method");

boInfoStore = (IInfoStore) boEnterpriseSession.getService("", "InfoStore");
}
catch (SDKException e)
{
System.out.println(e.getMessage());
System.exit(1);
}

//call the run() method
ExecuteExtract pot = new ExecuteExtract();
pot.run(boEnterpriseSession, boInfoStore, args);

}
}

嗨,我跑了这个,我做了这里的所有事情http://scn.sap.com/community/bi-platform/blog/2014/11/25/how-to-create-a-program-file-in-bi4#comment-613074这基本上只是创建一个 jar 文件并为计划进行最少的配置。我将 jar 创建为可运行的实用程序 jar,我打包/提取了包含的 jar,并将它们排除在外。我尝试了所有这些方法,并将类名“ExecuteExtract”放入程序参数中,但仍然收到错误

Failed to load class: [ExecuteExtract]. Reason: [java.lang.ClassNotFoundException: ExecuteExtract].

有人知道我缺少什么吗?

最佳答案

使用默认包,或指定完全限定类名 (com.ghc.bo.extract.ExecuteExtract) 作为程序对象参数中的类名。

关于java - 业务对象程序对象时间表,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/32261431/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com