Forum Stats

  • 3,851,409 Users
  • 2,263,973 Discussions
  • 7,904,701 Comments

Discussions

connecting to ifs-server via java

3004
3004 Member Posts: 204,171 Green Ribbon
hi,
I was trying to connect to the ifs-server with a java-programm using the java-api. finally i managed it: i took one of the ifsxyz-scripts an change the xyz-class-file to my class-file. prior to that i first didnt know which of the jar-files to include in my classpath for my client-java-application (then i tried a little bit and found some) and second i always got the error-message:
Exception in thread "main" oracle.ifs.common.IfsException: IFS-20010: Failed to get PropertiesResourceBundler ServerManager
while trying to do a LibraryService.connect(). (same vor IfsDefault instead of ServerManager).
is there any document describing what classes/jar-files to include in the classpath and what other environment-vars to set?
btw: i'm using sun sparc solaris 2.6
bye,
alex

Comments

  • 3004
    3004 Member Posts: 204,171 Green Ribbon
    You need to have the file "oracle/ifs/server/properties/IfsDefault.properties" accessible in your classpath. If you're running from the server where iFS was installed, this directory structure is under $ORACLE_HOME/ifs/settings
  • 3004
    3004 Member Posts: 204,171 Green Ribbon
    Use the ifsenv.sh file for Solaris; use the ifsenv.bat file for NT. (In the $ORACLE_HOME/ifs/bin directory.)
    On Solaris, type: . ifsenv.sh
    On NT (in a command window), type: ifsenv
    This will write many iFS variables to your environment. As a Java developer, one of the most important variables you need is the CLASSPATH. After running the ifsenv script, you can do the following:
    java -classpath $IFS_BASE_CLASSPATH <class>

    Note: we don't provide JDK support -- you have to have java and javac available in your environment.
  • 3004
    3004 Member Posts: 204,171 Green Ribbon
    hi,
    thanks for that informations.
    one more question i have: can i write a java-application, that runs on my NT box while ifs & co. are running on the solaris server? i.e. access the ifs-api over network?
    alex
  • 3004
    3004 Member Posts: 204,171 Green Ribbon
    Yes and no. You can write a "client" application that uses the iFS API, but you must have all the iFS jar files and the Oracle client on the machine where your application will run. iFS 1.0 doesn't support a remoted API.
    null
This discussion has been closed.