Was könnte möglicherweise die Ursache dieser Fehlermeldung sein:
C:\pro>java TestJCo
Exception in thread "main" java.lang.NoClassDefFoundError: TestJCo
- Code: [Select all] [Expand/Collapse] [Download] (Untitled.txt)
- public class TestJCo
- {
- private JCO.Client _client;
- private String _sapClient = "000";
- private String _userID = "image";
- private String _pwd = "bcuser";
- private String _language = null; //sets default
- private String _hostname = "localhost";
- private String _sysNo = "00";
- //public void establishConnection()
- public TestJCo()
- {
- _client = JCO.createClient(_sapClient, _userID, _pwd, _language,_hostname, _sysNo);
- {
- _client.connect();
- System.out.println(_client.getAttributes());
- }
- catch(Exception e)
- {
- e.printStackTrace();
- }
- finally
- {
- _client.disconnect();
- }
- }
- public static void main(String[] args)
- {
- new TestJCo();
- }
- }
- GeSHi ©