-1
我在Eclipse中創建了一個.jar
文件來調用paint類。當我完成它給了我一個錯誤:如何從另一個.jar文件調用paint類
JAR export finished with warnings. See details for additional information.
Exported with compile warnings: Graphics/src/G1.java
Jar export finished with problems. See details for additional information.
Could not find main method from given launch configuration.
這裏是我的代碼來調用paint方法:
public class G1Starter {
public void main(String[] args)
{
Graphics1 g1 = new Graphics1();
g1.repaint();
}
}
我試圖使在Graphics1
類main
方法,但沒有奏效。