Java Server Name

When I tried to access the server name through java agent it return me blank name of server.

My code is :-

Session session = getSession();

String u = (String) session.getServerName();

System.out.println("Server Name :- "+ u );

out put :-

Server Name :-

does anybody knows, how to find out server name through java agent ?

Subject: RE: Java Server Name

From the docs:

This property is null if the session is not running on a server.

I.e., doesn’t matter where the database is, it’s where the Java program is running.

Subject: Where is the code running?

Server name will be blank on a local database…