Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: how get list of all dll files that load now on the process ?

  1. #1
    Member
    Join Date
    Sep 2019
    Posts
    39
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default how get list of all dll files that load now on the process ?

    for the process i write this code, and its work (exe):
    //return String of all process
          public static String showProcess() throws Exception {
      	    String line = null, xprocess = null;
      	    Runtime runtime = Runtime.getRuntime();
      	    Process cmd = runtime.exec("tasklist.exe");
      	    BufferedReader in = new BufferedReader(new InputStreamReader(cmd.getInputStream()));
      	    while ((line = in.readLine()) != null) {
      	    	if(line.contains("exe")) {
      	    		xprocess += line.substring(0, line.lastIndexOf(".")) + "\n";
      	    	}
      	    }   
      	    in.close();
      	    return xprocess;
          }

    but now i want all dll that load , how do i do it in java ?
    i search on internet, but nothing... just how to try load dll in myself with System.loadLibrary("mydll");

  2. #2
    Super Moderator Norm's Avatar
    Join Date
    May 2010
    Location
    Eastern Florida
    Posts
    25,139
    Thanks
    65
    Thanked 2,720 Times in 2,670 Posts

    Default Re: how get list of all dll files that load now on the process ?

    That sounds like a question about what the OS is doing, not really a part of java.
    If you don't understand my answer, don't ignore it, ask a question.

Similar Threads

  1. How to load specific .midi (music) files from the cache?
    By Unseen in forum What's Wrong With My Code?
    Replies: 3
    Last Post: April 9th, 2012, 04:42 PM
  2. to get name of all files from a particular directory to a list..
    By Himali in forum File I/O & Other I/O Streams
    Replies: 5
    Last Post: April 7th, 2012, 06:08 AM
  3. Getting a list of files at URL
    By aussiemcgr in forum File I/O & Other I/O Streams
    Replies: 5
    Last Post: January 12th, 2012, 01:40 PM
  4. Replies: 1
    Last Post: March 22nd, 2011, 06:59 PM
  5. Getting List of Files Within Jar
    By aussiemcgr in forum Java Theory & Questions
    Replies: 1
    Last Post: October 13th, 2010, 09:38 AM