調用java我有以下代碼(我試圖做的是從調用PLSQL Java代碼在google.com打開一個新的網頁):我似乎無法從PLSQL
CREATE OR REPLACE AND COMPILE JAVA SOURCE NAMED "Hello" AS
import java.awt.Desktop;
import java.net.URI;
class Hello
{
public static void main(String args[]) throws Exception
{
Desktop d=Desktop.getDesktop();
d.browse(new URI("http://google.com"));
}
};
/
CREATE OR REPLACE PROCEDURE SAMP_JAVA_CALL AS
LANGUAGE JAVA NAME 'Hello.main(java.lang.String[])';
/
它編譯沒有任何錯誤,但是當我嘗試執行SAMP_JAVA_CALL
過程中,我得到這個錯誤:
Error report -
ORA-29549: class JAYPV.Hello has changed, Java session state cleared
ORA-06512: at "JAYPV.SAMP_JAVA_CALL", line 1
ORA-06512: at line 1
29549. 00000 - "class %s.%s has changed, Java session state cleared"
*Cause: A class in use by the current session was redefined or dropped,
invalidating the current Java session state and requiring that
it be cleared.
*Action: No action required.
你有這是爲什麼不工作的任何想法? 我正在使用sqldeveloper版本4.0.0.13,Oracle版本12c。
提到遵循這一https://docs.oracle。 com/cd/B19306_01/java.102/b14187/chthree.htm –