Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: getting java internal version using SQL query
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 }
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')
SQL> select get_Prop_Value ('java.vm.vendor') from dual;
GETPROPVALUE('JAVA.VM.VENDOR')
Regards
/Rauf Sarwar
-- Posted via http://dbforums.comReceived on Tue Jul 29 2003 - 06:29:04 CDT
![]() |
![]() |