Question

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

Was it helpful?

Solution

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?

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top