The java application with the following segment of code deployed on Tomcat running on Open VMS OS. The first line of code constucts pathname for the file inhous.properties. It blows up because it puts forward slash as shown in the System.out statement (second line of code)
In order to get around with the problem of forward slash I wrote the following code but I have not tested yet.
One other concern is that once the slash is blanked out, it will leave a blank space. Of course code can be written to remove the blank space.
QUESTION: Will the above code work in your opinion? If not, how to get make it work.
This is how this File constructor is meant to work. It takes the parent path (Disk_5:[apache.jakarta.tomcat.conf]), appends the path separator (/ in this case), then the file name. I don't know OpenVMS but apparently the full path is Disk_5:[apache.jakarta.tomcat.conf]inhouse.properties. That means that you shouldn't use this file constructor but just do this:
In fact, this is exactly what you are already doing but without the additional steps.
Thanks for the quick response and more so for suggested answer which eliminates extra lines of code. I tried your suggestion and it works. Java Ranch is the best website in not only resolving problems but also for learning from your suggestions/recomendations and references you provide to appropriate documents and books.