Like a previous commenter said, the code below won't compile. java.io.FileReader has
three constructors, none of which take a String[].
What you are asking are very, very basic Java questions. Does the NYSE seriously employ
java coders who don't know the answer to these questions? Try google:
http://www.google.com/search?q=java+writing+text
--- On Mon, 6/7/10, Fnu Mahalakshmi <FMahalakshmi(a)nyx.com> wrote:
> From: Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
> Subject: Re: [rules-users] Error Loading Input Files.
> To: "'rules-users(a)lists.jboss.org'"
<rules-users(a)lists.jboss.org>
> Date: Monday, June 7, 2010, 9:01 AM
> Hi Thomas,
>
> Thanks a lot for the help.
> I am also facing problem in uploading my modified working
> memory back to my output file.
> Once the rules are fired and the data in my working memory
> is modified how do I reupload it to my text file?
> I store all my data in a vector which loads it to the
> working memory.
> Could you point me towards some documentation which
> explains it?
>
> Thanks so much.
> M
>
> -----Original Message-----
> From: rules-users-bounces(a)lists.jboss.org
> [mailto:rules-users-bounces@lists.jboss.org]
> On Behalf Of rules-users-request(a)lists.jboss.org
> Sent: Monday, June 07, 2010 9:53 AM
> To: rules-users(a)lists.jboss.org
> Subject: rules-users Digest, Vol 43, Issue 26
>
> Send rules-users mailing list submissions to
> rules-users(a)lists.jboss.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>
https://lists.jboss.org/mailman/listinfo/rules-users
> or, via email, send a message with subject or body 'help'
> to
> rules-users-request(a)lists.jboss.org
>
> You can reach the person managing the list at
> rules-users-owner(a)lists.jboss.org
>
> When replying, please edit your Subject line so it is more
> specific
> than "Re: Contents of rules-users digest..."
>
>
> Today's Topics:
>
> 1. Re: Error Loading Multiple Input Files
> (Fnu Mahalakshmi)
> 2. Re: Error Loading Multiple Input Files
> (Swindells, Thomas)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 7 Jun 2010 09:41:39 -0400
> From: Fnu Mahalakshmi <FMahalakshmi(a)nyx.com>
> Subject: Re: [rules-users] Error Loading Multiple Input
> Files
> To: "'rules-users(a)lists.jboss.org'"
> <rules-users(a)lists.jboss.org>
> Message-ID:
> <994758E35590274E955FA75763C5AA5002D0107A(a)MTEXMBXP01.ad.NYX.com>
> Content-Type: text/plain; charset="us-ascii"
>
> Hi Greg,
>
> I have my input files inside the src directory of my
> eclipse project.
>
> I am passing the files as follows:
> private static final String DATA_INPUT_FILE = new String
> []{ "Input1.txt", "Input2.txt"};
>
> private static final String DATA_OUTPUT_FILE =
> "Output.1.txt";
>
> private static final String RULES_FILES = new String []
> {"Rule1.drl", "Rules2.drl"};
>
> public static void main(String[] args) throws Exception {
> BufferedReader input = new BufferedReader(new
> FileReader(DATA_INPUT_FILE));
> Converter c = new
> Converter(DATA_INPUT_FILE); // this reads my input files
> Vector<Object>
> v = new Vector<Object>();
> v =
> c.getFactInput();
> // loads all
> information contained in the input files
>
> new
> RuleRunner().runStatelessRules(RULES_FILES,null,
> v,null);
>
> FileOutputStream output = new
> FileOutputStream(DATA_OUTPUT_FILE);
>
>
> Error Log:
>
> Exception in thread "main" java.io.FileNotFoundException:
> Input1.txt (The system cannot find the file specified)
> at java.io.FileInputStream.open(Native
> Method)
> at
> java.io.FileInputStream.<init>(Unknown Source)
> at
> java.io.FileInputStream.<init>(Unknown Source)
> at
> java.io.FileReader.<init>(Unknown Source)
> at
> com.org.RulesTest.main(RulesTest.java:29)
>
>
> Can you tell me why that happens??
> The file is present.
> Thanks.
> M
> </pre>
>
> <P><hr size=1></P>
> <P><STRONG><font color=green>Please
> consider the environment before printing this
> email.</font></STRONG></P>
> <P><STRONG>Visit our website at <a
href="http://www.nyse.com">http://www.nyse.com</a> <br>
>
> *****************************************************************************
> <br>
> Note: The information contained in this message and
> any attachment to it is privileged, confidential and
> protected from disclosure. If the reader of this
> message is not the intended recipient, or an employee or
> agent responsible for delivering this message to the
> intended recipient, you are hereby notified that any
> dissemination, distribution or copying of this communication
> is strictly prohibited. If you have received this
> communication in error, please notify the sender immediately
> by replying to the message, and please delete it from your
> system. Thank you. NYSE Euronext.
>
> </STRONG></P><pre>
>