問題解決了,可是為什麼呢?could not find the main class.program will exitmain
看到這錯誤,我不由的開始懷疑是否自己打包的過程有誤,但是仔仔細細再看幾遍自己那文件,發現並沒有什麼問題,我那文件也是多次驗證後才寫的。於是只好在網上搜索了一番,發現大多數說的意思都是eclipse中編譯程式的時候使用的java版本與執行環境的java版本不一致,確切的說是編譯的版本高於執行環境的版本。但是經過一番檢查,我發現我電腦的環境變數配置的java和eclipse中編譯時配置的根本就是一樣的,都是1.7。無奈之下,只好把編譯的版本從1.7降到了1.6,結果再次打包後問題竟然真的就解決了。
可是為什麼呢?我還是沒有明白!
相關推薦
問題解決了,可是為什麼呢?could not find the main class.program will exitmain
今天重新學習socket編寫簡單的線上聊天,簡單功能實現的情況下,一時心血來潮便想要把這程式打成可執行的jar包,以便於在桌面直接雙擊執行。參照自己之前寫的那篇《》打好兩個jar包以後卻發現雙擊執行彈出
【解決方法】Could not find the main class Program will exit
問題背景: 從別人那考的程式,工程上出現紅歎號,於是修改了一下Java Build Path中的jdk版本(原來是1.5的,我沒有1.5,就給改成1.6了)。 開發環境: eclipse + jdk1.6 + jdk1.7(我裝了兩個jdk) 錯誤原因: 可能
Could not find the main class.Program will exit.
項目 getbean prop 文件 stat 運行時 mave func prope 我新建maven項目 寫了一個測試類 運行時報錯 import java.sql.*; import javax.sql.DataSource; import org.springf
錯誤處理:could not find the main class, Program will exit
1. 先檢查環境變數配置是否有錯。 a) 開啟我的電腦--屬性--高階--環境變數 b) 新建系統變數JAVA_HOME和CLASSPATH (注意:網上很多文章讓JAVA_HOME為使用者環境變數,但是這樣做後,在控制檯中輸入javac,將會提示“javac不是內部或外部命令”)變數名:
MyEclipse運行Java出錯:could not find the main class:test.program will exit(導入項目)
沒有 fin run lib could not sys program pil 編譯器 自己新建的項目運行沒有任何問題。但是我導入的很早以前別人寫的項目,然後run就會彈框could not find the main class:test.program will ex
"Could not find the main class: org.apache.catalina.startup.Boostrap. Program will exit."
src star pro could div myeclipse cat ould fin 嘗試將 myeclipse中的編譯版本修改(如,將1.5修改為1.6) "Could not find the main class: org.apache.catal
Debian配置JAVA環境報錯之Could not find the main class: HelloWorld. Program will exit.
配置好環境變數後測試出現以下錯誤: Exception in thread “main” java.lang.NoClassDefFoundError: HelloWord Caused by: java.lang.ClassNotFoundExceptio
DOS或SH中執行java報錯Could not find the main class: XX. Program will exit.
在命令列直接執行 java Test 系統報錯 Exception in thread "main" java.lang.NoClassDefFoundError: Test Caused by: java.lang.ClassNotFoundException: Test
如何解決部署Win10出現的Could not find the unattend file報錯?
體驗 方案 腳本 nag helpdesk it基礎 操作 dell onf 如何解決使用Symantec ITMS部署Win10出現的Could not find the unattend file報錯? ?Lander Zhang 專註外企按需IT基礎架構運維服務,IT
關於jmeter命令行執行.jmx文件出現Error in NonGUIDriver java.lang.RuntimeException: Could not find the TestPlan class的問題
使用 lang exception ava 出現 問題 drive test bug jmeter命令行執行.jmx文件時,有時回出現Error in NonGUIDriver java.lang.RuntimeException: Could not find the T
解決報錯:IncompleteElementException: Could not find result map...
base ase junit4 lock prepare join ram ems nas 今天遇到這樣一個報錯,記錄一下: org.apache.ibatis.builder.IncompleteElementException: Could not find resu
SpringBoot報406,web.HttpMediaTypeNotAcceptableException: Could not find acceptable representation
SpringBoot菜雞最近使用@ResponseBody返回一個map集合,集合包含資料總條數及資料集合list,方法如圖: 結果執行時斷點進了後臺但是後臺報錯,異常資訊為: WARN (AbstractHandlerExceptionRes
解決Gradle執行命令時報Could not determine the dependencies of task ':compileReleaseJava'.
內容 oid 兩個 jsb pan mpi 技術分享 android undle Could not determine the dependencies of task ‘:compileReleaseJava‘. > failed to find targe
Java EE 6 SDK uninstall 'Could not find the required version of the Java(TM) 2 Runtime Environment'
描述: 如題所示,詳細提示如下圖 原因及解決方法: 這是因為你本地的jdk版本和Java EE 6 SDK中的配置不一致才會 unintall不成,點選 OK 方法: 彈出框中給出提示解決方法 如下圖 是指定的Java執行環境沒有安裝,或者已有Java 執行環境已安裝,
java -version 和javac -version 兩個指不一樣,eclipse報Could not create the Java virtual machine 錯誤
以前我對32位機子和64位機子沒有絕對的概念,軟體通常32位和64位都有,直到最近一件事情發生了。。。。。。。。,我才遵守規矩。32位上裝32位的軟體,64位裝64位軟體。閒話不說,看看我的問題,和
qt.qpa.plugin: Could not find the Qt platform plugin "windows" in ""
轉載:https://forum.qt.io/topic/97484/qt-5-12-make-mingw-32-release/12 I build Qt 5.12 with MinGW 7.3.0 32bit from source. Download: link  
解決Gradle執行命令時報Could not determine the dependencies of task ':compileReleaseJava'.
Could not determine the dependencies of task ':compileReleaseJava'. > failed to find target andro
php7連接 sqlserver踩過的坑,could not find driver解決方式
無法使用 應該 pre could xxxxx xxxx drive In bubuko 最近把環境升級為php7發現在連接sqlser的時候無法使用驅動了 頁面錯誤 後來查看文檔發現:php7應該采用Server=xxxx;DataBase=xxxxx 解決方式: D
Android 解決因Android版本太低,導致Could not find class 錯誤的解決辦法
近期專案在測試過程中,在Android 5.0版本的測試中(以前APP測試未出現),GreenDao 出現 Could not find class 'org.greenrobot.greendao.database.StandardDatabase' 錯誤查閱資料後發現是
安裝MyEclipse時,雙擊安裝包後出現“could not find main class”的錯誤提示的解決方法
安裝MyEclipse時,雙擊安裝包後出現“could not find main class”的錯誤提示解決方法,在c:/windows/temp目錄下,找到唯一一個.exe檔案,雙擊執行它,然後在