سؤال

Is there an equivalent of C's MAX_PATH constant in Java? Been troving the web for an answer and can't find one. Thanks

هل كانت مفيدة؟

المحلول

No, there's no equivalent (especially for an applet). Unless you want to do JNI, you can't get that information. The only limit you may reach is the String max length limit (which is far beyond what any operating system would allow, anyway).

I assume either an exception would be thrown or the filename (or path) will be truncated. Here's a related question: Does Java IO have a maximum file name length?

مرخصة بموجب: CC-BY-SA مع الإسناد
لا تنتمي إلى StackOverflow
scroll top