Creating Java class in Oracle using DataGrip

I tried creating a java class in Oracle using DataGrip, something like this.

CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "XYZ"
AS import java.security.MessageDigest;
public class xyz
{
static public String doSomething(String inputVal) throws Exception
{
return inputVal;
}
}

But, it throws the following error. I am Oracle 11g and Java 6. When I created this using Toad it worked. I was wondering if there is a setting we have to choose in DataGrip for it to recognize the Java class? What am I missing?

ERROR at line 1:
ORA-29536: badly formed source: Encountered "<EOF>" at line 1, column 34.

0

Please sign in to leave a comment.