問(wèn)題描述
當(dāng)我嘗試運(yùn)行 Java 應(yīng)用程序時(shí),我收到以下錯(cuò)誤:
When I try to run Java application, I receive the following error:
線程main"java.lang.UnsatisfiedLinkError 中的異常:java.library.path 中沒(méi)有 ocijdbc9
我的 PC 上沒(méi)有文件 ocijdbc9.*
,但我在 %ORACLE_HOME%in
中有 ocijdbc10.dll
.
I don't have a file ocijdbc9.*
on my PC, but I have ocijdbc10.dll
in %ORACLE_HOME%in
.
%ORACLE_HOME%
指定正確,所以我認(rèn)為問(wèn)題在于應(yīng)用程序正在搜索錯(cuò)誤的版本(9 而不是 10).
%ORACLE_HOME%
is correctly specified, so I think the problem is that the application is searching for the wrong version (9 instead of 10).
Oracle 和 Java Builder 都是新安裝的,所以問(wèn)題可能出在項(xiàng)目偏好上?您對(duì)如何搜索指定錯(cuò)誤版本的地方有什么想法嗎?
Both Oracle and Java Builder are freshly installed, so the problem may be in project preferences? Do you have any ideas on how to search for the place where the wrong version is specified?
推薦答案
你的 java CLASSPATH 中缺少一個(gè)文件.
You're missing a file from your java CLASSPATH.
您需要將 OCI jar 添加到您的類路徑中.
You need to add the OCI jar to your classpath.
對(duì)于我在 Windows 上安裝的 oracle 10.0.2,它位于
For my oracle 10.0.2 install on windows it's located in
%ORACLE_HOME%jdbclibojdbc14.jar
如果您的應(yīng)用程序需要 ocijdbc9,那么您必須從某個(gè)地方下載它并將其添加到 CLASSPATH.不知道從哪里下載,試試oracle網(wǎng)站吧
If your application requires ocijdbc9 then you'll have to download it from somewhere and add it to the CLASSPATH. I don't know where to download it from, try the oracle site
這篇關(guān)于java.library.path 中沒(méi)有 ocijdbc9的文章就介紹到這了,希望我們推薦的答案對(duì)大家有所幫助,也希望大家多多支持html5模板網(wǎng)!