Simple question about JAVA path

Advertisement
October 11

Hi. I have a simple question , but I spent several hours trying to find an answer.
How do I know the location of the java executable which is used by Concurrent Manager.
I already know that running which java under application user will not give me the correct answer

Advertisement

Replay

Maybe you can try like this:
     public String getPath(){
          Class cls=getClass();
          String className=cls.getName();
          String packageName=cls.getPackage().getName();
          System.out.println(className);
          System.out.println(packageName);
          String newClassName=className.replaceAll("\\.", "/");
          String resouceName=newClassName+".class";
          System.out.println(resouceName);
          URL url;
          url=cls.getClassLoader().getResource(resouceName);
          String path="";
          path=url.getFile();
          return path;
     }

View 4 Replies

Tags:

  1. j2ee batch file Pgm
  2. ovi upgrade via terminal
  3. java development tools e.g. JCreator
  4. Primary BT ID
  5. how to make my bt id as a primary bt id
  6. in report manager scroll issues in ssrs
  7. 30LF
  8. I2S6
  9. 8QYE
  10. surfaceqqq
Copyrights 2019 Fcffair BigData Resource, All rights reserved