<?xml version="1.0" encoding="UTF-8"?>
<feed xmlns="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <title>how to use external jar in liferay 7</title>
  <link rel="self" href="https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121501873" />
  <subtitle>how to use external jar in liferay 7</subtitle>
  <id>https://liferay.dev/c/message_boards/find_thread?p_l_id=119785294&amp;threadId=121501873</id>
  <updated>2026-04-04T12:40:50Z</updated>
  <dc:date>2026-04-04T12:40:50Z</dc:date>
  <entry>
    <title>RE: RE: how to use external jar in liferay 7</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121509646" />
    <author>
      <name>Scarletake Bwi</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121509646</id>
    <updated>2022-09-07T08:07:21Z</updated>
    <published>2022-09-07T08:07:20Z</published>
    <summary type="html">&lt;p&gt;hi Olaf&lt;/p&gt;
&lt;p&gt;my jars are not osgi bundles, it's oracle provide for oracle plm &lt;/p&gt;
&lt;p&gt;AgileAPI.jar and pxapi.jar&lt;/p&gt;
&lt;p&gt;for &amp;quot;make them OSGi bundles yourself&amp;quot;, do you mean, modify
  MANIFEST.MF file and put in deploy folder?&lt;/p&gt;
&lt;p&gt;for Try Liferay Workspace's compileInclude directive, i have no idea.&lt;/p&gt;
&lt;p&gt;are there any document for detail operate?&lt;/p&gt;</summary>
    <dc:creator>Scarletake Bwi</dc:creator>
    <dc:date>2022-09-07T08:07:20Z</dc:date>
  </entry>
  <entry>
    <title>RE: how to use external jar in liferay 7</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121509114" />
    <author>
      <name>Olaf Kock</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121509114</id>
    <updated>2022-09-06T15:12:30Z</updated>
    <published>2022-09-06T15:12:28Z</published>
    <summary type="html">&lt;p&gt;Do not put stuff into ROOT/WEB-INF/...&lt;/p&gt;
&lt;p&gt;Rather: Check if your dependencies are OSGi bundles - in that case
  just deploy them to the runtime as well. Otherwise check if you can
  make them OSGi bundles yourself. Last resort: Try Liferay Workspace's
  compileInclude directive&lt;/p&gt;</summary>
    <dc:creator>Olaf Kock</dc:creator>
    <dc:date>2022-09-06T15:12:28Z</dc:date>
  </entry>
  <entry>
    <title>how to use external jar in liferay 7</title>
    <link rel="alternate" href="https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121501872" />
    <author>
      <name>Scarletake Bwi</name>
    </author>
    <id>https://liferay.dev/c/message_boards/find_message?p_l_id=119785294&amp;messageId=121501872</id>
    <updated>2022-08-24T07:39:00Z</updated>
    <published>2022-08-24T07:38:59Z</published>
    <summary type="html">&lt;p&gt;hi &lt;/p&gt;
&lt;p&gt;i am useing liferay 7.4. and i try use oracle plm api.&lt;/p&gt;
&lt;p&gt;i had read &lt;a
  href="https://liferay.dev/es/blogs/-/blogs/osgi-module-dependencies"&gt;osgi-module-dependencies&lt;/a&gt;,
  and put my jars in &amp;lt;LIFERAY_HOME&amp;gt;\tomcat-9.0.56\webapps\ROOT\WEB-INF\shielded-container-lib&lt;/p&gt;
&lt;p&gt;but how to use the object in my code? i mean, i have no any
  information for build.gradle&lt;/p&gt;
&lt;p&gt;and i also tried option 4&lt;/p&gt;
&lt;p&gt;i modify my build.gradle&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;dependencies {
	compileOnly group: &amp;quot;com.liferay.portal&amp;quot;, name: &amp;quot;release.portal.api&amp;quot;

	cssBuilder group: &amp;quot;com.liferay&amp;quot;, name: &amp;quot;com.liferay.css.builder&amp;quot;, version: &amp;quot;3.0.2&amp;quot;

	runtime group: 'com.oracle', name: 'agileApi', version: '9.6.3.8'
	runtime group: 'com.oracle', name: 'pxapi', version: '9.6.3.8'
}&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;and my bnd.bnd&lt;/p&gt;
&lt;pre&gt;
&lt;code class="language-java"&gt;Bundle-Name: VWT-XX
Bundle-SymbolicName: com.vwt
Bundle-Version: 1.0.0
Export-Package: com.vwt.constants
Bundle-ClassPath:\
  .,\
  libs/AgileAPI.jar,\
  libs/pxapi.jar
  
-includeresource:\
  libs/AgileAPI.jar=agileApi-[0-9]*.jar,\
  libs/pxapi.jar=pxapi-[0-9]*.jar&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;i put my folder &amp;quot;libs&amp;quot; under resource or first layer, both
  not work.&lt;/p&gt;
&lt;p&gt;
  &lt;img alt="" height="205"
    src="/documents/d/guest/image-7-2-png?imagePreview=1" width="179" /&gt;
  &lt;br /&gt; can anyone help, thank in advance.&lt;/p&gt;</summary>
    <dc:creator>Scarletake Bwi</dc:creator>
    <dc:date>2022-08-24T07:38:59Z</dc:date>
  </entry>
</feed>
