Mirth Community

Mirth Community (http://www.mirthcorp.com/community/forums/index.php)
-   Support (http://www.mirthcorp.com/community/forums/forumdisplay.php?f=6)
-   -   How to use OpenCSV in channel? (http://www.mirthcorp.com/community/forums/showthread.php?t=215146)

cram1986 11-24-2015 10:35 AM

How to use OpenCSV in channel?
 
I am new to using Java functions and I am trying to use OpenCSV to read in a CSV file to use as a cross reference file.

I put the OpenCSV.jar file in: C:\Program Files\Mirth Connect\custom-lib

Went into Settings-->Resources and made sure the library was loaded.

I am stuck on how to use the functions within my Javascript step. I can't seem to find any examples of it used in Mirth. Does anyone have any insights?

Thanks!

narupley 11-25-2015 08:14 AM

There are many, many examples here on the forums if you search. There's also an article on our wiki about it.

Basically all you do to access a Java class is use "Packages.[package name].[class name]". For example if you wanted to access FileUtils you would use "Packages.org.apache.commons.io.FileUtils". The "Packages." part is optional to common top-level package domains (com/net/org/java/etc.)

cram1986 11-25-2015 09:30 AM

Thanks Narupley. I did come across that Wiki page, but was having issues getting OpenCSV to work. I will do some more digging.

narupley 11-25-2015 09:42 AM

What "doesn't work"? If you give more information, then people here might be able to help.


All times are GMT -8. The time now is 05:59 AM.

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