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
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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
Stringmax 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?