IDEA裡執行程式碼時出現Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUn
不多說,直接上乾貨!
問題詳情
當出現這類錯誤時是由於版本不匹配造成的
Information:2017/8/29 7:54 - Compilation completed with 10 errors and 0 warnings in 3s 910ms Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUnit4.class Error:scalac: error while loading ConsoleRunner, Scala signature ConsoleRunner has wrong version expected:5.0 found: 4.1 in ConsoleRunner.class Error:scalac: error while loading Specification, Scala signature Specification has wrong version expected: 5.0 found: 4.1 in Specification.class D:\Code\IntelliJIDEACode\HadoopSparkMllibAction\src\test\scala\zhouls\bigdata\MySpec.scala Error:(6, 26) illegal inheritance; self-type zhouls.bigdata.MySpecTest does not conform to org.specs.runner.JUnit4's selftype org.specs.runner.JUnit4 class MySpecTest extends JUnit4(MySpec) ^ Error:(6, 18) org.specs.runner.JUnit4 does not have a constructor class MySpecTest extends JUnit4(MySpec)^ Error:(8, 29) illegal inheritance; self-type zhouls.bigdata.MySpecRunner.type does not conform to org.specs.runner.ConsoleRunner's selftype org.specs.runner.ConsoleRunner object MySpecRunner extends ConsoleRunner(MySpec) ^ Error:(8, 21) org.specs.runner.ConsoleRunner does not have a constructor object MySpecRunner extends ConsoleRunner(MySpec) ^ Error:(10, 23) illegal inheritance; self-type zhouls.bigdata.MySpec.type does not conform to org.specs.Specification's selftype org.specs.Specification object MySpec extends Specification { ^ Error:(10, 15) org.specs.Specification does not have a constructor object MySpec extends Specification { ^ Error:(11, 27) value should is not a member of String "This wonderful system" should { ^
解決辦法
如果你想快速執行的話,就用idea建立的maven專案生成的幾個test類和物件註釋掉,或者刪除掉即可執行。
然後,執行即可。
當然,上面的這種方法不是最徹底的。
File -> settings -> Editor -> plugins -> junit
相關推薦
IDEA裡執行程式碼時出現Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expected: 5.0 found: 4.1 in JUn
不多說,直接上乾貨! 問題詳情 當出現這類錯誤時是由於版本不匹配造成的 Information:2017/8/29 7:54 - Compilation completed with 10 errors and 0 warnings in 3s 910ms Erro
IDEA裡執行程式碼時出現Caused by: java.lang.ClassNotFoundException: org.apache.log4j.Logger的解決辦法(圖文詳解)
不多說,直接上乾貨! 問題詳情 執行出現log4j的問題 "C:\Program Files\Java\jdk1.8.0_66\bin\java" -Didea.launcher.port=7533 "-Didea.launcher.bin.path=D:\Soft
在idea裡執行maven專案出現:Error: Could not find or load main class com.xxx.xxxx
原因分析:maven專案在執行時找不到主類,也就是專案啟動類找不到。可以嘗試以下方法。 思路:java檔案必須經過compile才會變成.class檔案,找不到.class檔案就是由於沒有經過編譯導致的。 可能是由於對maven專案執行了mvn clean命令,沒有執行mvn compile
IDEA+MAVEN搭建Scala錯誤:Error:scalac: error while loading JUnit4, Scala signature JUnit4 has
有開頭是類似錯誤的: Error:scalac: error while loading JUnit4, Scala signature JUnit4 has wrong version expec
mac執行 git 時出現xcrun: error: invalid active developer path解決方法
mac執行git命令時候出現: xcrun: error: invalid active developer path (/Library/Developer/CommandLineTools), missing xcrun at: /Library/Developer/Comman
Eclipse 連線 SQL Server 2008資料庫,執行JAVA程式碼時出現:‘sa’使用者登入失敗
前幾天用Eclipse 連線 SQL Server 2008資料庫,執行JAVA程式碼時總是出現:‘sa’使用者登入失敗。 我的連線方法都是按照網上找的,一直在尋找錯誤的原因,網上說(1)sql server的密碼是否正確;(2).sql server是否設定的是混合登入;
執行pip時出現Fatal error in launcher: Unable to create process using '"'
今天在執行pip安裝包時,出現了Fatal error in launcher: Unable to create process using ‘”’問題 解決方法:把終端的路徑切換進入python安裝路徑找到Scripts資料夾,並執行下面命令即可 p
idea在執行時正常,但打包成一個jar執行檔案時出現Could not load JNR C Library問題
在通過java連線cassandra時,其中com.datastax.driver.core是通過maven加入的,通過Idea執行時是正常的,在匯出jar時如果不是將所有的jar打包成一個jar時也是正常的,但是如果將所有的第三方打包成jar,則會出現如下錯誤: 17:3
執行MATLAB時出現Runtime Error的解決辦法
因為MATLAB需要用到處理器的數學運算部分,故需要設定一下BLAS(Basic Linear Algebra Subroutines,就是"基礎線性幾何子程式"的意思)環境變數.首先請確認你的MATLAB的資料夾中有如下文 件:atlas_Athlon.dll(AMD系列的請用這個),atlas_P4.dl
Android Studio中的控制元件初始化疑問:build沒問題,但執行模擬器時出現問題。錯誤程式碼:java.lang.RuntimeException: Unable to instant
在使用Android Studio,啟動模擬器時,出現如下錯誤:Logcat中的資訊如下:java.lang.RuntimeException:Unable to instantiate activityComponentInfo{com.example.dcyyw.appl
執行impdp時出現的各種問題
.html ref http .cn url ora pos creat 方案 1.執行impdp時出現ORA-39154錯誤的解決案例 http://www.tuicool.com/articles/MBfeyq 2.expdp ORA-39070:Unable to o
git push到遠程倉庫時出現Git Push Error: insufficient permission for adding an object to repository database
-a clas sudo mission 隱藏 文件夾 ng- l命令 文件和目錄 原因 其中一個原因是git遠程倉庫的目錄的擁有者不在同一個group裏,使得其他用戶在另一個用戶的子目錄中不能添加文件,因為兩者不在同一個組裏面,然後前者就相當於這個子目錄的“其他用戶”,而
win10操作虛擬機器中hadoop IntelliJ IDEA直接執行程式碼(不需要打jar包)
IntelliJ IDEA 2018.2.3 (Ultimate Edition)+Maven VMware中CentOS6.5 Hadoop2.7.1 上課的時候老師使用的是Eclipse編譯器,使用了 eclipse-hadoop的外掛。可以直接在eclipse
SimpleDateFormat時間格式化高併發、多執行緒時出現問題
SimpleDateFormat是是 Java 中一個非常常用的類,該類用來對日期字串進行解析和格式化輸出,但是DateFormat 和 SimpleDateFormat 類不都是執行緒安全的,在生產環境的多執行緒或高併發情況使用 format() 和 parse() 方法,會出現很多問題:
使用IDEA複用程式碼時常見問題
使用IDEA複用程式碼時常見問題 覺得有用的話,歡迎一起討論相互學習~Follow Me 作為新手在直接複用別人的java程式碼並使用IDEA進行二次開發時,經常出現一些奇怪的問題,在此做一些總結~ IntelliJ IDEA 中右鍵執行時沒有run
使用git往github上提交程式碼時出現[packet_write_wait connection to xx.xx.xx.xx Broken pipe]錯誤的解決辦法
使用git往github上提交程式碼時出現[packet_write_wait connection to xx.xx.xx.xx Broken pipe]錯誤的解決辦法: 找到git安裝的目錄/etc/s
記今天在執行程式時出現的segmentation fault(core dumped)
剛剛在複習資料結構的時候寫了一些單鏈表的操作,執行的時候出現segmentation fault(core dumped) 一番查錯後發現原來在寫初始化連結串列的時候形參少加了一級指標,修改完後可以正常執行,以為這就是造成segmentation fault 的原因。 過了一會想到我之前也有
msys2 執行gdb時 出現 ImportError: No module named libstdcxx.v6.printers
[email protected] MSYS ~ $ gdb GNU gdb (GDB) 7.11.1 Copyright (C) 2016 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later
在 emacs 的 org-mode 裡執行程式碼及一些快捷鍵
emacs 在開啟 .org 檔案時自動進入 org-mode 文章目錄 執行程式碼 快捷鍵 src block 編輯 執行程式碼 想要在 org-mode 中執行程式碼,就涉及到 Babel
執行kettle時出現couldn't create java virtual machine
執行kettle時出現couldn’t create java virtual machine 解決辦法:以文字編輯器的方式開啟spoon.bat,將檔案中的Xml改成1024。