SitePoint Sponsor

User Tag List

Results 1 to 3 of 3

Thread: Java Question

Hybrid View

  1. #1
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Java Question

    I have built an application to run on a Ubuntu box. It is pulling a config file from the network path. When I try to run it, I get the error: "/home/amn/smb:\\path\to\network\file.xml"

    I am building this in Java, and my path to it is this:
    Code:
     File file = new File("smb:\\\\path\\to\\network\\config\\file.xml");
    Any suggestions?

  2. #2
    SitePoint Wizard
    Join Date
    Apr 2007
    Posts
    1,381
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by boboreo View Post
    I have built an application to run on a Ubuntu box. It is pulling a config file from the network path. When I try to run it, I get the error: "/home/amn/smb:\\path\to\network\file.xml"

    I am building this in Java, and my path to it is this:
    Code:
     File file = new File("smb:\\\\path\\to\\network\\config\\file.xml");
    Any suggestions?
    put the absolute path to smb. Since you're running from your home... it thinks "smb" is in your home directory. It should be something similar to /smb/path/to/network/file.xml. Instead of doing "\\" you can use File.seperator

  3. #3
    SitePoint Zealot
    Join Date
    Jun 2006
    Posts
    170
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    To be honest, I've never used File.separator. Would you be able to provide some guidance for that?


Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •