Where are java classes stored in Oracle?

后端 未结 2 1294
鱼传尺愫
鱼传尺愫 2021-01-05 02:19

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

2条回答
  •  忘掉有多难
    2021-01-05 02:41

    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;
    

提交回复
热议问题