Skip to Main Content

Java HotSpot Virtual Machine

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Select 32 bit VM on 64 bit System

883772Aug 22 2011 — edited Aug 25 2011
Hello,

I'm developping an application which needs a 32-Bit VM because the use of a native 3rd party library which only supports 32-Bit. On a 64-Bit system which installed 32 and 64-Bit JRE I tried using the -d32 switch to force the use of the 32-Bit JRE. But I get the following error message:

C:\Users\tom>java -d32 -version
Error: This Java instance does not support a 32-bit JVM.
Please install the desired version.

But the following works:

C:\Users\tom>java -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) 64-Bit Server VM (build 21.0-b17, mixed mode)

and this also:

C:\Users\tom>"C:\Program Files (x86)\Java\jre7\bin\java.exe" -d32 -version
java version "1.7.0"
Java(TM) SE Runtime Environment (build 1.7.0-b147)
Java HotSpot(TM) Client VM (build 21.0-b17, mixed mode, sharing)

I tried reinstalling the JREs but it doesn't help. So, why does'n the launcher find the 32-Bit JRE? Why doesn't the switch work as described ([http://www.oracle.com/technetwork/java/hotspotfaq-138619.html#64bit_selection])?

Comments

153119
Answer
shared server, by any chance?
In that case it won't work and your session will end up in various s<nnnn> traces.

--
Sybrand Bakker
Senior Oracle DBA
Marked as Answer by Laurent Schneider · Sep 27 2020
Laurent Schneider
Excellent, I did not know this...

For completion, here is the test case, it fully solved my issue as I am now forcing to use dedicated server before connect to get a full trace.
$ sqlplus "scott/tiger@
  (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=srv1.laurentschneider.com)(PORT=1521))
  (CONNECT_DATA=(SERVICE_NAME=LSC01.laurentschneider.com)(SERVER=SHARED)))"

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 28 16:14:18 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.

Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production

SQL> select s.sid,ss.name, p.spid
  2  from v$shared_server ss
  3  right join v$circuit c using (circuit)
  4  right join v$session s on ( s.saddr=c.saddr )
  5  join v$process p on (s.paddr=p.addr)
  6  where sid in (
  7      select sid from v$mystat);
       SID NAME SPID
---------- ---- ------------
       323 S001 11397

SQL> alter session set sql_trace=true;

Session altered.

SQL> select sysdate from dual;
SYSDATE
-------------------
2008-11-28 16:30:21

SQL> alter session set sql_trace=false;

Session altered.

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production

$ ls *11397*
*11397*: No such file or directory
$ sqlplus "scott/tiger@
  (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=srv1.laurentschneider.com)(PORT=1521))
  (CONNECT_DATA=(SERVICE_NAME=LSC01.laurentschneider.com)(SERVER=DEDICATED)))"

SQL*Plus: Release 10.2.0.1.0 - Production on Fri Nov 28 16:30:37 2008

Copyright (c) 1982, 2005, Oracle.  All rights reserved.


Connected to:
Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production

SQL>
SQL> select s.sid,ss.name, p.spid
  2  from v$shared_server ss
  3  right join v$circuit c using (circuit)
  4  right join v$session s on ( s.saddr=c.saddr )
  5  join v$process p on (s.paddr=p.addr)
  6  where sid in (
  7      select sid from v$mystat);
       SID NAME SPID
---------- ---- ------------
       323      10965

SQL> alter session set sql_trace=true;

Session altered.

SQL> select sysdate from dual;
SYSDATE
-------------------
2008-11-28 16:31:16

SQL> alter session set sql_trace=false;

Session altered.

SQL> exit
Disconnected from Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit Production
With the Partitioning option
JServer Release 9.2.0.8.0 - Production
$ ls *10965*
LSC01_ora_10965.trc
1 - 2
Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Sep 22 2011
Added on Aug 22 2011
6 comments
15,383 views