troubleshooting Question

Is there a way to make the following code work for a Networked System?

Avatar of jvilla1983
jvilla1983 asked on
4 Comments1 Solution197 ViewsLast Modified:

I'm hard at work trying to get this program to work and I'm needing some help getting this peice of code to work over the network based on an IP address.

So instead of the method name with no arguments, it woud have String IP_ADDR..

Any help would be appriciated,
Thanks in advance!

public static String getCPUName() {
    try {
      Process process = Runtime.getRuntime().exec(CPU_NAME_CMD);
      StreamReader reader = new StreamReader(process.getInputStream());
      String result = reader.getResult();
      int p = result.indexOf(REGSTR_TOKEN);
      if (p == -1)
         return null;
      return result.substring(p + REGSTR_TOKEN.length()).trim();
    catch (Exception e) {
      return null;
Join the community to see this answer!
Join our exclusive community to see this answer & millions of others.
Unlock 1 Answer and 4 Comments.
Join the Community
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 1 Answer and 4 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros