Forum Discussion

Keith_Motschenb's avatar
Keith_Motschenb
Icon for Nimbostratus rankNimbostratus
Feb 09, 2006

Finding the iControl.jar file

I noticed on some of the messages on the forum that there is a iControl.jar file. I have been trying to compile the 9.2.2 Java examples and keeps complaining about finding that jar file. Could you please tell me where this jar file is located?

3 Replies

  • The samples should not complain about an iControl.jar file. The only requre jars are the ones included with Apache Axis.

     

     

    We don't include a jar file for the client bindings for several reasons. The main one being the fact that the client bindings are different depending on which version of Apache Axis you are using. We would have to bundle a jar file for each version of their toolkit.

     

     

    The makefile in the SDK will generate the client bindings in the "bindings" directory. If you need to bundle this into a jar file for distribution, you will need to move the .class files into a separate directory structure and jar them up. I guess we should include support for doing so in the makefiles. I'll get this included in the next SDK distribution. The various run scripts for all the samples just reference the bindings directory so they would have to be modified as well to use the jar file instead of the class files.

     

     

    In the mean time, I'll see if I can whip up a script to help you out. Are you running on Windows or Unix?

     

     

    -Joe
  • Thanks for the info. I am running on a Windows XP. I am currently setting this to run in my Eclipse IDE and using JBoss as the web server. I kinda of figured that I would need to put the generated class files in its own iControl.jar file. I was looking for a nice and easy solution.
  • Posted By keithmot on 2/10/2006 8:27 AM

    Thanks for the info. I am running on a Windows XP. I am currently setting this to run in my Eclipse IDE and using JBoss as the web server. I kinda of figured that I would need to put the generated class files in its own iControl.jar file. I was looking for a nice and easy solution.

    Here's a make.bat file you can replace with the one in your sdk\samples\soap\java\apache\axis directory. It will create a iControl.jar file in a newly created lib directory. You might need to run a "make clean" first. Also, the samples have not been updated to use the new jar file.

    @Echo Off
    SetLocal
    Set TOPDIR=..\..\..\..\..
    Set SUBDIRS=LocalLB Management Networking System
    call setenv.bat
    Set BINDINGS_DIR=.\bindings
    Set CLASS_DIR=.\class
    Set LIB_DIR=.\Lib
    Set WSDL2JAVA=%JAVAHOME%\bin\java -classpath %JAVA_CLASSPATH% org.apache.axis.wsdl.WSDL2Java
    Set WSDL2JAVA_FLAGS= -o %BINDINGS_DIR%
    If "%1"=="clean" Goto Clean
    :checkdirs
    If Not Exist %BINDINGS_DIR%\iControl Goto bindings
    If Not Exist %LIB_DIR%\iControl.jar Goto buildlib
    Goto samples
    :bindings
    Echo Generating java stub files...
    If Not Exist %BINDINGS_DIR%\NUL mkdir %BINDINGS_DIR%
    For %%s in ( %TOPDIR%\wsdl\*.wsdl ) do echo Compiling %%s...& %WSDL2JAVA% %WSDL2JAVA_FLAGS% %%s
    If Not Exist %LIB_DIR%\iControl.jar goto buildlib
    Goto samples
    :buildlib
    If Not Exist %LIB_DIR%\NUL mkdir %LIB_DIR%
    If Not Exist %CLASS_DIR%\NUL mkdir %CLASS_DIR%
    Echo Compiling iControl binding files...
    for %%s in ( %BINDINGS_DIR%\iControl\*.java ) do echo %%s & javac -classpath %BINDINGS_DIR% -d %CLASS_DIR% %%s
    for %%s in ( %BINDINGS_DIR%\iControl\holders\*.java ) do echo %%s & javac -classpath %BINDINGS_DIR% -d %CLASS_DIR% %%s
    Echo Creating iControl.jar...
    cd %CLASS_DIR%
    jar cvf ..\lib\iControl.jar iControl
    Cd ..
    Goto samples
    :samples
    Echo Building Sample Applications...
    For %%d in (%SUBDIRS%) do cd %%d& call make.bat& cd ..
    Goto End
    :clean
    If Exist %BINDINGS_DIR%\NUL rmdir /s /q %BINDINGS_DIR%
    If Exist %CLASS_DIR%\NUL rmdir /s /q %CLASS_DIR%
    If Exist %LIB_DIR%\NUL rmdir /s /q %LIB_DIR%
    For %%d in (%SUBDIRS%) do cd %%d& call make.bat clean& cd ..
    Goto End
    :end
    EndLocal

    -Joe