Java - entityExpansionLimit. Where can i install this?

I am using Java, and when I try to write an array to a CSV file, I find the following error:

The parser has detected over 64,000 entity extensions

I searched and found that I need to use entityExpansionLimit to solve this problem by typing java at the command prompt: -DentityExpansionLimit=100000

But, being a Java newbie and things like that, I don’t understand where I think I’m typing this command. I tried to enter it on the command line, but nothing happened.

Can anyone guide me? Should I go to a specific folder on the command line?

+6
source share
1 answer

With the -D option, you can pass the system property to jvm (see here ).

For example, if you run the application using

 cmd> java -Dfoo=bar MyMainClass 

then you can get it in your application using System # getProperty (String key) as follows:

 String foo = System.getProperty("foo"); System.out.println(foo); // will print bar 

In this case, the library you are using expects to find a system property called entityExpansionLimit when the "entity extensions" have exceeded 64,000, but it does not find it, i.e. System.getProperty("entityExpansionLimit") returns null .

To pass this argument, run the application by passing jvm that the system property

 cmd> java -DentityExpansionLimit=100000 -cp <your-class-path> YourMainClass 
+4
source

Source: https://habr.com/ru/post/955787/


All Articles