Results 1 to 4 of 4
  1. #1
    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0

    Default Would like to call Class method which is alreday loaded into JVM from Another Java

    Hi All,

    We have one application which is designed for Batch Jobs. which are keeps on running. now I would like to call one of the class from another java program and I should get that instance of that class.

    I tried it many way but no useful and more ever i can not get the same instance which is already running.

    How to achieve this type problem ?

    thanks in adavnce

  2. #2
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,446
    Rep Power
    25

    Default Re: Would like to call Class method which is alreday loaded into JVM from Another Jav

    You might be able to connect to a running java program using sockets.
    If you don't understand my response, don't ignore it, ask a question.

  3. #3
    Join Date
    Nov 2013
    Posts
    2
    Rep Power
    0

    Default Re: Would like to call Class method which is alreday loaded into JVM from Another Jav

    Can we do it something like below ?

    Process p = Runtime.getRuntime().exec("javac JobsDaemon.java");

    Because I want call one of the method form JobsDaemon.java file

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    SW Missouri
    Posts
    17,446
    Rep Power
    25

    Default Re: Would like to call Class method which is alreday loaded into JVM from Another Jav

    I don't see how executing the javac compiler program will do what you want. javac will read a java file and create one or more class files.
    If you don't understand my response, don't ignore it, ask a question.

Similar Threads

  1. How can I call a method of this Inner Class?
    By fatabass in forum New To Java
    Replies: 1
    Last Post: 02-05-2012, 01:38 AM
  2. Inner class method call
    By d915172 in forum New To Java
    Replies: 3
    Last Post: 11-11-2010, 09:40 PM
  3. Replies: 2
    Last Post: 05-01-2010, 08:59 AM
  4. How to call a method from another class?
    By jboy in forum New To Java
    Replies: 8
    Last Post: 09-09-2009, 07:29 AM
  5. How to call a class within a method
    By Manfizy in forum New To Java
    Replies: 3
    Last Post: 03-19-2009, 12:34 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •