Difference between revisions of "Using External JARs"

From AgileApps Support Wiki
imported>Aeric
m (Text replace - 'Setup > ' to 'Settings > ')
 
imported>Aeric
 
(7 intermediate revisions by the same user not shown)
Line 5: Line 5:
# Configure the platform
# Configure the platform
## Login as admin
## Login as admin
## '''Settings > Service Provider Settings > Service Configuration'''
## From the {{Service Provider URL}}
## provide the name of the jar in Libraries supported in Java Code text field and Save.
## Go to '''Settings > Service Provider Settings > Service Configuration'''
## Provide the name of the jar in Libraries supported in Java Code text field and Save.
#: ''Learn more: [[Service_Provider_Settings#Develop_Configuration]]
#: ''Learn more: [[Service_Provider_Settings#Develop_Configuration]]
# Restart tomcat.
# Restart tomcat.


To use classes defined in those JARS:
To use classes defined in those JARS:
:* In your Java code (class methods and data policies), import the classes contained in the JAR files.<br/>For example:
:* In your Java methods, import the classes contained in the JAR files.<br/>For example:
::<syntaxhighlight lang="java" enclose="div">
::<syntaxhighlight lang="java" enclose="div">
import com.examples.utils.*;
import com.examples.utils.*;
Line 17: Line 18:


{{TIP|Debugging can be done using Eclipse Remote debug}}
{{TIP|Debugging can be done using Eclipse Remote debug}}
<noinclude>
<noinclude>
[[Category:Development]]
[[Category:Development]]
</noinclude>
</noinclude>

Latest revision as of 01:32, 29 June 2013

Service Providers can configure the platform to make additional JAR files available to developers.

To configure additional JARs:

  1. Copy the jar into ../tomcat/lib
  2. Configure the platform
    1. Login as admin
    2. From the Service Provider URL: http://{yourDomain}/networking/Service?t=1&targetpage=ViewPort.jsp
    3. Go to Settings > Service Provider Settings > Service Configuration
    4. Provide the name of the jar in Libraries supported in Java Code text field and Save.
    Learn more: Service_Provider_Settings#Develop_Configuration
  3. Restart tomcat.

To use classes defined in those JARS:

  • In your Java methods, import the classes contained in the JAR files.
    For example:
import com.examples.utils.*;

Thumbsup.gif

Tip: Debugging can be done using Eclipse Remote debug