How to add the jackrabbit-standalone-2.4.0.jar file to your Java application's class path?

Avatar

Avatar
Boost 5
Level 2
keehwan1
Level 2

Likes

5 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Give Back 3
Applaud 5
Validate 1
Ignite 3
View profile

Avatar
Boost 5
Level 2
keehwan1
Level 2

Likes

5 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Give Back 3
Applaud 5
Validate 1
Ignite 3
View profile
keehwan1
Level 2

15-10-2015

Hello

I am following the  webpages below and there is note like "To use the JCR API, add the jackrabbit-standalone-2.4.0.jar file to your Java application’s class path.You can obtain this JAR file from the Java JCR API web page at http://jackrabbit.apache.org/jcr-api.html." 

http://helpx.adobe.com/experience-manager/using/programmatically-accessing-cq-content-using.html

http://wemcode.wemblog.com/accessrepository

However, I don't understand how to do it.

JAVA_HOME variable in my local comp is "C:\Program Files\Java\jdk1.6.0_26".

Can you please let me how to do it?

 

Thanks in advance.

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Validate 25
Level 4
Sam205505050
Level 4

Likes

26 likes

Total Posts

200 posts

Correct reply

30 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 3
Ignite 1
View profile

Avatar
Validate 25
Level 4
Sam205505050
Level 4

Likes

26 likes

Total Posts

200 posts

Correct reply

30 solutions
Top badges earned
Validate 25
Validate 10
Validate 1
Ignite 3
Ignite 1
View profile
Sam205505050
Level 4

15-10-2015

modify your pom.xml as below - 

 <dependencies>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.compendium</artifactId>
        </dependency>
        <dependency>
            <groupId>org.osgi</groupId>
            <artifactId>org.osgi.core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.felix</groupId>
            <artifactId>org.apache.felix.scr.annotations</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>

        <dependency>
         <groupId>org.apache.felix</groupId>
    
         <artifactId>org.osgi.core</artifactId>
    
         <version>1.4.0</version>
      </dependency>
        
    <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.commons.osgi</artifactId>
        <version>2.2.0</version>
    </dependency>
               
         
           
    <dependency>
    <groupId>org.apache.jackrabbit</groupId>
    <artifactId>jackrabbit-core</artifactId>
    <version>2.4.3</version>
    </dependency>

     <dependency>
    <groupId>org.apache.jackrabbit</groupId>
    <artifactId>jackrabbit-api</artifactId>
    <version>2.4.1</version>
    </dependency>
        
    <dependency>
    <groupId>org.apache.jackrabbit</groupId>
    <artifactId>jackrabbit-jcr-commons</artifactId>
    <version>2.4.3</version>
    </dependency>
    
    <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.jcr.api</artifactId>
        <version>2.0.4</version>
      </dependency>
 
       <dependency>
        <groupId>org.apache.sling</groupId>
        <artifactId>org.apache.sling.api</artifactId>
        <version>2.0.2-incubator</version>
      </dependency>    
          
      <dependency>
         <groupId>javax.jcr</groupId>
         <artifactId>jcr</artifactId>
         <version>2.0</version>
      </dependency>
 
<dependency>
    <groupId>javax.servlet</groupId>
    <artifactId>servlet-api</artifactId>
    <version>2.5</version>
</dependency>

    </dependencies>

    <repositories>
        <repository>
            <id>adobe</id>
            <name>Adobe Public Repository</name>
            <url>http://repo.adobe.com/nexus/content/groups/public/</url>
            <layout>default</layout>
        </repository>
    </repositories>
    <pluginRepositories>
        <pluginRepository>
            <id>adobe</id>
            <name>Adobe Public Repository</name>
            <url>http://repo.adobe.com/nexus/content/groups/public/</url>
            <layout>default</layout>
        </pluginRepository>
    </pluginRepositories> 

and after you can get the session -

private JackrabbitSession session;

this.session = (JackrabbitSession) repository.loginAdministrative(null);

Hope it helps!

Answers (2)

Answers (2)

Avatar

Avatar
Validate 10
Level 4
Var
Level 4

Likes

44 likes

Total Posts

113 posts

Correct reply

5 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile

Avatar
Validate 10
Level 4
Var
Level 4

Likes

44 likes

Total Posts

113 posts

Correct reply

5 solutions
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 25
View profile
Var
Level 4

15-10-2015

Hi,

If you are using eclipse you can configure jar path your projects"Buildpath".

 [img]OSGI.JPG[/img]

Avatar

Avatar
Boost 5
Level 2
keehwan1
Level 2

Likes

5 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Give Back 3
Applaud 5
Validate 1
Ignite 3
View profile

Avatar
Boost 5
Level 2
keehwan1
Level 2

Likes

5 likes

Total Posts

31 posts

Correct reply

0 solutions
Top badges earned
Boost 5
Give Back 3
Applaud 5
Validate 1
Ignite 3
View profile
keehwan1
Level 2

15-10-2015

Thank you for your reply.

Unfortunately, I only use Maven environment with pom.xml to write/build bundle.

Any idea in Maven?

 

Thanks,