localhost - connection problem



Hi,

I have a problem with java and PostgreSQL. When I type:

connection = DriverManager.getConnection("jdbc:postgresql://"+host+":"+postgresPort+"/thesis", user, password);

as long as the host equals "localhost" everything is ok. But when I type: "laptop" which is the real name of my machine (where in fact PostgreSQL is installed) it throws an SQLException.

I have a line: listen_addresses = '*' in my postgresql.conf file.

If someone could explain me that problem I would be grateful.

Thanks for any help
Pawel
.



Relevant Pages

  • Re: How Can I Improve Linux Speed
    ... > In order to acquire some self education and to experiment with Linux, ... The laptop previously had Windows 2K installed. ... > Fedora Linux O/S is very slow, it is unusable for any application. ... Are you having trouble resolving localhost? ...
    (Fedora)
  • Re: New ASP project Wont recognize my user name and password!
    ... The Microsoft Office Web Components Black Book with .NET ... > the Laptop IP address since localhost returns an error. ... If I use the Administrator user name and password, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: New ASP project Wont recognize my user name and password!
    ... > The Microsoft Office Web Components Black Book with .NET ... >> the Laptop IP address since localhost returns an error. ... If I use the Administrator user name and password, ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: New ASP project Wont recognize my user name and password!
    ... I have a web server, Windows 2000 that I'd rather use as a project location, ... but I don't want my laptop to join the domain and can't seem to get that to ... >> the Laptop IP address since localhost returns an error. ... If I use the Administrator user name and password, ...
    (microsoft.public.dotnet.framework.aspnet)