问题
I need to connect to a database and use a wallet file. If i try with my SQL Developer i end up with "ocijdbc.dll: Cant load IA 32bit .dll on a AMD 64-bit platform."
I have both installed JDK 32 bit (in C:Prog32bit) and JDK 64 bit (C:Prog) for development.
I tried to set JavaHome in sqldeveloper/bin/sqldeveloper.conf manually SetJavaHome C:\Program Files (x86)\Java\jdk1.7.0_51
My next step was to edit %USER_HOME%/sqldeveloper/sqldeveloper.conf and I set SetJavaHome there too, but none didn't work.
Next step was, i edited sqldeveloper/bin/sqldeveloper.bat and set:
JAVA_HOME="C:\Program Files (x86)\Java\jdk1.7.0_51"
path="C:\Program Files (x86)\Java\jdk1.7.0_51\bin%"
java.exe -Xmx640M -Xms128M -Xveri....
My last try was to use the command line (as I would do on linux) and run:
D:\sqldeveloper>PATH="C:\Program Files (x86)\Java\jdk1.7.0_51\bin"
D:\sqldeveloper>java -version
java version "1.7.0_51"
Java(TM) SE Runtime Environment (build 1.7.0_51-b13)
Java HotSpot(TM) Client VM (build 24.51-b03, mixed mode, sharing)
D:\sqldeveloper>sqldeveloper.exe
But i still receive the message sqldeveloper is running 64 bit Java.
I found a workarround. An older version of SQL Developer (bundeld with jdk) is available at http://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/sqldev-downloads-v322-2080107.html
回答1:
The main problem in this case is that you have installed a 32 bits Oracle Driver to connect to your database in a 64 bit machine. There is no problem with that but you need to set SetJavaHome to a jdk directory that contains 32 bits version.
In sqldeveloper 4 you need to edit the file:
"C:\Users\username\AppData\Roaming\sqldeveloper\1.0.0.0.0\product.conf"
and inside this config file change the default directory for jdk1.7.0_71 32 bits is like this:
SetJavaHome C:\Program Files (x86)\Java\jdk1.7.0_71
After you use this path, check in Task Manager that your process sqldeveloper looks like this: sqldeveloper.exe *32
If your process starts with that "*32" you could be able to connect using your 32 bits oracle driver.
回答2:
Set the SetJavaHome
value at %appdata% "Roaming\sqldeveloper\1.0.0.0.0\product.conf"
回答3:
This could be cause of connection type as well.
Before connecting to database,
Right click on database and goto properties Change the connection type to Basic from TNS, set the port and service name/SID, provide password and save the connection. Try testing the connection, this resolved the issue for me.
来源:https://stackoverflow.com/questions/22225769/how-to-start-oracle-sql-developer-4-using-32-bit-jdk-on-win-64