Oracle - JSERVER - How to get the Java Version ?

Card Puncher Data Processing

About

How to get the java version of JSERVER ? (Not sure …)

Steps

The java class

package com.gerardnico;

public class Version {

	  public static String getJavaVersion() 
	  {
	    String JAVAversion = System.getProperty("java.version");
	    System.out.println("The version of JAVA is: "+JAVAversion);
	    return JAVAversion;
	  }
	
}

Publish the java class

CREATE OR REPLACE FUNCTION getJavaVersion RETURN VARCHAR2 IS LANGUAGE JAVA NAME 
'com.gerardnico.Version.getJavaVersion() return java.lang.String';

Get the java version

SQL> select getJavaVersion() from dual;

GETJAVAVERSION()
-----------------------------------------

1.4.2_04





Discover More
Card Puncher Data Processing
Oracle - Java

Oracle® Database Java Developer's Guide 10g Release 2 (10.2) Oracle®...



Share this page:
Follow us:
Task Runner