Referencing other jar files in my Plugin

Hi,

Hi,

I am using corona Enterprise Trail version and i am facing some problems.

 

I have a jar file in which i have a class and  some functions. Now i want to import this package into my plugin and then build the plugin jar and finally use in Lua.

 

Can You please help me with this. As because when i add my jar in plugins libs folder i get an error cannot find the package.

 

PS : I have changed the pre clean tag to just delete corona and JNLua jar files not my jar file from the libs folder.

 

Awaiting for your response.

 

Thanks.

There are some plugin limitations with the Enterprise Trial edition.  You may be hitting this limitation. 

Rob

Hi,

I am actually taking this trial to test this functionality only. I want to develop a plugin which is referencing a jar and then finally i want to add this plugin into a corona project. Please let me also know all technical restriction i have in Trial or final Enterprise Edition. Also if you could remove this restriction for my trial period and give me full access it would be great. 

Thanks.

I got a clarification.  The trial just puts a water mark in place.  Most likely this is happening according to engineering:

The reason this error is happening is because his JAR file did not get included in the build.  He is doing the right thing by adding the JAR file to the “libs” directory, but if you look at the “build.plugin.xml” file, notice that the “-pre-clean” <target> element delete all files in the “libs” directory and then it copies the newest Corona JAR files via the “copy-libs” <macrodef> element.  This file was designed this way to ensure it includes the newest JAR files in case the developer upgrades the Corona Enterprise directory.  He would need to modify this “build.plugin.xml” file to include his JAR file or perhaps change the file to not delete the “libs” directory.  His choice.

Rob

Hi,

As i have already mentioned that i have changed the build.plugin.xml file and there i have changed the -pre-clean tag. But still i am getting the problem. Can you please send me an sample app where my criteria that is plugin calling functions from an external jar is satisfied.

Please let me know if this is possible. Also if i am doing the right way then why i am getting these errors.

Hi,

I have figured out and now i am able to build jar for my plugin.

Now when i add this jar in my project in the libs directory and then try to run the project in corona simulator i get the attached error.

I have added the plugin in the main.lua file as

local l = require(“plugin.library”)

Also i have tried adding plugin in the build.setting but cannot find any solution.

Please help me out. 

You can’t run an enterprise project with custom plugins in the Corona Simulator.

There are some plugin limitations with the Enterprise Trial edition.  You may be hitting this limitation. 

Rob

Hi,

I am actually taking this trial to test this functionality only. I want to develop a plugin which is referencing a jar and then finally i want to add this plugin into a corona project. Please let me also know all technical restriction i have in Trial or final Enterprise Edition. Also if you could remove this restriction for my trial period and give me full access it would be great. 

Thanks.

I got a clarification.  The trial just puts a water mark in place.  Most likely this is happening according to engineering:

The reason this error is happening is because his JAR file did not get included in the build.  He is doing the right thing by adding the JAR file to the “libs” directory, but if you look at the “build.plugin.xml” file, notice that the “-pre-clean” <target> element delete all files in the “libs” directory and then it copies the newest Corona JAR files via the “copy-libs” <macrodef> element.  This file was designed this way to ensure it includes the newest JAR files in case the developer upgrades the Corona Enterprise directory.  He would need to modify this “build.plugin.xml” file to include his JAR file or perhaps change the file to not delete the “libs” directory.  His choice.

Rob

Hi,

As i have already mentioned that i have changed the build.plugin.xml file and there i have changed the -pre-clean tag. But still i am getting the problem. Can you please send me an sample app where my criteria that is plugin calling functions from an external jar is satisfied.

Please let me know if this is possible. Also if i am doing the right way then why i am getting these errors.

Hi,

I have figured out and now i am able to build jar for my plugin.

Now when i add this jar in my project in the libs directory and then try to run the project in corona simulator i get the attached error.

I have added the plugin in the main.lua file as

local l = require(“plugin.library”)

Also i have tried adding plugin in the build.setting but cannot find any solution.

Please help me out. 

You can’t run an enterprise project with custom plugins in the Corona Simulator.