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

Posted on 2007-09-28
Last Modified: 2013-12-27
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: /app/SUNWappserver8/.../Report/Template\ReportTemplate1.xls (No such file or directory)

Is it a real problem in Solaris?

Question by:rospcc
    LVL 23

    Expert Comment

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

    Author Comment

    Can give me some example on how to use the File.separator? Thanks.
    LVL 23

    Accepted Solution

    String path = "/app/SUNWappserver8/..." + File.separator + "Report" +
    File.separator + "ReportTemplate1.xls";

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    JKS to store upstart data 2 51
    scoresSpecial  challenge 13 34
    commonTwo  challenge 63 69
    maven java path setting 5 31
    Every server (virtual or physical) needs a console: and the console can be provided through hardware directly connected, software for remote connections, local connections, through a KVM, etc. This document explains the different types of consol…
    Introduction This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …
    Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
    This tutorial covers a practical example of lazy loading technique and early loading technique in a Singleton Design Pattern.

    729 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    16 Experts available now in Live!

    Get 1:1 Help Now