
Jim Randell
Members-
Posts
12 -
Joined
-
Last visited
Profile Information
-
Gender
Male
Contact Methods
-
Website URL
http://jim@jimrandell.com
Jim Randell's Achievements
-
Thank you John, I was afraid this might be the answer, but, the answer it is, so I am grateful. Very Best, -Me
- 5 replies
-
- jar
- scriptmaster
-
(and 2 more)
Tagged with:
-
Thank you again John, It seems your suggested approach is exactly what takes place when you run the Load All Jars script found in the ScriptMaster file. (which is what I assumed, and why I did not test it myself) However, never to take things at face value, I implemented the procedure in my own file. I wrote a script using the following calls: SMLoadJar loading my jar (turns out I only need one: mysql-connector-java-5.1.30-bin.jar) SMGetLoadedJars confirming my jars are loaded RegisterGroovy initializing my function for use After this, the new function is available as an external function and, as I said, the jar is loaded. But no joy. So I quit FM, place the jars in the java extensions folder, then start FM again. BAM! works perfectly. I then tested this thoroughly and am back to this: Despite the fact that the jar is loaded and the function is registered, the function wont work unless the jar is located where java expects to find it, in the default path (or - I'm assuming, I haven't tried yet) a path named in the java path file. I have now discovered that I need not even use SMLoadJar, as long as the jar is in the path where java expects to find it, the function works in the ScriptMaster file, and, when Registered, any file, even the data viewer. Since this works for you, my problem could be attributed to my environment. Can you tell me the name of a class you use (a class not included in the standard SM jars)? so I can write a little groovy script using that class, and then test if loading that jar works for me, as it does for you. (if you want to be a real hero, you can try using the jar and class I am using. The jar is attached, just call "import groovy.sql.Sql". The function I use is 'rows') Of course, any additional suggestions you may have are most gratefully welcome, -Jim mysql-connector-java-5.1.30-bin.jar.zip
- 5 replies
-
- jar
- scriptmaster
-
(and 2 more)
Tagged with:
-
Thank you John for taking the time to help. I had assumed that the calls you suggested, were already happening within the ScriptMaster File when I did the following... going on that assumption, I had planed to write those calls into my Open Script. but we all know what happens when I assume, so I am going to test those calls a little later tonight. I will let you know (I'm sure your on the edge of your seat and cant wait to hear ) thanks, -Jim
- 5 replies
-
- jar
- scriptmaster
-
(and 2 more)
Tagged with:
-
(Apologies if this is made clear somewhere else, I can not seem to find an answer here or anywhere) Thank you for looking at this and for any feedback. I am not sure if my issue is a bug or a feature... I have just created my first plugin. It requires 2 jar files which are not included with SM. It seems the function will not work unless I have the 2 jar files in a directory where java expects to find jar files (by default, or some other location which has been added to the path file). This is not an issue on my development machine, but my intention is to make this portable. So the question at hand is this: Does ScriptMaster, and/or plugins generated with SMA, completely handle the loading of jars? or do I need to have the jars located in a folder where java expects to find them? I have: Added the jars to SM using the 'add' button on the Jar Libraries layout, in the ScriptMaster File Associated the jars to the script via the checkboxes in the 'Jars' tab of the Edit Script Layout Verified the Jars are loaded using SMGetLoadedJars Successfully tested the function with the 'Run Script' Button on the Edit Script Layout Registered the Function (and set it to register on startup) Successfully tested the function in the FM solution I intend to use it with Everything works until I remove the jars from /Library/Java/Extensions (on osx). Then, after restarting FM, my function returns an error indicating it can not find the class it needs (which is to say, it cant find the jar). I have tested this thoroughly. Is this the way it is supposed to work? Please let me know if I can provide more info to help troubleshoot this. My sincerest thanks to anyone who can point me in the right direction, -Jim java version "1.6.0_65" Java SE Runtime Environment (build 1.6.0_65-b14-462-11M4609) Java HotSpot 64-Bit Server VM (build 20.65-b04-462, mixed mode)
- 5 replies
-
- jar
- scriptmaster
-
(and 2 more)
Tagged with:
-
How to load modules from a JAR file
Jim Randell replied to Ibrahim Bittar's topic in ScriptMaster by 360 Works
Hi Ibrahim, I also have very little experience with Java/Groovy. BUT, after a great deal of Googling, trial and error, and patience (did I mention patience?), I was able to create a plugin successfully. In that process, I faced the same issue. Here is what I found: Which classes are contained in the JAR file. A .jar file is an archived and compressed folder, like a zip file. Most utilities which expand .zip files, will expand a .jar file into a folder I tested it on your .jar file, using Archive Utility.app on the mac What parameters they use. Any IDE will do, but for your (and my own) basic needs to drill down into the code of a class, I use a handy, cross platform, open source app called 'Java Decompiler': jd.benow.ca It allows you to explore the root folder of a decompressed jar, in a tree view, select the classes, and see a breakdown of the parameters and code base Caution: the app will drill down a jar file directly, but it has been my experience that it may not see all the classes in a jar. Best to decompress the jar into a folder, then use the app on the folder How to register those classes as modules so I can create a plugin with them. Just use the classes from the jar in your code, just be sure you load the jar. And this is what brings me here today, and brought me to your thread: jar dependencies. (I dont mean to go off topic, but you may face this issue next) Following the documentation as best I can, I can not get ScriptMaster to recognize jar files unless I have them in /Library/Java/Extensions (on osx). I have seen this issue mentioned in this forum while I was hunting down other issues, I hope somewhere in here it is thoroughly explained I will be looking for more info about that issue in this forum, but I might have to post the question myself. (but I will be watching this thread, if anyone wants to respond here.) -
Greetings all, Very glad to have found this topic! I have a variation on this usage, but I have a slight hangup. I have an image database with more then 100,000 images, and I want to find duplicates. My goal was to create a string, unique to each image, but consistant amoung duplicate images. I created and registered a new function I call ImageCODE using your example: "return new sun.misc.BASE64Encoder().encode( fmpro.getContainerStream( fieldName ).getBytes() );" I created a calc field in my image db, where I pass the field name into this function. Based on limited testing, it seems to work only sometimes. Its hard to get a better handle on it then that, because the strings are so long, any methods of comparison run too slow. Before I start chopping it up into smaller samples, I attempted to use Hashcode. I pasted the resulting text from one record into the Hashcode example in the SM file (and clicked "Run Script"). In your SM File, this works as expected, returning a very short string. But it returns "error" when I use the function in a calc field in my table: " hashcode(ImageCODE) ". I also pasted the same string which worked in the SM example, into the calc field ( hashcode("pasted text string") ), but this also returned an error. I have tried many variations (nested, separate fields, stored, unstored, Lets which evaluate, etc) and the function SMlastError returns Null. Any pointers would be greatly appreciated. Thanks, -JR
-
Greetings All, I downloaded 4.0 with great excitement about the ability to create my own plugins. I bought a registration, and properly registered the ScriptMaster Advanced plugin, no prob. I then made my own plugin and installed it. Seems to work fine, before it expires in two hours! After making the plugin, the registration function set to my clipboard by the plugin generation mechanism would not be accepted. the error returned was: "The license key is valid, but the registered to name was entered incorrectly." I went thru the Docs, watched the video (cool, btw), started over with a new plugin (and new registration info), and several other exercises, but can not figure out how this is supposed to work. Help would be greatly appreciated by anyone from 360works, or any user who has gotten this to work. Thanks in advance to whoever helps me solve this. -JR jim@jimrandell.com
-
very interesting, haven't tried this yet, haven't encountered the problem yet, but just reading the thread, it occurs to me that you can write the gtrr script to capture the current window name in a variable, then gtrr in a new window, then, close the window named in the variable (you might also need to capture window size and location)
-
Hello All, Looking for input on strange corruption issue. The scenario: Table A has an un-editable record that displays “?” in each field. This record breaks certain scripts. I assume the record is corrupt. The procedure I followed was: 1 copy file 2 Open copy and delete all records from table A 3 save copy as compacted, delete first copy 4 open original file, go to table A, find all records, omit the corrupt one. 5 export good records (did this twice, once as csv, other as fm file) and verified corrupt record did not export 6 Imported records into compacted copy (which has zero records in it). The corrupt record magically returns after import, whether I use csv or FM file. I have several ideas and variations to try to fix, but first, thought I would run this by you guys, to see if anyone has any suggestions. Thanks for any input, -JR
-
How to go crazy in 5 easy steps! I am having the same issue on win2ksv4. I understand setting the identifier and Passcode in the 'enable client services' dialog box. that is not the issue. after I do a clean install
-
How to go crazy in 5 easy steps! I am having the same issue on win2ksv4. I understand setting the identifier and Passcode in the 'enable client services' dialog box. that is not the issue. after I do a clean install
-
Please help! FM Svr 7, +Advance, on OS X nightmare
Jim Randell replied to Justin D's topic in FileMaker Server 11
How to go crazy in 5 easy steps! I am having the same issue on win2ksv4. I understand setting the identifier and Passcode in the 'enable client services' dialog box. that is not the issue. after I do a clean install