Link to home
Start Free TrialLog in
Avatar of rospcc
rospcc

asked on

Wrong Parenthesis in path (i.e. /app/SUNWappserver8\Report) can't be recognised in Sun Solaris?

Hi, I have JSP application running on Sun App server in Sun Solaris OS. Just noticed that my application trying to retrieve some reports from 1 path, however the path that defined in my application had 1 wrong parenthesis. i.e. /app/SUNWappserver8/.../Report\ReportTemplate1.xls
I can still get the file when the JSP application is running in Windows XP. However, It gave me problem when it's implemented in Sun Solaris. The error is as follows:
java.io.FileNotFoundException: /app/SUNWappserver8/.../Report/Template\ReportTemplate1.xls (No such file or directory)

Is it a real problem in Solaris?

Avatar of Ajay-Singh
Ajay-Singh

You should be File.separator to make the path platform independent.
Avatar of rospcc

ASKER

Can give me some example on how to use the File.separator? Thanks.
ASKER CERTIFIED SOLUTION
Avatar of Ajay-Singh
Ajay-Singh

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial