eclipse報錯 錯誤: 找不到或無法加載主類

1、在項目上右鍵-->build path---->config build path 選擇本機jdk不要jre

、、、、

若以上不行

2、選擇編譯的方式,在項目上右鍵-->properties--->選擇 java compiler 按照圖中制定jdk

3、在maven項目中制定編譯的方式

    <build>
        <plugins>

            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>1.8</source>
                    <target>1.8</target>
                </configuration>
            </plugin>
        </plugins>
    </build>

 

4、右鍵ruan as  ---> run configuartions指定jdk版本

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章