Is it possible to call the java compiler javac from runtime

Hi, can someone tell me if it is possible to call javac from runtime. I need to do this because the class I need to compile must be filled with some data given by the user. I plan to write the class code in a file, let the user write some code lines at runtime, add this lines to the file and then call javac in order to compile the file and check if the user wrote his lines properly. I wonder if this makes sense, thanks for reading this and for your help.

You can try using the exec method in the class java.lang.Runtime, but here are some traps to watch out for when using it:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

Similar Messages

  • Is it possible to call the Print Quote functionality from Custom ADF page

    Hi,
    We are researching if it is possible to call the Print Quote functionality from the Custom ADF application.
    Goal is to pop up the PDF report upon clicking the Print Quote button on the custom page. Is it possible ?
    Atleast advice on the direction to go forward is appreciated.
    Thanks
    Sai

    Hi ,
    Please check following thread on forum -
    Re: ADF: Calling OAF Page from ADF page
    Check this may also be useful-
    https://blogs.oracle.com/shay/entry/to_adf_or_oaf_or
    I have not tried yet but Steven Chan (Sr. Director OATG) suggest following methodolgy for this-
    https://blogs.oracle.com/stevenChan/entry/appsdatasource_jaas_ebs
    Thanks,
    Ashish

  • Is it possible to call the import/export utilities from a procedure?

    I was just wondering if it is possible to call these utils as
    they are command line .exe's in Windows.
    Thanks
    Mike

    Hi ,
    Please check following thread on forum -
    Re: ADF: Calling OAF Page from ADF page
    Check this may also be useful-
    https://blogs.oracle.com/shay/entry/to_adf_or_oaf_or
    I have not tried yet but Steven Chan (Sr. Director OATG) suggest following methodolgy for this-
    https://blogs.oracle.com/stevenChan/entry/appsdatasource_jaas_ebs
    Thanks,
    Ashish

  • Is it possible to call the SQL Server DB from jsp to java?

    im doing a configurable system where you can create your own table using the system. i can do the creation of table by running the statement CREATE TABLE...........(with attributes) in java.
    Let's say i have created tblST1 with attributes st_ID, st_Name, st_Description.
    My problem is i dont know if it's possible to retrieve all the attributes from jsp to java.

    jverd: i need your help. Iv read all the links u posted but im having a hard time in understanding them.
    For the site http://java.sun.com/j2se/1.4.2/docs/api/java/sql/ResultSetMetaData.html , there's a code there which is...
    ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
    ResultSetMetaData rsmd = rs.getMetaData();
    int numberOfColumns = rsmd.getColumnCount();
    boolean b = rsmd.isSearchable(1);
    what i did was, i inserted it in my java code which is :
    public boolean checkFieldTable2()
              boolean checked = false;
              try
                   IRMS_DBConnect db = new IRMS_DBConnect();
                   db.openCon();
                   ResultSet rs = stmt.executeQuery("SELECT a, b, c FROM TABLE2");
              ResultSetMetaData rsmd = rs.getMetaData();
              int numberOfColumns = rsmd.getColumnCount();
              boolean b = rsmd.isSearchable(1);
                   db.closeCon();
                   checked = true;
              catch (Exception ex)
                   System.out.println("Error on Execution: " + ex);
              return checked;
    and i compiled it and there was an error that the variable stmt was not initialized. Am i doing the right way?
    Can anyone help me pls? pls pls pls

  • Is it possible to call the contact number indicated in the cell?

    Hello! Tell me please, I want to move a lot of contacts in the electronic form and organize a list of contacts in Numbers. Is it convenient to use it on the iphone? Is it possible to call the contact number indicated in the cell? That is an example: name, contact, etc. A few columns. I click on the number of human cell, and then what would happen if a set of user (as it happens in the notes for example)?
    Sorry for my english.

    Your post is now in the iWork for iOS community. You should be able to get to it using the link in the email you receive with this message.
    Regards,
    Barry
    PS: Interesting that I received the notification of your post in Russian (except for the first and last words).
    Here's Googles translation of my reply above:
    Ваше сообщение в настоящее время в IWORK для IOS сообщества. Вы должны быть в состоянии добраться до него по ссылке в сообщении электронной почты вы получите с этим сообщением.
    С уважением,
    Барри

  • How to call the java method in java script function in a portal application

    Hi Friends,
    I am developing one application where i need to fetch the data from KM content and displaying it on the screen in regular interval. I wrote one method in JSPdynpage for fetching data from KM content now I need to call that java method in java script function.
    java method(IComponentRequest request)
    //Coode for fetching the KM content
    function()
    <b>//Need to call the java method</b>
    setTimeout(function, 5000);//setting the time interval for this function
    <<htmlb display code>>
    If anybody can help me in calling the java method in java script function that will be very helpful for me.
    Thanks in advance,
    Sandeep Bonam

    Hi,
    Pls see if the following links could help.
    http://www.rgagnon.com/javadetails/java-0170.html
    http://www-128.ibm.com/developerworks/library/wa-resc/?dwzone=web
    Regards

  • Is it possible to disable the optimized compiler in LabVIEW 2010

    Hello,
    I have a project that take 3 minutes in LabVIEW 8.6 to build and now with LabVIEW 2010 it take 10.5 minutes. 3x more longer.
    In fact my project as 61 .lvproj for a total of 4300 vi's that take 1 hour to build. If I interpolate, the entire build process will take 3 hours in LabVIEW 2010. This is not acceptable
    I know that the new compiler optimize the code for better performance, but if I don't need better performance.
    Is it possible to disable the optimized compiler in LabVIEW 2010 with an INI key in LabVIEW.ini.
    Dany Allard
    Dany Allard
    Solved!
    Go to Solution.

    Jarrod S. wrote:
    One Application Builder setting you might try out to make builds go much more quickly is the Remove Unused Members of Project Libraries checkbox and the Modify Project Library File after Removi....
    This can drastically cut down the build times. Note, however, that this option does not work well if your application will load external plug-in VIs when it runs, because the libraries of those plug-in VIs may conflict with the modified libraries in the executable file. If you don't have a plug-in architecture, this will not affect you.
    The "Remove unused members of project libraries" was already selected but not the "Modify project library file after removing unused members" and selecting this cut the build time from 10.5 min to 4 min.
    Thank you Jarrod for this tips
    Dany
    Dany Allard

  • ** Is it possible to call the backward steps in BPM?

    Hi friends,
    Is it possible to call the backward steps in BPM from the current step ? Like 'Throw Alert' in BPM whenever we restart the BPM.
    Kindly reply.
    Kind Regards,
    Jeg P.

    Hi friends,
    Is it possible to call the backward steps in BPM from the current step ? Like 'Throw Alert' in BPM whenever we restart the BPM.
    Kindly reply.
    Kind Regards,
    Jeg P.

  • Is it possible to run the java program without main?

    Hi,
    Is it possible to run the java program without main?
    if anybody know please tell me, how it is possible.
    Regards,
    Ramya

    Hi,
    Is it possible to run the java program without main?
    if anybody know please tell me, how it is possible.
    Regards,
    RamyaWhy do you ask? It sounds like an odd question. Your program can be an applet and it doesn't need a main method in that case.
    Kaj

  • Is it possible to connect the java with XL database

    Hi friends,
    Is it possible to connect the java with XL database.
    if it is possible can u send the detail for that .
    Thnax in Advance..............

    What the heck is a XL database?

  • Can we call a Java Stored Proc from a PL/SQL stored Proc?

    Hello!
    Do you know how to call a Java Stored Proc from a PL/SQL stored Proc? is it possible? Could you give me an exemple?
    If yes, in that java stored proc, can we do a call to an EJB running in a remote iAS ?
    Thank you!

    For the java stored proc called from pl/sql, the example above that uses dynamic sql should word :
    CREATE OR REPLACE PACKAGE MyPackage AS
    TYPE Ref_Cursor_t IS REF CURSOR;
    FUNCTION get_good_ids RETURN VARCHAR2 ;
    FUNCTION get_plsql_table_A RETURN Ref_Cursor_t;
    END MyPackage;
    CREATE OR REPLACE PACKAGE BODY MyPackage AS
    FUNCTION get_good_ids RETURN VARCHAR2
    AS LANGUAGE JAVA
    NAME 'MyServer.getGoodIds() return java.lang.String';
    FUNCTION get_plsql_table_A RETURN Ref_Cursor_t
    IS table_cursor Ref_Cursor_t;
    good_ids VARCHAR2(100);
    BEGIN
    good_ids := get_good_ids();
    OPEN table_cursor FOR 'SELECT id, name FROM TableA WHERE id IN ( ' &#0124; &#0124; good_ids &#0124; &#0124; ')';
    RETURN table_cursor;
    END;
    END MyPackage;
    public class MyServer{
    public static String getGoodIds() throws SQLException {
    return "1, 3, 6 ";
    null

  • HT5071 Is it possible to call a locally installed ibook from a hyperlink? What about to a bookmark?

    Is it possible to call a locally installed ibook from a hyperlink? What about to a bookmarked page?
    I have 2 questions..
    1. Can I send a link via email that when launched will open an ibook that has already been downloaded to the bookshelf?
    2. If question 1 is possible, can I take it a step further and call a bookmark, i.e. chapter 3.
    Our company has it's own appstore and I want to send out links to sections of the ibooks using bookmarks or at the very least take them to the start of the ibook.
    I don't need to give them a link to install the ibook as they already have it installed.
    Any help would be much appreciated.
    Chris.

    That would be cool, but it's not possible. The ibook is not accessible by URL in the user's bookshelf.

  • Calling the super class method from the subclass

    Hi all,
    I have a question about inheritence and redefinition of methods. Is it possible to call the superclass implementation of a method which is redefined in the subclass in another method of the subclass?There are possbilities like creation of an explicit super class instance or delegating the super class method implementation to another method which is also protected etc. What i mean is, is there a direct way of calling it?We have ,me,   as the reference for the instance we have(which is the subclass instance in this case), is there also a way of pointing the superclass implementation(with super we can reference in the subclass redefinition, my question is if we have such a parameter in other methods of the subclass too)
    Thanks in advance
    Sukru

    Hi,
    The super reference can only be used in redefined methods to call superclass implementation . So probably what you can do is use upcasting and access the required superclass implementation. I can think of only this way...;-)
    Ex data lr_super type ref to cl_superclass
    lr_super = lr_subclass.
    lr_super->method().
    ~Piyush Patil

  • Is it possible to call std. SAP transaction from abap wd

    Is it possible to call std. SAP transaction from abap wd so that transaction appears and work as in gui? Without portal ofcourse.
    I know that using webgui and/or ITS it is possible so then it must be somehow possible....

    Hi,
    see Web Dynpro ABAP call transaction in the foreground and just carry out a simple search in this forum, then you'll find several threads with similar questions...
    Regards, Heidi

  • Is it possible to show the shell in linux from exec

    my app needs something to be installed on the client pc. It downloads the file and then install its automatically. For win this is working, fir the linux not, i can set the permissions, and when i try to launch it like
    String[] commands = {"/bin/sh","filename.bin"};
    Runtime.getRunTime().exec(commands);
    it starts, but it hangs. I think it's possible due to the fact that's there a license agreement in the bin file. when i true to install it manually, from the shell, it shows me the license agreement. i think that linux is waiting for input from the user and my prog hangs. so Is it possible to show the shell in linux from exec ??? so that the user can see the license agreement

    it is in fact the same as the bin file for installing
    java, when you extract that you see the license
    agreement and the user has to press enter to go on,
    that's the only input.
    You're right, i should read the out and err, i
    forgot, stupid of meYou have to send enter to the input stream of the process in that case.
    Kaj

Maybe you are looking for

  • Service order creation based on counter reading assigned to the Ibase.

    Hi All, I've created a service contract (ZXXX) with the item category (ZIT1) of service plan. In the item category (ZIT1) definition i've copied the standard item cat. of service plan (SPLA) and assigned the standard date profile SERVPLAN to the item

  • Text messages sent from or to my iPhone do not appear on the Verizon Messanger web app.

    iPhone text messages do not appear in the Verizon Messenger web ap. Any Ideas why this happens? All other text messages I can still receive!!!

  • Launching the depreciation, which cost center is posted?

    Hi All, an asset contain a cost center in its master data. For the Cost elemen which refers to that asset, in t.code OKB9 in signed as defualt another cost center. When I launch the depreciation of that asset, which cost center is posted? The one in

  • About Templates

    There are the following texts in the "mapviewer_11p6_1_readme.txt" in the MapViewer version 11.1.1.7.1. "--V2 API now supports map templates, which are sets of geoJson data stored as files that work together. Access to a MapViewer server is optional

  • Best method of settings up a multiple section gui

    This may not come across clearly, so please ask me to restate the question if you need to. I wish to create a Swing application that has, say, 5 unique 'pages'; that is to say that there will be five sections, each with a completely different set of