When compiling Java code that uses the Spotfire Server Java API, it must be linked with classes in the package com.spotfire.server.* that is contained within one of the server jar files (which one depends on the server version).
Details:
When compiling Java code that uses the Spotfire Server Java API, it must be linked with classes in the package com.spotfire.server.* that is contained within one of the server jar files (which exact jar file depends on the version you are using). Example of extensions that need this jar file for compilation include Custom Authentication Filter, Post Authentication Filter and JAAS module.
1. Start by locating the following jar files that come with the Spotfire Server installation, located in <Spotfire Server installation directory>/tomcat/webapps/spotfire/WEB-INF/lib
- For TIBCO Spotfire Server 10.3 and higher, use spotfire-public-java-api.jar
- For TIBCO Spotfire Server 10.2, use public-java-api.jar
- For TIBCO Spotfire Server 10.1 and lower, use server.jar.
2. The jar file from the previous step (in the example below, using server.jar) should now be added to the class path to javac:
javac -classpath ".;/path/to/server.jar;" MyCode.java
Example compile command if the compiler runs on the Spotfire Server itself:
javac -classpath ".;C:\spotfire\spotfireserver\14.0.9\tomcat\webapps\spotfire\WEB-INF\lib" MyCode.java
For examples of some ways this is used to extend Spotfire Server, see "Extending Spotfire Server with Java" in https://community.spotfire.com/articles/spotfire/extending-spotfire or "Spotfire Server API for Custom Authentication" (https://community.spotfire.com/articles/spotfire/tibco-spotfirer-server-api-custom-authentication).
API Reference - Spotfire Server API:
https://docs.tibco.com/pub/sfire_dev/area/doc/api/TIB_sfire_server_Server_API_Reference/index.html
API Reference - CustomAuthenticator:
API Reference - PostAuthenticationFilter:
Comments
0 comments
Article is closed for comments.