I have the following object which I want to replace with a bean:
file = new File( filePath + fileName.substring(fileName.lastIndexOf("\\")+1)) ;
I tried:
<bean id="fileone" class="java.io.File">
<constructor-arg type="String" value="filePath + fileName.substring( fileName.lastIndexOf("\\")+1)"/>
</bean>
With the eventual goal of having this line of code:
file=fileone
However I get error:
java.io.FileNotFoundException: filePath + fileName.substring(fileName.lastIndexOf("\")+1)
What is the reason for this error? In what way do I modify the bean?