Install
Learn to install Tealium for Java.
Requirements
- Tealium Customer Data Hub account
- Java IDE such as Eclipse or NetBeans
- Java JDK 7+
Install
Install Tealium for Java with Maven or manually.
Maven
To install the Tealium library for Java with Maven, make the following changes to your pom.xml
file:
-
Add the repository:
<repository> <id>maven-tealium</id> <url>https://maven.tealiumiq.com/java/releases/</url> </repository>
-
Add the dependency:
<groupId>com.tealium</groupId> <artifactId>java</artifactId> <version>1.4.0</version>
Manual
To install the Tealium library for Java manually:
-
Clone the Tealium for Java code from GitHub. Cloning the library, rather than downloading, makes it easier to update to future releases.
-
Import all of the Java files from the
src/main/java/com/tealium/
directory. -
Add the following import statement in your code:
import com.tealium.*
Initialize
To initialize the Tealium
instance with the Builder()
method, add the following code to your main
or util
class and ensure that it initializes before any calls to it are made:
Tealium tealium = new Tealium.Builder("ACCOUNT", "PROFILE")
.setEnvironment("ENVIRONMENT")
.setDatasource("DATASOURCE")
.build();
This page was last updated: July 9, 2024