Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is there a way to install java on Oracle 11g XE?

I am using the database Oracle 11g Express Edition (XE) and when I try to create a java source object it returns me an error:

ORA-29538: Java not installed

The source code is simple:

create or replace and compile java source named hello AS 
  public class Hello {
    public static String hello() { return "Hello!"; }
  };

I found at Oracle's documentation that Oracle XE does not include Java.

Does anybody know if it is possible to "install" Java on it ?

like image 827
Vih Damarques Avatar asked Oct 24 '12 04:10

Vih Damarques


People also ask

How do I enable Java in Oracle?

If you install Oracle Database with Oracle JVM option, then the database is Java-enabled. That is, it is ready to run Java stored procedures and Java Database Connectivity (JDBC). This section contains the following topics: Configuring the Oracle JVM Option within the Oracle Database Template.

Can you use Java with Oracle?

Oracle Database provides support for developing, storing, and deploying Java applications. This chapter introduces the Java language to Oracle PL/SQL developers, who are accustomed to developing server-side applications that are integrated with SQL data.


2 Answers

No, Java support is not available in Oracle Database 11g Express Edition, and since the database itself does not have Java support, there is no way to extend it by installing Java yourself.

like image 75
Joachim Isaksson Avatar answered Sep 20 '22 18:09

Joachim Isaksson


And if you have the full licensed version of Oracle, and need to install the JVM in Oracle, you can invoke as sysdba:

 @?/javavm/install/initjvm.sql

and you may also need to run

 @?/rdbms/admin/catjava.sql

The website https://itkbs.wordpress.com/2014/02/15/how-to-install-java-in-oracle-database-ora-29538/ taught me the first part; I still had errors with a Java class schedFileWatcherJava not found, which the second script fixed.

You can verify if Java is installed with this query from that website:

select comp_name, version, status from dba_registry;

which will list JServer JAVA Virtual Machine as part of the results if Java is installed.

like image 43
Mark Stewart Avatar answered Sep 21 '22 18:09

Mark Stewart