Where are java classes stored in Oracle?

情到浓时终转凉″ 提交于 2019-12-01 00:46:27

问题


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?


回答1:


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.

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.

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

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;



回答2:


Java bytecode stored in IDL_UB1$ table:

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


来源:https://stackoverflow.com/questions/657803/where-are-java-classes-stored-in-oracle

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!