I am using Java and when I try to write an array into a CSV file, I encountered the following error:
The parser has encountered more than "64,000" entity expansions
I searched and found that I need to use entityExpansionLimit to solve this by typing in java command line: -DentityExpansionLimit=100000
But being new to Java and these kind of things, I don't understand where am I suppose to type that command. I tried typing that in command prompt but nothing happened
Can someone guide me? Am I supposed to navigate to a specific folder in command prompt?
With the option -D you can pass a system property to the jvm (see here). 
For example if you run you application with
cmd> java -Dfoo=bar MyMainClass
then you can retrieve it in your application using the System#getProperty(String key) like this:
String foo = System.getProperty("foo");
System.out.println(foo); // will print bar
In you case the library that you are using is expecting to find a system property with the name entityExpansionLimit when "entity expansions" has exceeded the value 64,000 but it doesn't find it, i.e System.getProperty("entityExpansionLimit") returns null.
To pass that argument run you application by passing the jvm that system property
cmd> java -DentityExpansionLimit=100000 -cp <your-class-path> YourMainClass
                        If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With