eclipse - How do I include references (import XY) in a java class file? -


I am very new to Java, in fact it has started using today because we have an Oracle database We are developing and we need it to run the Java code.

I am adding a simple project without problems:

  public class test {public static string result () {Return "Successful Trials!"; }}  

I can load it into the database and can access it with PL / SQL. However, when I upload a class, I really need it, it is marked as "INVALID" in Oracle. I think this is due to the missing references in Java, for example, I have these imports:

  import java.text.SimpleDateFormat; Import java.util.Date;  

I think the problem is that the required DLL (actually Java equivalent to that) is missing in my Oracle database.

Now, is there any way for me to compile my Java class and include all the references mentioned in the definition of my class?

Thanks a lot!

All Java compiler added the import statement to the .class file. You do not need to do anything for this. But they do not include those classes which are imported. Therefore it is your responsibility to ensure that the Oracle DB server can access any custom classes.

Oracle Database Server comes with a standard Java VM, so all types of java below * should be visible when you upload Java code to execute on the server.

Other types may disappear. Read the documentation, one explanation should be how to upload JR archive with all the sections you need. Then create such jars and upload it (instead of just uploading a class file).


Comments

Popular posts from this blog

java - Can't add JTree to JPanel of a JInternalFrame -

javascript - data.match(var) not working it seems -

javascript - How can I pause a jQuery .each() loop, while waiting for user input? -