Вопрос

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