定义main方法时的ASM代码错误

时间:2015-02-12 18:44:43

标签: java eclipse scala axis2

我收到错误:

打印ASM代码以生成给定的类。 用法:ASMifier [-debug]

从我收集到的内容是因为我没有声明main方法但是在我的一个类中明确定义了:这可能是构建错误吗?

主要类

package com.exacttarget.client;
public class Main {
    public static void main(String[] args) {
        System.out.println("Test");
    }
}

PropertiesUtil Class

package com.exacttarget.client;

import java.util.Properties;

public class PropertiesUtil {
    private static PropertiesUtil _instance = new PropertiesUtil();
    Properties properties;

    public void init() {
        try {
            if (properties == null || properties.isEmpty()) {
                java.io.InputStream inConfig = PropertiesUtil.class.getClassLoader().getResourceAsStream("props.xml");
                properties.loadFromXML(inConfig);
                //properties.load(inConfig);
            }
        }
        catch (Exception e) {
            e.printStackTrace();
        }
    }

    private PropertiesUtil() {
        super();
        properties = new Properties();
        init();
    }

    public static PropertiesUtil getInstance() {
        return _instance;
    }

    public String getProperty(String key) {
        return properties.getProperty(key);
    }

}

PWCBHandler类

package com.exacttarget.client;


import java.io.IOException;
import javax.security.auth.callback.*;
import org.apache.ws.security.WSPasswordCallback;

public class PWCBHandler implements CallbackHandler {

  public PWCBHandler() {
  }

  @Override
public void handle(Callback callbacks[]) throws IOException, UnsupportedCallbackException {
    for(int i = 0; i < callbacks.length; i++)
      if(callbacks[i] instanceof WSPasswordCallback) {
         WSPasswordCallback pc = (WSPasswordCallback)callbacks[i];
         pc.setIdentifier(PropertiesUtil.getInstance().getProperty("username"));
         pc.setPassword(PropertiesUtil.getInstance().getProperty("password"));
         //pc.setPassword("welcome@1");
      } else {
        throw new UnsupportedCallbackException(callbacks[i], "Unrecognized Callback");
      }
  }
}

0 个答案:

没有答案