.jar to .modl

How can I turn a .jar file into .modl file in order to add it to Ignition.

I am working with Indigo Eclipse IDE.

It’s not as simple as just renaming a jar file. The jar actually needs to be added to a .modl file along with some other files, such as module.xml. These files tell the Ignition Gateway how to load and run the module. The Ignition SDK has examples of how to build a .modl file. You do need Ant installed on your development machine to be able to create a .modl file. For example, to build the Weather module, you would navigate to WeatherModule/Build within the SDK folder. Then run ant on the command line. A jar gets built first, and then it gets added to the .modl file along with the other required files.

Thank you so much for your help, I’ve followed the Ignition Programmers Guide as described in page 15th:

Start Eclipse and Import Example Projects
Now start eclipse by double-clicking on eclipse.exe. Point it to the folder you made as your
workspace. If it starts with its friendly “intro screen” click on the “Go to the Workbench” button.
You’ll notice that the Project Explorer is empty. Even though you unzipped the example projects into
your workspace folder, Eclipse still wants you to “import” them. Click on File > Import… then choose
“Existing Projects Into Workspace” and click “Next >”. Browse for your workspace directory to fill in
the “root directory” field. All of the example projects should appear. Make sure they’re all selected
and that “Copy projects into workspace” is not selected. Then click “Finish”.
Compile and Deploy
Now all of your projects should be in Eclipse. Each module has a “Build” project. This project
contains the Ant scripts and associated files needed to compile and assemble the java code into an
Ignition module (*.modl) file. Double click on this Ant file to open it in Eclipse’s Ant editor. (If it
opens in a raw XML editor, close that, and then right click on it and choose Open With > Ant Editor).
You’ll see in Eclipse’s Outline view each of the Ant script’s Targets. These are what you’ll use to
compile your module. You can right-click on the “build” target and choose Run As > Ant Build to
build that module file. If you have a Developer Mode Gateway running locally, you can run the "
deploy" target to push your newly built module to your Gateway.

I have a problem when I build the project, I’ve attached two screenshots showing the error message related to the memory size [color=#BF4080]“memoryinitialsize=“128m” memorymaximumsize=“512m” debuglevel=“lines,vars,source””[/color]I get when I try to deploy the ComponentExample on Eclipse with ant. I want to create both the .jar file and the .modl but as you can see I have a problem when I debug the build.xml file with ant in Indigo Eclipse.

Can you copy and paste the actual text of the error? I can’t see the full error in your screenshots.

Thnak you i put it

Try running Ant outside of Eclipse. You should be able to run Ant within a command shell. Sometimes Eclipse and Ant don’t play well together, and it may be easier to just use them separately.

Hello
I need to put some proppities to a costumer module but i have a lot of problem becouse i haven´t got any documentation only i have a javadoc.
I want to put a propperty CT_DATA to my component but it deployed well but it don´t show in designer when i´m going to look for this propperty.
Example:
addBoundProp(“iconName”, “Icon Name”, “The name of the icon that represents the current OSM Map.”,CAT_DATA, PREFERRED_MASK | BOUND_MASK);

or

addProp("animationRate", "Animation Rate", "The time between frames of animation, if it is turned on.",
			CAT_BEHAVIOR);

I know the difference Cat_XXX but i don´t know the fields PREFERRED_MASK | BOUND_MAS and how i make up a own propperties with the component and the relationship proppertie-component.

This is covered in the module SDK guide around page 69.

You should read about how Java Beans work.

You need to add a getter/setter pair on your component with a name that matches the entry in the bean info class.

For example, if you wanted to add an integer property called “Foo” you’d add these methods to your actual component:

public int getFoo() { return foo; } public void setFoo(int foo { this.foo = foo; }

and this entry into your bean info:

addProp("foo", "Foo", "This is a silly property", CAT_WHATEVER, PREFERRED_MASK);

The mask flags simply affect whether or not the property is expected to throw property change events and how they show up in the property editor (preferred, standard, expert, hidden, etc)

This is all covered in the module SDK guide, please read that.