title: JSch - Server "home" path is always "/" with FreeSSHd and can't change directory
body: <p>I set-up a server with FreeSSHd and am able to Putty it, including changing directories and listing files. I have some example .txt files and a folder in the home directory. I set the home directory on my server to "C:\SFTP" using FreeSSHd (as opposed to defining a HOME variable with the directory being "$HOME\").</p>
  
  <p>Apparently, when using JSch,</p>
  
  <pre><code>        JSch jsch = new JSch();
          session = jsch.getSession(username,host,port);
  
          jsch.addIdentity(key.getAbsolutePath());
  
          java.util.Properties config = new java.util.Properties();
          config.put("StrictHostKeyChecking", "no");
  
          session.setConfig(config);
          session.setUserInfo(new MyUserInfo());
          session.connect();
  
          channel = session.openChannel("sftp");
          channel.connect();
          channelSftp = (ChannelSftp)channel;
  
          System.out.println("Home: "+channelSftp.getHome());
  </code></pre>
  
  <p>the last line prints just "Home: /". Any attempts (made immediately after above code) to use </p>
  
  <pre><code>channelSftp.cd(WORKINGDIR);
  </code></pre>
  
  <p>results in </p>
  
  <pre><code>2: No such file
  at com.jcraft.jsch.ChannelSftp.throwStatusError(ChannelSftp.java:2833)
  at com.jcraft.jsch.ChannelSftp._stat(ChannelSftp.java:2185)
  at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1295)
  at com.jcraft.jsch.ChannelSftp.get(ChannelSftp.java:1267)
  at test.SFTPTest.main(SFTPTest.java:71)
  </code></pre>
  
  <p>I think if I got to the root of why JSch does not have the correct home path (or any?) this would work. Also, strangely enough I upload and download files no problem using put() and get().</p>
  
  <p>I've heard all kinds of things where people look into the source and find it does strange things in resolving paths and something with a method called "_realPath()" and superfluous leading/trailing "/" but I don't even have it telling me the home directory is correct after connecting.</p>
  
  <p>Any ideas?</p>