This discussion is archived
1 2 Previous Next 23 Replies Latest reply: Dec 1, 2011 6:23 PM by Hjava RSS

two basic questions

Hjava Newbie
Currently Being Moderated
1) when I ceeate object in oracle, where is the object locate?
2) I have Helloworld.class in c:\java , and my oracle install on D:\ how can I load the java class into db?
my jdk is install on win I can compile my java class
  • 1. Re: two basic questions
    6363 Guru
    Currently Being Moderated
    Hjava wrote:
    1) when I ceeate object in oracle, where is the object locate?
    It depends on what object you create and how.
    2) I have Helloworld.class in c:\java , and my oracle install on D:\ how can I load the java class into db?
    http://download.oracle.com/docs/cd/E11882_01/java.112/e16548/ssid.htm#JJDBC28261
  • 2. Re: two basic questions
    Frank Kulash Guru
    Currently Being Moderated
    Hi,
    3360 wrote:
    Hjava wrote:
    1) when I ceeate object in oracle, where is the object locate?
    It depends on what object you create and how.
    It also depends on what you mean by "locate". Most objects are located in a schema, and they are also located in a tablespace, and they are also located in a datafile.
    Schemas and tablespaces can have any kind of relationship. Objects from the same schema can be in different tablespaces, and objects from different schemas can be in the same tablespace.
    Each datafile is associated with a single tablespace.
  • 3. Re: two basic questions
    Hjava Newbie
    Currently Being Moderated
    Thank you for the replies
    1) loadjava -user test HelloWorldApp.class
    Password: test I get error I get error
    Error starting at line 1 in command:
    loadjava  -user test  HelloWorldApp.class
    Error report:
    Unknown Command

    Error starting at line 2 in command:
    Password: test
    Error report:
    Unknown Command by the way, recently, when I try to login this forums , I always get internet connect 500 error , is anyone else have this problem??
    Thank You
  • 4. Re: two basic questions
    sb92075 Guru
    Currently Being Moderated
    http://www.oracle.com/technetwork/java/faq-141681.html
  • 5. Re: two basic questions
    Peter Gjelstrup Guru
    Currently Being Moderated
    Hi,

    Where does this come from?
    Error report:
    From where are you executing that loadjava utillity?


    Regards
    Peter
  • 6. Re: two basic questions
    mennan Newbie
    Currently Being Moderated
    Hjava wrote:
    1) loadjava -user test HelloWorldApp.class
    Password: test I get error I get error
    Error starting at line 1 in command:
    loadjava  -user test  HelloWorldApp.class
    Error report:
    Unknown Command
    loadjava can be executed from command prompt or shell, like sqlplus.
    Regards,
    Mennan
  • 7. Re: two basic questions
    Peter Gjelstrup Guru
    Currently Being Moderated
    mennan wrote:
    loadjava can be executed from command prompt or shell, like sqlplus.
    ? Are you saying that sqlplus is a shell?

    Let's just say that you could execute loadjava from sqlplus, but that would be rather unusal. Care to demonstrate?
    CMD>sqlplus /nolog
    
    SQL*Plus: Release 10.2.0.1.0 - Production on L° Nov 19 18:49:52 2011
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    SQL> loadjava
    SP2-0042: unknown command "loadjava" - rest of line ignored.
    SQL>
    Regards
    Peter
  • 8. Re: two basic questions
    mennan Newbie
    Currently Being Moderated
    Peter Gjelstrup wrote:
    mennan wrote:
    loadjava can be executed from command prompt or shell, like sqlplus.
    ? Are you saying that sqlplus is a shell?
    Hi Peter;
    As sqlplus can be executed from shell, loadjava can also be executed with this way, as well.
    Regards,
    Mennan
    [oracle@dhcppc5 ~]$ sqlplus /nolog
    
    SQL*Plus: Release 11.1.0.7.0 - Production on Sat Nov 19 20:39:12 2011
    
    Copyright (c) 1982, 2008, Oracle.  All rights reserved.
    
    SQL> exit
    [oracle@dhcppc5 ~]$ loadjava
    loadjava: Usage: loadjava [-definer] [-encoding encoding] [-force] [-genmissing] [-genmissingjar jar] [-grant grants] [-help] [-nousage] [-noverify] [-oci8] [-order] [-resolve] [-nativecompile] [-resolver resolver] [-schema schema] [-synonym] [-thin] [-tableschema schema] [-user user/password@database] [-verbose] [-edition edition] classes..jars..resources..properties...  
  • 9. Re: two basic questions
    Peter Gjelstrup Guru
    Currently Being Moderated
    mennan wrote:
    Hi Peter;
    As sqlplus can be executed from shell, loadjava can also be executed with this way, as well.
    Oh, that's what you meant. Just didn't understand the meaning of your first sentence, then

    Best regards
    Peter
  • 10. Re: two basic questions
    Hjava Newbie
    Currently Being Moderated
    Thank you all,
    sometimes I am busy when I did have time ,  mosrt of the time whenI try to login in, I get the server enavalable page !
    I rum my code in oracle sql developer , I get error like
    Error starting at line 1 in command:
    loadjava -user test HelloWorldApp.class
    Error report:
    Unknown Command

    Error starting at line 2 in command:
    Password: test
    Error report:
    Unknown Command

    if I run on
    SQL> connect test/test
    Connected.
    SQL> loadjava -user test HelloWorldApp.class
    SP2-0734: unknown command beginning "loadjava -..." - rest of line ignored.
    SQL> Password: test

    I don't get what is
    [oracle@dhcppc5 ~]$ loadjava

    Thank you
  • 11. Re: two basic questions
    Peter Gjelstrup Guru
    Currently Being Moderated
    Hi,

    You should run loadjava from a command prompt.

    That is, before you got to here:
    SQL> connect test/test
    You probably did something like:

    CMD> sqlplus

    Do the same thing for loadjava:
    CMD> loadjava -user test HelloWorldApp.class

    What you need to understand, is that loadjava is not a SQL command, nor a SQL*Plus. It is a executable that comes with the JVM

    I don't get what is
    [oracle@dhcppc5 ~]$ loadjava
    Looks like a *nix command prompt


    Regards
    Peter
  • 12. Re: two basic questions
    Hjava Newbie
    Currently Being Moderated
    Thank you for the reply, but
    c:\> loadjava -user test HelloWorldApp.class
    'loadjava' is not recognized as an internal or external command,
    operable program or batch file.
    
    c:\>sqlplus
    
    SQL*Plus: Release 10.2.0.1.0 - Production on Thu Nov 24 21:24:20 2011
    
    Copyright (c) 1982, 2005, Oracle.  All rights reserved.
    
    Enter user-name: test
    Enter password:
    
    Connected to:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    
    SQL>  loadjava -user test HelloWorldApp.class
    SP2-0734: unknown command beginning "loadjava -..." - rest of line ignored.
    SQL>
  • 13. Re: two basic questions
    sb92075 Guru
    Currently Being Moderated
    http://www.lmgtfy.com/?q=oracle+loadjava
  • 14. Re: two basic questions
    Peter Gjelstrup Guru
    Currently Being Moderated
    Hjava wrote:
    Thank you for the reply, but
    c:\> loadjava -user test HelloWorldApp.class
    'loadjava' is not recognized as an internal or external command,
    operable program or batch file.
    Wow, That means if you did the following:
    c:\> this_executable_is_not_in_my_PATH
    'this_executable_is_not_in_my_PATH' is not recognized as an internal or external command,
    operable program or batch file.
    You would still ask what to do about it?


    Regards
    Peter
1 2 Previous Next

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points