Date Posted:
Product: TIBCO Spotfire®
Product: TIBCO Spotfire®
Problem:
How to compile Java code that uses the Spotfire server API (com.spotfire.server.*)
Solution:
When compiling Java code that uses the TIBCO 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 one of the following jar files that come with the TIBCO Spotfire Server installation, located in <TIBCO 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:\tibco\tss\10.1.0\tomcat\webapps\spotfire\WEB-INF\lib" MyCode.java Doc: API Reference - CustomAuthenticator
Doc: API Reference - PostAuthenticationFilter
Doc: API Reference - com.spotfire.server.jaas
Comments
0 comments
Article is closed for comments.