Johnny Lim
Johnny Lim

Reputation: 5843

How does Java determine 'file.encoding' system property?

I thought Java determines 'file.encoding' system property by system locale.

But in my system while system locale is 'ko_kr.UTF-8', 'file.encoding' is 'ANSI_X3.4-1968'.

How does Java determine 'file.encoding' system property?

Upvotes: 10

Views: 2387

Answers (1)

sreemanth pulagam
sreemanth pulagam

Reputation: 953

Native code populating properties from the below link(for solaris,Linux operating system )

Below native method loading system properties.

private static native Properties initProperties(Properties props);

Below link is the native code link for loading properties( after line number 187)

Source for setting java properties

Upvotes: 1

Related Questions