How to get PC/Machine Hostname in Mendix?

1
Hi everyone, I’m trying to build an application in Mendix and one of the feature is to show/grab the name of the machine/PC (hostname). Are there any possible ways in Mendix to do that?   Best regards,   Jonathan
asked
2 answers
2

To get the hostname you can create a Java action that returns a string and add this code:

return InetAddress.getLocalHost().getHostName(); 

 

Don't forget to import java.net.InetAddress:

import java.net.InetAddress;

 

answered
0

The Community Commons module in the Marketplace has the GetApplicationURL action that returns the runtime URL of the application. Would that be what you need?

https://marketplace.mendix.com/link/component/170

I hope this helps.

answered