web stats
Access to Window's Registry - Mirth Community

Go Back   Mirth Community > Mirth Connect > Support

Reply
 
Thread Tools Display Modes
  #1  
Old 09-24-2009, 10:22 AM
rhaslam rhaslam is offline
Mirth Newb
 
Join Date: Aug 2009
Location: Sandy, Utah
Posts: 12
rhaslam is on a distinguished road
Default Access to Window's Registry

Can Mirth access the window's registry without doing some kind of call out to Java?

I'm guessing "No", but I thought I'd ask anyway.
__________________
Reed Haslam
Northrop Grumman Information Services
Health & Human Services
Reply With Quote
  #2  
Old 09-24-2009, 10:39 AM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,218
jacobb is an unknown quantity at this point
Default

Quote:
Originally Posted by rhaslam View Post
Can Mirth access the window's registry without doing some kind of call out to Java?

I'm guessing "No", but I thought I'd ask anyway.
You'd have to do some sort of Java call...but keep in mind you can use Java code anywhere you can use JavaScript in Mirth, so it shouldn't matter whether you are using JavaScript or Java.
__________________
Jacob Brauer
Director, Software Development
NextGen Healthcare

Reply With Quote
  #3  
Old 09-24-2009, 10:44 AM
rhaslam rhaslam is offline
Mirth Newb
 
Join Date: Aug 2009
Location: Sandy, Utah
Posts: 12
rhaslam is on a distinguished road
Default Follow-up - Using Java to access the registry

Thanks for the quick reply.

So if I had a jar file of registry functions written in Java, how could I make use of it from transformer code in a channel?

Where would I put the jar file?

Would I put "imports" in the transformer code?
__________________
Reed Haslam
Northrop Grumman Information Services
Health & Human Services
Reply With Quote
  #4  
Old 09-24-2009, 11:15 AM
jacobb jacobb is offline
Mirth Employee
 
Join Date: Aug 2006
Location: Irvine, CA
Posts: 1,218
jacobb is an unknown quantity at this point
Default

Quote:
Originally Posted by rhaslam View Post
Thanks for the quick reply.

So if I had a jar file of registry functions written in Java, how could I make use of it from transformer code in a channel?

Where would I put the jar file?

Would I put "imports" in the transformer code?
Yup, try searching around the forums a little bit but you can put the jar in the lib/custom directory in Mirth. You can then call your java classes with their class name in the following ways (example for ArrayList):
Code:
var arrayList = new Packages.java.util.ArrayList();

importPackage(Packages.java.util);
var arrayList = new ArrayList();

importClass(Packages.java.util.ArrayList);
var arrayList = new ArrayList();
I didn't test any of those but they should all work.
__________________
Jacob Brauer
Director, Software Development
NextGen Healthcare

Reply With Quote
Reply

Tags
registry, windows

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -8. The time now is 01:22 AM.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2020, vBulletin Solutions, Inc.
Mirth Corporation