Results 1 to 6 of 6
  1. #1
    many's Avatar
    many is offline Member
    Join Date
    Nov 2008
    Posts
    2
    Rep Power
    0

    Default calling java virtual machine

    how do i recompile a class while running the program. Considering i don't use nothing from that class in my running program...

    please i know how to make a java program, but how do i call the JVM to compile a new class while in a program?

    is it posible?

  2. #2
    jralexander is offline Member
    Join Date
    Nov 2008
    Posts
    11
    Rep Power
    0

    Default

    No sure what you mean...are you trying to call to a class that you haven't included in your coding?

  3. #3
    gnarly hogie is offline Member
    Join Date
    Oct 2008
    Posts
    34
    Rep Power
    0

    Default

    many, if I understand what you are trying to say, then no you cannot do that. You are running a program with instructions from the previous compilation, you need to exit and re-compile to make it work. As for calling the JVM to compile a new class problem, I don't know what you are talking about.

  4. #4
    CJSLMAN's Avatar
    CJSLMAN is offline Moderator
    Join Date
    Oct 2008
    Location
    Mexico
    Posts
    1,159
    Rep Power
    8

    Default hhhmmm...

    Many .... do you mean:

    1. compile another class that has NOTHING to do with current class that is running or ...
    2. compile the same class that is running?


    For case 1), you probably could (never tried it and never heard it being tried)
    For case 2), no you can't.

    Luck,
    CJSL
    Chris S.
    Difficult? This is Mission Impossible, not Mission Difficult. Difficult should be easy.

  5. #5
    racerxadam is offline Member
    Join Date
    Jul 2008
    Posts
    68
    Rep Power
    0

  6. #6
    many's Avatar
    many is offline Member
    Join Date
    Nov 2008
    Posts
    2
    Rep Power
    0

    Default

    look let me tell you what i have learned so far... you can use com.sun.tools.javac.main() to call the JAVA VIRTUAL machine...

    that is right to compile while you are running a program. not the same program or any that are current running but you can build a interpretor like eclipse or netscape. This is generaly use by programers when you want to try short code.... so you don't compile and recompile a project just build a short program witch compiles automaticly with all of the main class and so an put in place by you.... here are some links related to this:

    javaworld.com/javatips/jw-javatip131.html

    i've done the program but it's not operational yet, when i'll make it work i'll give you the entire source code so if you may one day need it you can use it...

    thank anyway's
    Last edited by many; 12-01-2008 at 11:11 PM.

Similar Threads

  1. Virtual Machine and multicore system
    By haroonob in forum Enterprise JavaBeans (EJB)
    Replies: 0
    Last Post: 10-20-2008, 10:31 AM
  2. Too many virtual Machine
    By davantmay in forum Java Applets
    Replies: 1
    Last Post: 07-06-2007, 11:53 PM
  3. Virtual machine of java.
    By Albert in forum Advanced Java
    Replies: 1
    Last Post: 07-05-2007, 09:48 PM
  4. Virtual Machine To Pda
    By Heather in forum Advanced Java
    Replies: 2
    Last Post: 06-30-2007, 04:11 PM
  5. C# Java Virtual Machine 1.0.1
    By levent in forum Java Software
    Replies: 0
    Last Post: 05-25-2007, 08:47 AM

Posting Permissions

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