简体   繁体   English

在扩展名上找不到主要方法

[英]No main method found on extension

i'm trying to compile this class from a Engine inside of my main program! 我正在尝试从我的主程序内部的Engine编译此类!

I'm trying to make a program that you can extent with extensions 我正在尝试制作一个可以扩展的程序

Error on: C:\Users\Howl3r\Desktop\New folder\extensions\testExt\TestLoader.java.error.log
Line: -1 - Column: -1

no main method in extensions.testExt.TestLoader

Here is the code i'm trying to run with a engine: 这是我要与引擎一起运行的代码:

package extensions.testExt;

import com.l2jsaver.controllers.ExtensionController;

import extensions.testExt.test.Test;

public class TestLoader 
{
    protected static int ID = 1;

    public static void main(String[] args) 
    {
        ExtensionController.getInstance().getExtensions().put(ID, new Test());
    }
}

There's nothing wrong with that code, as it exists in isolation. 该代码没有错,因为它是独立存在的。 It may be worthwhile to rebuild your eclipse project from scratch, and copy your code files into the new project, just to get your settings back to a sane place. 可能值得从头开始重建Eclipse项目,并将代码文件复制到新项目中,只是为了将设置恢复到合理的位置。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM