Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-29-2008, 07:03 PM
many's Avatar
Member
 
Join Date: Nov 2008
Posts: 2
Rep Power: 0
many is on a distinguished road
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?
Bookmark Post in Technorati
Reply With Quote
  #2 (permalink)  
Old 11-30-2008, 06:04 AM
Member
 
Join Date: Nov 2008
Posts: 11
Rep Power: 0
jralexander is on a distinguished road
Default
No sure what you mean...are you trying to call to a class that you haven't included in your coding?
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 11-30-2008, 06:56 AM
Member
 
Join Date: Oct 2008
Posts: 34
Rep Power: 0
gnarly hogie is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 11-30-2008, 02:56 PM
CJSLMAN's Avatar
Moderator
 
Join Date: Oct 2008
Location: Mexico
Posts: 1,149
Rep Power: 2
CJSLMAN is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 11-30-2008, 04:24 PM
Member
 
Join Date: Jul 2008
Posts: 68
Rep Power: 0
racerxadam is on a distinguished road
Default
Janino -- an Embedded Java[TM] Compiler
Bookmark Post in Technorati
Reply With Quote
  #6 (permalink)  
Old 12-01-2008, 10:06 PM
many's Avatar
Member
 
Join Date: Nov 2008
Posts: 2
Rep Power: 0
many is on a distinguished road
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 10:11 PM.
Bookmark Post in Technorati
Reply With Quote
Reply

Bookmarks

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Virtual Machine and multicore system haroonob Enterprise JavaBeans 0 10-20-2008 09:31 AM
Too many virtual Machine davantmay Java Applets 1 07-06-2007 10:53 PM
Virtual machine of java. Albert Advanced Java 1 07-05-2007 08:48 PM
Virtual Machine To Pda Heather Advanced Java 2 06-30-2007 03:11 PM
C# Java Virtual Machine 1.0.1 levent Java Announcements 0 05-25-2007 07:47 AM


All times are GMT +2. The time now is 03:05 AM.



VBulletin, Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2009, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org