how do I extend the java scripting with jar files?
I waant to add some classes and methods to parse CSV files. I downloaded a jar file from http://ostermiller.org/utils/LabeledCSVParser.html
I tried putting the downloaded jar file in the both the ext and lib directories. Interpreted java script cannot find the classes in the jar file. All the documentation I can find says to do it this way. What am I doing wrong? What's the secret?
Thanks
Don
how do I extend the java scripting with jar files?
Excellent! I'll update our documentation to clarify that point.
Thanks,
Todd
It worked!!, import statement the secret.
The import statement was the secret. Thank you very much. I'm just learning java, but getting there. The code that didn't work was from an Ostermiller example. It all works with the import staement. The code is as follows:
import com.Ostermiller.util.*;
LabeledCSVParser lcsvp = new LabeledCSVParser(
new CSVParser(
new StringReader(
"Name,Phone\n" +
"Stewart,212-555-3233\n" +
"Cindy,212-555-8492\n"
)
)
);
how do I extend the java scripting with jar files?
Hi Don,
Could you post the script you're using to access the classes? Remember that you need to import them or give the fully-qualified class name of the classes you're accessing. For example, in this case:
import com.Ostermiller.util.*;
Kind regards,
Todd Wilson