I’m working on a plugin wich uses the javax.comm library package. It is used to communicate with an serial com-port on a windows xp system.
When i make a class in eclipse, it is no problem to run it and communicate with my port.
But now i want to make the plugin, i’ve made an extra class wich communicates with the com-port. But it looks like somehow it cannot read the ports.
I use: CommPortIdentifier.getPortIdentifiers() to retrieve a portlist.
in the ‘standalone’ class i get a list of available ports and i can get the names etc. but in the plugin it doesn’t return any ports at all.
I’ve checked the path settings they are correctly set.
but the classpath differs. in the normal programm it is:
c:\Java\workspace\comapp
and in Servoy it is:
servoy_developer.jar
But i’m not sure that has anything to do with it. Does anybody have any experience with this?
javax is named after java extension (many of the javax libs are not default shipped with a Java install) so likly you do not have the lib in servoy, in a plugin you can use an lib see for example the scheduler plugin (sources are in the jar)
I’ve installed the library in the jre/lib directory. And its found by servoy i believe, because it does not give any errors. I believe it just does not read the properties file..
Any ideas? or am i doing it completely wrong?
jre/lib directory will not work, servoy smart clients likly need to be able to load the classes as well.
Checkout the scheduler.jar.jnlp, scheduler.jar and scheduler sub dir in Servoy plugins dir.
OK now i’ve removed the jar, dll and .properties files from the jre and placed them in the servoy/plugin/myplugin directory.
made an .jnlp file wich should make them available. but now i get errors.. it seems that the library does not load anymore.. :S
I’m a little confused where to place the needed dll and .properties file. If i place them in the myplugin directory i dont think it reads them.. does it?
hmm.. i think i’ve done everything i should do.. packed the dll in a jar.
made an windows os resource in the jnlp file etc. but still it does not load properly..
i’ve found this url and halfway down (Q: How can I use Web Start and Comm API together?) somebody else tried the same and did not succeed.. maybe it is not possible at all?
Allright, i’ve come a little further..
When using the developer it never works.. what ever i do.
But when starting the client, it does run!! I’m not sure what’s happening now.. but i’ve got something going now. Is there anybody who can explain this?