Running Dynamic Code - Is it possible?

Hi guys,
I am interested to know whether there is a way I can run dynamic code in my java program. For example, I want to be able to write java code into a JTextArea and then run that code as like an extension of the program.
In other words, if I wrote something simple like "System.out.println("Hi");, it would print the work "Hi" in the console as if it were part of the original program.
Does anyone know if there is a way to do this? Alternatively, is there a way I can call the Javac tool from within a program, thus allowing me to dynamically compile a program.
Thanks guys,
WATTO
[email protected]
http://www.watto.org

I think JSP is a variant of such a frame. You can
execute a code compiling it.JSP is normally compiled into bytecode when it is first loaded by the container.
beanshell and [url http://www-124.ibm.com/developerworks/projects/bsf]BSF are, I think what the poster is after, on this very frequently asked question :)

Similar Messages

  • Intel Galileo board - is it possible to run LabView code

    Hello,
    can anybody tell me, if it is possible to run Labview code on Intel Galileo board (http://www.intel.com/content/www/us/en/do-it-yourself/galileo-maker-quark-board.html) ?
    This board is Arduino "compatible", but runs x86 architecture and Linux. So it is possible tu run LabView Linux runtime on this board (and LabView code)? If answer is yes, can anybody provide howto?
    I'm not interested in LINX (https://www.labviewhacker.com/doku.php?id=libraries:linx:linx) which just access the Arduino board. It is just "comunication API" allowing to access arduino board but not to develop a code arduino can run.
    It would be great if there will be possibility to develop all code in for Arduino board in LabView (even with some limitations).
    Thank you for any answers
    Pepin 

    dkfire wrote:
    Hooovahh: The Intel Galileo board is like the Pi and BeagleBone Black boards.
    They run a "full" Linux. They can run normal compiled linux programs. 
    The Intel board is just a little smaller than the Pi/BBB, with "only" 400Mhz processor, but then it is a x86 processor and not a ARM like the two other boards.
    But I don't think that LabVIEW have any run-time enginen for this board.
    If that is the case then what is wrong with loading up the Linux Run-Time for x86 processors that NI has?  I have no idea what the process would be to bring over the installer or executable but if what you are saying is true then it seems more likely that it could work.
    Unofficial Forum Rules and Guidelines - Hooovahh - LabVIEW Overlord
    If 10 out of 10 experts in any field say something is bad, you should probably take their opinion seriously.

  • Servlet with no dynamic code inside jsp pages

    Hello,
              I saw that a servlet is created even if there is no dynamic code inside jsp pages (scriplets & tags). Is it possible to avoid it on bea side ? (I am using portal 8).
              By the way, do you know if is it possible to define apache in order to avoid to send to bea the jsp which have no dynamic code inside ?
              thank you !

    JSP's always generate a servlet on all web containers. Apache/Tomcat is no
              different. If you have static content, make it an HTML page.
              Bill
              "hournon jc" <[email protected]> wrote in message
              news:22255787.1103297053148.JavaMail.root@jserv5...
              > Hello,
              >
              > I saw that a servlet is created even if there is no dynamic code inside
              jsp pages (scriplets & tags). Is it possible to avoid it on bea side ? (I am
              using portal 8).
              >
              > By the way, do you know if is it possible to define apache in order to
              avoid to send to bea the jsp which have no dynamic code inside ?
              >
              > thank you !
              

  • 'Unallowed tags or dynamic code' error on a page without these...

    Hi,
    I've been using InContext Editing for a few sites now and my clients have been very happy with it, but I have a new site that's having problems on just one page.
    http://www.windhampilates.com/index.php
    I've enabled ICE on the text areas below the main photo and nav bar, as I have on other pages. There are a few scripts running on this page, but the only difference on this page from the rest of the site is the rotating image at the top of the page.
    Ironically, I've used this same script on previous sites where I've used ICE and they've worked without any problems. Am I missing something?
    Really and truly appreciate  your help!
    - MaryAnn

    I can login, and try to edit, but the system won't save my changes and gives me the 'unallowed tags or dynamic code' error as the reason why it can't save the changes.
    I tried removing the jquery in the header, but that didn't seem to work:
    http://www.windhampilates.com/index-testjqueryerror.php
    I still can't get the edits to save and it's still giving me the same message.
    The only other non-static elements on the page are the newsletter subscription script and the Facebook link, but I have these on other pages and we can edit those pages without issue.
    Any other ideas?
    Thanks for your help!

  • Error running managed code inside DllMain or image initialization

    I have a LabView 7.1 DLL, and am calling it from a Visual C++ application.  I load the DLL dynamically at runtime using LoadLibrary.  When I call the function, I get this:
    <mda:msg xmlns:mda="http://schemas.microsoft.com/CLR/2004/10/mda">
      <!--
           DLL 'C:\Program Files\National Instruments\Shared\LabVIEW
           Run-Time\7.1\DNCompInfo.dll' is attempting managed execution inside OS Loader
           lock. Do not attempt to run managed code inside a DllMain or image
           initialization function since doing so can cause the application to hang.
       -->
      <mda:loaderLockMsg break="true"/>
    </mda:msg>
    in the Visual C++ debug window.
    I have been through the pages on this website about creating LabView DLLs and calling them.  I have also created very small vi's and exported them, but with the same error.  I have uninstalled LabView 7.1, and reinstalled it.
    Any ideas?

    Hi
    What version of C++ are you using?
    If you could you post your small VI and associated code I will have a look at it and see if I can get it running with out any errors.
    You said you have looked at some help material on the website. Have you tried any of the example pieces of code?
    Here is a link for one.
    Calling a LabVIEW DLL in Visual C++ that Passes Array Handles by Reference
    http://sine.ni.com/apps/we/niepd_web_display.display_epd4?p_guid=D67C2540A4CE3182E034080020E74861&p_...
    See if you can run this with out any errors if you still get the same error with this please let me know
    Regards
    Tim
    AE NI UK and Ireland

  • Run PLSQL code by click on button usin javascript

    Hi
    I want to run plsql code
    on click button using javascript
    javascript is ok but code of plsql is not run
    suggest me
    APEX 4.2.1
    Oracle !!XE
    Windows Server
    Firefox 17.0.1
    Theme Cloudy
    thanks in advance
    bUTTON CODE IN PLSQL CODE AND SEND_RMNDE IS PROCEDURE
    '<button type="button" name="button1" onclick="send_rmndr('
    ||NO_DUES_MASTER.CERT_ID
    ||');" value ='
    ||NO_DUES_MASTER.CERT_ID
    ||'> '
    ||'Remind'
    ||'</button>'
    JAVASCRIPT
    <script type="text/javascript">
    function send_rmndr(pThis)
    var params='x= '+pThis;
    var get=new htmldb_Get(null,null,null,&APP_PAGE_ID.,null,'send_reminder',params);
    gReturn = get.get();
    //alert(gReturn);
    alert ('inside script ' +params);
    //get=null;
    </script>
    Edited by: 969091 on Feb 1, 2013 9:13 PM

    send_reminder needs to be defined as an application process
    Alternatively, you can define a dynamic action and do this more declaratively.
    It's easy to define a DA that fires on click of a button that runs PL/SQL, and you can also define which page items are sent to and received from the plsql via session state.
    Scott
    blog: [url grassroots-oracle.com]grassroots-oracle.com
    twitter: [url twitter.com/swesley_perth]@swesley_perth
    -- please mark any useful posts as helpful or correct, in the end it helps us all

  • Private meetings (dynamic codes) AND no lobby for PSTN callers?

    Hi All,
    Is there any way to have private meetings (therefore with dynamic entry codes) AND have PSTN callers bypass the lobby?
    I understand that the option PSTNCallersByPassLobby does not take effect if you are configured for private meetings?  In our scenario, we want private meetings to avoid potential issues with public meetings/static codes and over-running meetings
    etc., but we often have people joining meetings from a cell phone only and we do not to burden users with a PIN.
    I know we have the option to use public meetings/static codes by default and train users to set a dynamic code if the meeting requires it, but this again relies on user behavior.
    Any way we can have the effect of private meetings/dynamic codes AND PSTN Callers bypassing Lobby by default?
    Cheers

    Samuel,
    If you are talking about generating a separate meeting space for each meeting and having PSTN users bypass the lobby then yes - you can do that.   In outlook I have set my Lync meeting options to do just that - create each Lync meeting in a new
    space so each one is unique and back to back meetings don't let everyone join in to the same meeting.  I also have it set to allow PSTN users to bypass the lobby.  It works fine.
    Craig

  • Create dynamic code on a JSF with ADF Faces

    Hi,
    the next is just sample, nothing to production system, but if I can do the sample I can do something to production system.
    Fine.
    let's suppose that I want to create a html link
    in run-time over a JSF page with ADF Faces component.
    I can do that, I did using javascript and Custom tag,
    but the html link is placed out of the body of the page instead of put it over the place that I put it in development-time
    so, now my question is:
    how I can generate dynamic code using ADF FACES component commandButton or any others.
    any suggestion??
    P.D. if you need more info ask me.

    Hello Jeanne.
    You are right, I used <f:verbatim> element to wrap all my non-JSF elements and it work. :)
    so good so far.
    but, dynamic code mean generate code in this case HTML in run-time.
    That is to say: write code HTML just in time I invoke a page.
    That is posible through Custom Tags.
    You create a Custom Tags this tag generate HTML code after to process any Business Logic. then you put the tag in the page that you want to use it
    someting like this:
    <afh:rowLayout halign="center">
    <afh:cellFormat halign="center">
    <ESE-utilities:populateMenu/>
    </afh:cellFormat>
    </afh:rowLayout>
    the just above bold line is my Custom Tag that generate HTML code
    and not work.
    but, if I replace the tag directly using HTML code in the page, for example:
    <afh:rowLayout halign="center">
    <afh:cellFormat halign="center">
    <f:verbatim>
    prueba
    </f:verbatim>
    </afh:cellFormat>
    </afh:rowLayout>
    it work
    so, now my new question is:
    ¿How can I use a Custom Tagthat generate HTML code, and that code have been written inside of my body page?
    Thanks in advantage for your reply.
    Mauricio

  • How to run dynamic SQL from an ODI procedure step

    I am on ODI 11.1.1.6.4. From within an ODI IKM step I have no problem running a procedure step like the following which calls a pl/sql procedure to get SQL text then later runs that code. Is there anyway to do the same from within an ODI procedure? I've tried a couple of variations and can not seem to get the parsing levels to resolve within a procedure like they resolve from within a KM step.
    <@
    /* Setup Java variables */
    String out_SQL = "";
    try
    java.sql.Connection sourceConnection = odiRef.getJDBCConnection("SRC");
    String sqltxt = "{call set_sql(?)}";
    java.sql.CallableStatement pstmt = sourceConnection.prepareCall(sqltxt);
         try
         pstmt.registerOutParameter( 1, java.sql.Types.VARCHAR);
         pstmt.execute();
    out_SQL = pstmt.getString(1);
         catch(java.sql.SQLException ex)
              errMessage = ex.getMessage();
              errMessage = errMessage.replace("'","");
         finally
              pstmt.close();
    catch(java.lang.Exception e)
         errMessage = e.getMessage();
         errMessage = errMessage.replace("'","");
    @>
    BEGIN
    -- The SQL that I want to run
    <@
    out.println(out_SQL);
    @>
    -- Error handling
    <@ if ( out_SQL.length() ==0 ) { @>
         raise_application_error(-20101, '<@=errMessage@>');
    <@ } else { @>
         dbms_output.put_line('Successful.');
    <@ } @>     
    END;
    ------

    Please understand that I know that I can do this all within PL/SQL -- I am explicitly doing it the way I have outlined because I want to better understand the parsing levels/behavior within ODI procedures and I want to understand why KMs steps behave differently.
    Another observation -- putting this all within a pl/sql block prevents ODI from properly capturing insert/update/delete row counts like it would if it were running a SQL statement.
    So the question remains -- is there a way to run a dynamic SQL statement in an ODI procedure where the SQL statement is generated from within an Oracle procedure call and then run as SQL within an ODI procedure step? Best would be if there is an example of how this can be done.

  • NXP JCOP 31V2.2 36K running C code?

    Topic says the most.. Is it possible to run C code on the NXP JCOP 31V2.2 36K smartcard?
    Thnx in advance!

    one word says the most: no.
    unless you find a compiler that will turn a subset of the C language into javacard bytecodes. I'm not aware of such a tool.

  • How to create a virtual FPGA and run LabVIEW code on it?

    Hi
    I am new to LabVIEW FPGA world. I have code written in LV 8.6 that was running on a Virtex 5. I need to run this code on a virtual FPGA but I need this to be as real as possible and maybe to acces this virtual FPGA also from another environment. Do you think this can be done? I need just a general answer to have an idea on this problem.
    Thanks

    If I've understood correctly, you have LabVIEW code written for an FPGA and running on an NI FPGA board, which you'd now like to run in a simulated system.  I doubt this is possible since I don't think there is a way for you to simulate all the hardware (DAQ and whatever else) that is attached to the FPGA on the real hardware.  Also, LabVIEW doesn't have any way of accessing an arbitrary non-NI FPGA target and without the LabVIEW interface I don't think your FPGA code will be too useful.

  • Writing Dynamic code in smart form

    Hi All,
       I have a issue on Smart form . the smart form is customized view of bbp_po(srm) for po(purchase order) details  in that in a secoundary window where vedor adress is displaying .In the first line of the address name1 and name2 are displaying now my need is if the name1+name2 is more than 47 chars then i need  to shift name2 to next line how can i do this dynamic code plase i need it urgently .
    Thanks
    channu sajjanar

    Hi
    Write code yto count the no of character, if it is more than 47 then display NAME2 in second line else write in first line.
    for second line put conditionin text element  NAME2 <> space.
    This will work
    Thanks
    Shiva

  • Error in Running JCO code in Netweaver Devloper Studio

    Hi,
    I have written a simple java program to get data from SAP using JCO code. It get compiled successfuly but when I run it, It gives the following error :
    java.lang.NoClassDefFoundError
         at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:798)
         at com.sap.mw.jco.JCO$Client.connect(JCO.java:2829)
         at com.sap.test.SAPPoDetailMain.getPODetail(SAPPoDetailMain.java:39)
         at com.sap.test.SAPPoDetailMain.main(SAPPoDetailMain.java:77)
    Exception in thread "main"
    Is there any way in which I can run this code in Netweaver Devloper Studio.
    Thanks
    Naresh

    Hi Stefan,
    I have tried that but still it is giving the same. I am using Generated proxied to call function module. Once again copying the detailed error :
    java.lang.UnsatisfiedLinkError: no CpicNative in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1491)
         at java.lang.Runtime.loadLibrary0(Runtime.java:788)
         at java.lang.System.loadLibrary(System.java:834)
         at com.sap.mw.rfc.api.RfcApi.initializeDLL(RfcApi.java:1285)
         at com.sap.mw.rfc.api.RfcApi.<clinit>(RfcApi.java:1299)
         at com.sap.mw.jco.MiddlewareJRfc.<clinit>(MiddlewareJRfc.java:228)
         at java.lang.Class.forName0(Native Method)
         at java.lang.Class.forName(Class.java:141)
         at com.sap.mw.jco.JCO.<clinit>(JCO.java:630)
         at com.sap.test.SAPPoDetailMain.getPODetail(SAPPoDetailMain.java:26)
         at com.sap.test.SAPPoDetailMain.main(SAPPoDetailMain.java:79)
    java.lang.NoClassDefFoundError
         at com.sap.mw.jco.MiddlewareJRfc$Client.connect(MiddlewareJRfc.java:798)
         at com.sap.mw.jco.JCO$Client.connect(JCO.java:2829)
         at com.sap.test.SAPPoDetailMain.getPODetail(SAPPoDetailMain.java:41)
         at com.sap.test.SAPPoDetailMain.main(SAPPoDetailMain.java:79)
    Exception in thread "main"
    Thanks
    Naresh

  • Error while running transaction code f-42

    hi all,
    i am getting an error while running t code F-42.
    Error is 'Global Number Parameter Is Missing'.
    Please solve this
    Thanks in Advance

    Hi,
    Check Global parameters settings at OBY6.
    Thanks!
    Assign points
    Zia

  • "java.lang.NoClassDefFoundError" error while run t-code SXMB_IFR in XI

    Hi
    When I am trying to run t-code <b>SXMB_IFR</b> in Xi it give me below error.
    <b>Exception Details
    Exception class: java.lang.NoClassDefFoundError
    Message
    java.lang.NoClassDefFoundError
    Stacktrace
    Thrown:
    java.lang.NoClassDefFoundError: null
         at com.sap.aii.ibrep.server.transport.api.RepTransportServiceStartup.startupIbrepTransportServices(RepTransportServiceStartup.java:22)
         at com.sap.aii.ibrep.server.applcomp.StartupCodeEntry.startup(StartupCodeEntry.java:426)
         at com.sap.aii.ib.core.applcomp.IStartupCodeEntry.startupIfNotAlreadyDone(IStartupCodeEntry.java:33)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponentImpl.startup(ExplicitApplicationComponentImpl.java:116)
         at com.sap.aii.ib.core.applcomp.ExplicitApplicationComponents.startup(ExplicitApplicationComponents.java:374)
         at com.sap.aii.ib.core.applcomp.ApplicationComponent.startup(ApplicationComponent.java:201)
         at jsp_Main1172666584171._jspService(jsp_Main1172666584171.java:21)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:467)
         at com.sap.engine.services.servlets_jsp.server.servlet.JSPServlet.service(JSPServlet.java:181)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.runServlet(HttpHandlerImpl.java:385)
         at com.sap.engine.services.servlets_jsp.server.HttpHandlerImpl.handleRequest(HttpHandlerImpl.java:263)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:340)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.startServlet(RequestAnalizer.java:318)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.invokeWebContainer(RequestAnalizer.java:821)
         at com.sap.engine.services.httpserver.server.RequestAnalizer.handle(RequestAnalizer.java:239)
         at com.sap.engine.services.httpserver.server.Client.handle(Client.java:92)
         at com.sap.engine.services.httpserver.server.Processor.request(Processor.java:147)
         at com.sap.engine.core.service630.context.cluster.session.ApplicationSessionMessageListener.process(ApplicationSessionMessageListener.java:37)
         at com.sap.engine.core.cluster.impl6.session.UnorderedChannel$MessageRunner.run(UnorderedChannel.java:71)
         at com.sap.engine.core.thread.impl3.ActionObject.run(ActionObject.java:37)
         at java.security.AccessController.doPrivileged(Native Method)
         at com.sap.engine.core.thread.impl3.SingleThread.execute(SingleThread.java:94)
         at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:162)</b>
    Reg,
    Hiren Patel

    Hi Hiren,
       Check these threads:
    Problem starting SXMB_IFR and J2EE Engine
    java.lang.NoClassDefFoundError
    Regards,
    Subhasha Ranjan

Maybe you are looking for