Java 类存储在 Oracle 中的什么位置?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/657803/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-18 17:57:03  来源:igfitidea点击:

Where are java classes stored in Oracle?

javaoracleoracleinternals

提问by thecoop

Where is the java bytecode for loaded java classes stored within an oracle database? Specifically, is there a view or table I can use to obtain the raw bytes for java class schema objects within Oracle?

存储在 oracle 数据库中的加载的 java 类的 java 字节码在哪里?具体来说,是否有视图或表可用于获取 Oracle 中 Java 类架构对象的原始字节?

回答by Petros

If you have used CREATE JAVA SOURCE command to load the Java Source into the Oracle database then you can go to the data dictionary view USER_SOURCE and find your Java Source.

如果您已经使用 CREATE JAVA SOURCE 命令将 Java 源加载到 Oracle 数据库中,那么您可以转到数据字典视图 USER_SOURCE 并找到您的 Java 源。

If you need to display it or something, you can check out DBMS_JAVA.EXPORT_SOURCE which puts the source code in PL/SQL structures that you can manipulate.

如果您需要显示它或其他什么,您可以查看 DBMS_JAVA.EXPORT_SOURCE,它将源代码放入您可以操作的 PL/SQL 结构中。

Generally, if you want to just list all Java related stored objects you can execute the following:

通常,如果您只想列出所有与 Java 相关的存储对象,您可以执行以下操作:

SELECT
  object_name, 
  object_type, 
  status, 
  timestamp
FROM 
  user_objects
WHERE 
  (object_name NOT LIKE 'SYS_%' AND 
   object_name NOT LIKE 'CREATE$%' AND 
   object_name NOT LIKE 'JAVA$%' AND 
   object_name NOT LIKE 'LOADLOB%') AND
  object_type LIKE 'JAVA %'
ORDER BY
  object_type, 
  object_name;

回答by Darmen

Java bytecode stored in IDL_UB1$table:

存储在IDL_UB1$表中的Java 字节码:

select o.NAME, i.PIECE 
from obj$ o, IDL_UB1$ i 
where o.type# = 29 
    and o.obj# = i.obj#