Re: Class loading
Alexey Zinger <inline_four-/[email protected]> Thu, 19 Aug 2010 06:21:15 -0700 (PDT)
| Newsgroups | gmane.comp.java.beanshell.devel |
|---|---|
| Message-ID | <[email protected]> |
--===============0214487529990230894== Content-Type: multipart/alternative; boundary="0-1304295092-1282224075=:37421" --0-1304295092-1282224075=:37421 Content-Type: text/plain; charset=us-ascii If I'm not mistaken, BeanShell simply pre-imports certain packages (java.lang.*, java.util.*, java.io.*?). Alexey http://azinger.blogspot.com http://bsheet.sourceforge.net http://wcollage.sourceforge.net ________________________________ From: "[email protected]" <[email protected]> To: beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org Sent: Thu, August 19, 2010 12:35:56 AM Subject: [Beanshell-dev] Class loading Hei, Interpreter i = newInterpreter(); i.eval("String s = new String(\"Hello World!\");"); In the above Java statement i wish to know how the beanshell invokes the class "String" without its package being specified. How does it associates the namespace. I have a small requirement like this, to dynamically invoke simple Java statements and invoke Java classes dynamically. I have a small interpreter developed for this. As the requirement is urgent, although i had read few sources of beanshell i would like to get the answer from the experienced than by finding all my myself. Thanks V --0-1304295092-1282224075=:37421 Content-Type: text/html; charset=us-ascii <html><head><style type="text/css"><!-- DIV {margin:0px;} --></style></head><body><div style="font-family:times new roman,new york,times,serif;font-size:12pt">If I'm not mistaken, BeanShell simply pre-imports certain packages (java.lang.*, java.util.*, java.io.*?).<br><div> </div>Alexey<br><a rel="nofollow" target="_blank" href="http://azinger.blogspot.com">http://azinger.blogspot.com</a><br><a rel="nofollow" target="_blank" href="http://bsheet.sourceforge.net">http://bsheet.sourceforge.net</a><br><a rel="nofollow" target="_blank" href="http://wcollage.sourceforge.net">http://wcollage.sourceforge.net</a><br><div><br></div><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;"><br><div style="font-family: times new roman,new york,times,serif; font-size: 12pt;" ><font face="Tahoma" size="2"><hr size="1"><b><span style="font-weight: bold;">From:</span></b> "[email protected]" <[email protected]><br><b><span style="font-weight: bold;">To:</span></b> beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org<br><b><span style="font-weight: bold;">Sent:</span></b> Thu, August 19, 2010 12:35:56 AM<br><b><span style="font-weight: bold;">Subject:</span></b> [Beanshell-dev] Class loading<br></font><br> <br><font face="sans-serif" size="2">Hei, </font> <br> <br><font face="Courier New" size="2">Interpreter i = </font><font color="#820040" face="Courier New" size="2"><b>new</b></font><font face="Courier New" size="2"> Interpreter();</font> <br><font face="Courier New" size="2">i.eval(</font><font color="#4200ff" face="Courier New" size="2">"String s = new String(\"Hello World!\");"</font><font face="Courier New" size="2">);</font> <br> <br><font face="sans-serif" size="2">In the above Java statement i wish to know how the beanshell invokes the class "String" without its package being specified. How does it associates the namespace.</font> <br> <br><font face="sans-serif" size="2">I have a small requirement like this, to dynamically invoke simple Java statements and invoke Java classes dynamically. I have a small interpreter developed for this. As the requirement is urgent, although i had read few sources of beanshell i would like to get the answer from the experienced than by finding all my myself.</font> <br> <br><font face="sans-serif" size="2">Thanks</font> <br> <br><font face="sans-serif" size="2">V</font></div></div> </div><br> </body></html> --0-1304295092-1282224075=:37421-- --===============0214487529990230894== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev --===============0214487529990230894== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ Beanshell-developers mailing list Beanshell-developers-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org https://lists.sourceforge.net/lists/listinfo/beanshell-developers --===============0214487529990230894==--