Jump to content
Excelsior Forums
Sign in to follow this  
ian_a_brown

Need an alternative to JETVMPROP for -dll flag

Recommended Posts

Hi

I'm trying to put together a JET app that supports plugins - for the purposes of this message, I will call it myApp.

The plugins will be Java components, JETted to make .dlls - referred to here as plugin[1,2,3...].dll.

To make this work, I need to run myApp with something like:

[tt]

> set JETVMPROP=-dll:*:plugin1.dll -dll:*:plugin2.dll ...

> myApp

[/tt]

This works when constructed by hand, but it is not very extensible as nothing knows what plugin .dlls are present - and where they are - until myApp is running.

What I would really like is for myApp to be able to discover its plugins, and then (somehow) inform the JET runtime where they are so that I can avoid the whole [tt]JETVMPROP=-dll:[/tt] thing.

Either that, or for some other form of JETVMPROP setting that means that I don't need to individually name the .dlls

Can anyone offer any suggestions?

The only one I can think of is to split myApp into two .exes - one that finds the .dlls and builds the JETVMPROP setting, and the next that runs the app. I guess that this would work, but it is messy and would mean some unpleasant duplication of code.

Many thanks

Ian

Share this post


Link to post
Share on other sites

Hi,

If the number of the potential plug-ins is restricted by some number (for example, 20), you may reserve names plugin1.dll - plugin20.dll for those plug-ins and construct JETVMPROP -dll:*:plugin1.dll ... -dll:plugin20.dll beforehand. Absence of some dlls listed won't create any problems.

Share this post


Link to post
Share on other sites

Thanks. Hadn't thought of that route.

Actually, I don't anticipate having control of what the plugin .dll names are (or where they are), so in real life I would expect what I would need to have would be (eg)

[tt]set JETVMPROP=-dll:*:uiCore\ui.dll -dll:*:dataModel\model.dll ...[/tt]

My fault for having worded my original question the way I did, but perhaps imposing a naming scheme on the DLLs is worth me thinking about...

Many thanks, mavr. Here's hoping that something comes up that is more flexible on the .dll naming front.

Can anyone tell me when the -dll: part of the JETVMPROP setting is processed? Would it be possible for me to set/alter it once myApp has started in a way that JET would use?

Share this post


Link to post
Share on other sites
Can anyone tell me when the -dll: part of the JETVMPROP setting is processed? Would it be possible for me to set/alter it once myApp has started in a way that JET would use?

It is processed only once, during application startup, so it is impossible to change it in run-time.

Here's hoping that something comes up that is more flexible on the .dll naming front.

You're right in that the support for the plugins mechanism could be better. I hope next release would address the problem. Probably, we can add the option plugins_directory to point to the directory where all dlls found in run-time are treated as plugins and are added to the -dll option automatically.

Share this post


Link to post
Share on other sites
Sign in to follow this  

×