linux 報錯 jpype._jexception.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class not found
目的:記錄這個坑
問題:如圖jpype._jexception.RuntimeExceptionPyRaisable: java.lang.RuntimeException: Class XXX not found
描述:此程式碼在windows環境正常執行,但是移植到linux平臺就報錯
問題解決過程:
1)windows執行正常,基本可以排除程式碼問題,確定是環境問題
2)檢查java、python、linux、jpype的版本,及位數——OK
3)確定jvmpath、jarpath無誤
4)採納網上結論,設定java環境變數時,直接export匯入,並且設定CLASSPATH——無效(我本來就是這麼設定的~~)
JAVA_HOME=/usr/java/jdk1.8.0_251
JRE_HOME=$JAVA_HOME/jre
CLASS_PATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar:$JRE_HOME/lib
PATH=$PATH:$JAVA_HOME/bin:$JRE_HOME/bin
export JAVA_HOME JRE_HOME CLASS_PATH PATH
5)根據這位兄弟的結論,開始懷疑“linux中jpype載入多個JAR包時存在BUG”——解決問題
結論:linux中jpype載入多個JAR包時存在BUG,可以合併JAR包
mkdir tmp
cd tmp
jar -xf ../jar1.jar
jar -xf ../jar2.jar
cd ..
jar -cvf test.jar -C tmp .
最後:附上原大佬連結
https://www.v2ex.com/t/215920
相關文章
- ***報錯Class 'Redis' not found in(原創)Redis
- 使用URLClassLoader報錯not class found exceptionException
- Lumen 報錯 : Class 'League\Flysystem\Adapter\Local' not foundAPT
- Ubuntu 20.04 安裝 php-xml 模組(報錯:Class 'DOMDocument' not found )UbuntuPHPXML
- 【linux報錯】-bash: xhost: command not foundLinux
- Eclipse 啟動專案錯誤:class not foundEclipse
- gorm忽略報錯: record not foundGoORM
- Linux Shell執行source或.命令報錯'bash: ..: command not found'Linux
- Linux升級核心後報No volume groups found錯誤Linux
- mybatis 報錯: Invalid bound statement (not found)MyBatis
- 64位linux報錯Could not initialize class java.awt.image.BufferedImageLinuxJava
- 【maven】Maven報錯 zip END header not foundMavenHeader
- composer安裝完成輸入命令報錯:Fatal error: Class ‘Phar‘ not found in C:\\ProgramData\\ComposerSetup\\bin\\compoError
- 執行npm run dev 後報錯 Mix: not foundNPMdev
- 設定Ruby報錯bad response Not Found 404
- AS執行main()方法報錯:SourceSet with name ‘main‘ not foundAI
- python virtualenv報錯-bash: virtualenv: command not foundPython
- Xcode8報錯:No code signature foundXCode
- npm install報錯, npm ERR! code MODULE_NOT_FOUNDNPM
- Flutter 安裝搭建報錯 Android sdkmanager tool not foundFlutterAndroid
- cgo: C compiler "gcc" not found 報錯安裝gccGoCompileGC
- sourcetree github clone 報錯 hg clone fails with “repository not found“GithubAI
- vue中報錯:[vuex] module namespace not found in mapActions(): comment/Vuenamespace
- go tool compile 報錯 could not import sync (file not found)GoCompileImport
- 案例2問答機器人報TypeError: Class com.hankcs.hanlp.HanLP is not found機器人ErrorHanLP
- 在AS中自定義字型庫報錯:java.lang.RuntimeException: native typeface cannot be made自定義字型JavaException
- Could not initialize class sun.awt.X11GraphicsEnvironment 報錯
- [Symfony\Component\Debug\Exception\FatalThrowableError] Class 'LaravelLocalization' not foundExceptionErrorLaravel
- kattle Driver class 'oracle.jdbc.driver.OracleDriver' could not be foundOracleJDBC
- React Native 報錯 'config.h' file not foundReact Native
- Mac之telnet報錯-bash: telnet: command not foundMac
- Windows下pip安裝scipy報錯no lapack/blas resources foundWindows
- 編寫自定義 Laravel 擴充套件包測試用例,phpunit 錯誤提示 “class not found”Laravel套件PHP
- iOS上傳App Store報錯:no suitable application records were foundiOSAPPUI
- /system/bin/sh: screenrecord: inaccessible or not found 報錯解決方案
- 【ASM】Oracle RAC css啟動報錯"Duplicate voting file found"ASMOracleCSS
- As 除錯 no target device found除錯dev
- 【APIM】Azure APIM丟擲 java.lang.RuntimeException 錯誤定位APIJavaException