Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Java IDL : servertool does not register and hangs

I am running CORBA Persistent Object implementation in Java IDL

as in Java IDL: The "Hello World" Example

I followed exact procedure in above article

I used servertool for registering Persistent server as shown in example . but when i tried to register server using syntax as in that article :

servertool > register -server PersistentServer -applicationName s1 -classpath path_to_server_class_files

I hangs and doesnt do any thing , then i have to do ctrl+c to back to normal mode

what could be wrong with this ??

like image 708
ajduke Avatar asked Oct 20 '11 11:10

ajduke


1 Answers

The problem is that your Java JDK installation path contains spaces.

If your JDK is installed to a path with spaces for example "C:\Program Files\Java\jdk1.7.0" then you have to start orbd and servertool using their absolute path (in Windows you have to use short hand notation i.e with ~ [tilda]):

C:\Progra~1\Java\jdk1.7.0\bin\orbd -ORBInitialPort 1050 -serverPollingTime 200

C:\Progra~1\Java\jdk1.7.0\bin\servertool -ORBInitialPort 1050

servertool> register -server PersistentServer -applicationName MyApp -classpath . (adjust the classpath as needed for the files generated by idlj)

In Windows you can find short name path using: dir *.* /x

In case your using an environment variable like %JAVA_HOME% equals to "C:\Program Files\Java\jdk1.7.0" and then you append it to PATH it will NOT work, you have to use short hand notation (with tilda) i.e. "C:\Progra~1\Java\jdk1.7.0"

HINT: If your JDK is installed in a path with no spaces, for example C:\Java\jdk1.7.0 then you can start orbd and servertool without using an absolute path and it will work.

like image 111
Alex Bitek Avatar answered Oct 24 '22 03:10

Alex Bitek