1

I got the following code(Command Line) from http://db.apache.org/derby/docs/10.8/adminguide/tadminconfig814963.html :-

java -Dderby.drda.startNetworkServer=true
-Dderby.drda.portNumber=1110
-Dderby.drda.host=myhost yourApp

Now, I am very confused regarding these two fields:-
myHost - Is it "localhost"?
and
yourApp- Is it the full location of my app?

I am using netbeans and I am a novice in java. So, please provide details...

h2O
  • 544
  • 1
  • 15
  • 38

1 Answers1

2

yourapp is tha main class for your java application. myHost is the address that derby will listen on - localhost will cause it to not receive connections from other computers

radai
  • 23,949
  • 10
  • 71
  • 115
  • is yourapp the full location of the class? or is it just the class name – h2O Nov 17 '13 at 14:12
  • it should be the fully qualified name of the class (including package). if you need more help with invoking java applications from the command line you should really read up on the java classpath - http://stackoverflow.com/questions/219585/setting-multiple-jars-in-java-classpath is a good starting point – radai Nov 17 '13 at 14:14
  • And what is myHost, can u please give an example? I am really confused. – h2O Nov 17 '13 at 14:21
  • a process (no matter what language its written in) listens on a specific port on a specific interface. when you tell a process to listen on "localhost" it will only accept connections coming in from other processes on the same machine. a computer might have several network interfaces and so several IPs/addresses. you need to set which one you want to listen on. most places "0.0.0.0" means "all" – radai Nov 17 '13 at 14:26