Re: what is canonical path?

From: Ben Wan (bwan0425_at_rogers.com)
Date: 10/06/03


Date: Mon, 06 Oct 2003 06:06:06 GMT

oh.. i use Win2k with 1.4.1 at home and at school I use win xp with java 1.4.1, so you think is only the platform's problem? well, I
guess that's life for me... :-(

"Phil..." <rynes@ieee.org> ¦b¶l¥ó news:PZ6gb.503892$Oz4.357379@rwcrnsc54 ¤¤¼¶¼g...
> On my machine it works like John says it should.
> I have WIN XP Pro and java 1.4.2
> What do you have for OS and Java?
>
> "Ben Wan" <bwan0425@rogers.com> wrote in message
> news:6A6gb.36143$ko%.32339@news04.bloor.is.net.cable.rogers.com...
> > "John Kordyback" wrote:
> > > getAbsolutePath returns the complete path to the file starting at the
> > > filesystem root.
> >
> > if it returns a complete path then how come the following doesn't return
> the "absolute path"?
> > File f = new File(".");
> > f.getAbsolutePath(); // return "." and not "c:\folder\folder" ?
> > Thx.. ^_^
> >
> > > getCanonicalPath returns the full path without aliases, shortcuts,
> > > shadows or symbolic links. getCanonicalPath resolves those aliases to
> > > their actual directories.
> > >
> > > getCanonicalPath throws an IOExceptions when the full path is not
> > > available (e.g. the disk in drive A is not ready or the user does not
> > > have access to the directory). It helps you catch errors before you
> > > write into the stream.
> > >
> > > /qb
> > >
> > >
> > > Ben Wan wrote:
> > > > Can anyone please tell me what is canonical path? and why does it need
> to throws IOexception?
> > > > how come getAbsolutePath() doesn't return "c:\folder\folder" but
> getCanonicalPath() does?
> > > > things I tried using java.io.File
> > > > file.getName(); // return "."
> > > > file.getAbsolutePath(); // return "."
> > > > file.getCanonicalPath(); // return "c:\folder\folder"
> > > >
> > > >
> > > > Thank You Very Much!
> > > >
> > > > Ben
> > > >
> > > >
> > >
> >
> >
>
>



Relevant Pages

  • Re: ~Re: Java XP Pro
    ... > I have had a myriad of Java problems with this new XP PRO. ... >half of the applet runs fine. ... I had severe problems with XP and Sun JVM on our company's secure web ...
    (microsoft.public.windows.inetexplorer.ie6.browser)
  • Re: cant click on some links
    ... highlight one and click the update activeX button. ... If it didn't work you may need to download the latest version of Java. ... >I am using Win XP pro, Norton system works, Pop Up Pro I have given ... When I open TVGuide and try to ...
    (microsoft.public.windowsxp.help_and_support)
  • Java IDE Market Share Survey
    ... world wide were asked which Java IDE they are currently using. ... survey was carried out see Java IDE Market Share Survey at ... QStudio for Java is a sophisticated code quality assessment and coding ... Developers may use the Pro ...
    (comp.lang.java.developer)
  • Java IDE Market Share Survey
    ... world wide were asked which Java IDE they are currently using. ... survey was carried out see Java IDE Market Share Survey at ... QStudio for Java is a sophisticated code quality assessment and coding ... Developers may use the Pro ...
    (comp.lang.java.softwaretools)
  • Exceptions while running Java Applications -- what to do?
    ... When I attempt to run a Java client on Windows XP Pro with Jdk1.5.0_06_b05, ... Note that I have uninstalled Sun Java and re-installed it. ...
    (comp.lang.java.help)