問題描述
運行 .exe 文件生成 bt jar2exe 軟件時出現 java runtime environment not found 錯誤 (Getting java runtime enviroment not found error while running .exe file produced bt jar2exe software)
我在嘗試運行可執行文件後立即收到以下消息。
找不到 Java 運行時環境。
我已經安裝了 jdk 和jre 並且已經為兩者設置了路徑,並且能夠使用命令提示符運行任何類文件。不幸的是,我沒有使用 Netbeans 或 Eclipse。請人幫忙提前致謝。
參考解法
方法 1:
I found jar2exe website support that include install 32 bit jre for 32 bit OS and 64 bit jre for 64 bit OS. The best solution is reinstall correct version of Java and choose offline installer (since online installer mostly install 32 bit before, but I don't sure is smart enough to detect 32 bit or 64bit now). (I'm sorry that I don't gain enough reputation to post on comments)
方法 2:
You need an appropriate jre installed that is the same with your Jar2Exe (on step 6 during Exe creation). If you're check "Create 64 bits executive" on those step you'll need 64 bit jre, but if you unchecked it then you need 32 bit jre.
(by Shivam Rai、rk0_c、Adi)