質問

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