Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: getting java internal version using SQL query

Re: getting java internal version using SQL query

From: Rauf Sarwar <rs_arwar_at_hotmail.com>
Date: Tue, 29 Jul 2003 11:29:04 +0000
Message-ID: <3160583.1059478144@dbforums.com>

Originally posted by Barry
> Hi, is there a way of getting the internal JVM details from within
> Oracle, details similar to what is shown below when I type "java
> -version" from the command line.
>
> I can't seem to find the information in the Oracle docs, although I'm
> sure it's there and I'm just using the wrong search key, or in Kytes
> book (DBMS_JAVA, pages 1050-1058). I'm looking for something like (the
> query below is hypothetical).
>
> SQL> SELECT * FROM V$JAVA;
>
> Thank you
> Barry
>
>
> C:\test>
> C:\test>java -version
> java version "1.3.1_02"
> Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
> OJVM Client VM (build 9.0.3.738 cdov, Copyright (c) 1998-2002 Oracle
> Corp., nojit)
>
> C:\test>
> C:\test>
> C:\test>

SQL> create or replace and compile java source   2 named "getproperty"
  3 as
  4
  5 public class getproperty {
  6

  7        public static String getPropValue (String property)
  8           throws Exception {
  9
 10           return System.getProperty(property);
 11
 12        }
 13     }

 14 /

Java created.

SQL> create or replace function get_Prop_Value (   2 property_ in varchar2 ) return varchar2   3 as
  4 language java name 'getproperty.getPropValue (java.lang.String)   return java.lang.String';
  5 /

Function created.

SQL> select get_Prop_Value ('java.vm.version') from dual;

GETPROPVALUE('JAVA.VM.VERSION')




1.3.1

SQL> select get_Prop_Value ('java.vm.vendor') from dual;

GETPROPVALUE('JAVA.VM.VENDOR')




Oracle Corporation

Regards
/Rauf Sarwar

--
Posted via http://dbforums.com
Received on Tue Jul 29 2003 - 06:29:04 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US