CPP Parser or Interpreter API in Java ?

Hi,
Is there any API that will parse a given snippet of C++ code or java code.
My requirement is that given any wierd combination of commenting, for example
for(int i=0; ;/*This is a comment
                 peace of code
                 */i++)
    //Todo.....
}I have managed a code that can find to seperate the comment lines and executable lines, if they have used standard commenting strategy. But for the above shown code, it considers the "for loop" as 3 executable lines.
Problems.
1. it cant recognise the multiline comment starting b/w
2. it can recognise multiline declaration as a single executable line of code.
Please help..... :-)

indiana001 wrote:
Hi,
Is there any API that will parse a given snippet of C++ code or java code.Do you really want to parse the code ? For doing what ? Why do you want to parse c++ or java code ? Or do you want to execute C++ code from within a java Program?
You can parse the code on your own with the Java API but what do you really want to achieve ?

Similar Messages

  • Is there any Sun Java's official SVG API for Java SE?

    Hi, I'm still learning Java and SVG.
    Currently I want to build a kind of client-server application transferring SVG files.
    I'm using JSR 226 to parse SVG files in my Java ME client, but I dont know what API I should use to parse SVG files in my Java SE server.
    I want the server to read a large SVG image file and then parse it and divide it into some small linked SVG image parts before it can transferred to the client.
    Does Java SE have a standard API for SVG? Bcause I only found Batik..
    thnks in advance.

    Hello,
    I am using SVG Salamander... it is a nice small library.
    https://svgsalamander.dev.java.net/
    Jacco

  • How to use excel api in java?

    I need to use excel api in Java to generate data in excel format. Can any one tell any of the use ful Excel api that we can down load from net? i have read about Apache's POi-hssf-Java api. But the jar i downloaaded from Apache site is not working ? Can anybody please send me the jar for taht Api ?

    Hi,
    In fact i was not clear about whcih jar file to download from the apache site. i found one folder structure like this
    -parent
    -bin
    -src
    All these folders contained some zip files. i took the zip files and extracted them. And i set teh class path also . But when i tried to import in java programs ,these jar files are giving compilation errors

  • How can i execute Spaces API in java main class?

    Hi
    I am able to execute Spaces API through portal application. However if i try to execute it in java main class, its throwing an exception
    "SEVERE: java.io.FileNotFoundException: .\config\jps-config.xml (The system cannot find the path specified)"
    oracle.wsm.common.sdk.WSMException: WSM-00145 : Keystore location or path can not be null or empty; it must be configured through JPS configuration or policy configuration override.
    How can i set this path, so that i can execute Spaces API from java main class.
    Need this main class to configure in cron job, to schedule a task.
    Regards
    Raj

    Hi Daniel
    Currently i have implemented create functionality in my portal application using Spaces API, which is working fine. Now the requirement is, i need to implement a "Cron Job" to schedule a task, which will execute to create space(for example once in a week). Cron job will execute only the main method. So I have created java main class, in which I have used Spaces API to perform create space operation. Then it was giving exception.
    Later I understood the reason, as I am executing the Space API with a simple JSE client, its failing since a simple java program has no idea of default-keystore.jks, jps-config.xml, Security Policy. Hence i have included those details in main class. Now I am getting new error,
    SEVERE: WSM-06303 The method "registerListener" was not called with required permission "oracle.wsm.policyaccess"
    For your reference i have attached the code below, please help. How can i use Spaces API in java main method(i mean public static void main(String[] args) by giving all required information.
        public static void main(String[] args) throws InstantiationException,
                                                      GroupSpaceWSException,
                                                      SpacesException {
            Class2 class2 = new Class2();
            GroupSpaceWSContext context = new GroupSpaceWSContext();
            FactoryFinder.init(null);
            context.setEndPoint("http://10.161.226.30/webcenter/SpacesWebService");
            context.setSamlIssuerName("www.oracle.com");
            context.setRecipientKeyAlias("orakey");
            Properties systemProps = System.getProperties();
            systemProps.put("java.security.policy","oracle/wss11_saml_or_username_token_with_message_protection_client_policy");
            systemProps.put("javax.net.ssl.trustStore","C:\\Oracle\\Middleware11.1.7\\wlserver_10.3\\server\\lib\\cacerts.jks");
    systemProps.put("oracle.security.jps.config","C:\\Oracle\\Middleware11.1.7\\user_projects\\domains\\workspace\\system11.1.1.7.40.64.93\\DefaultDomain\\config\\fmwconfig\\jps-config.xml");
            systemProps.put("javax.net.ssl.keyStore",C:\\Oracle\\Middleware11.1.7\\user_projects\\domains\\workspace\\system11.1.1.7.40.64.93\\DefaultDomain\\config\\fmwconfig\\consumer.jks");
            systemProps.put("javax.net.ssl.keyStorePassword", "Test12");
            System.setProperties(systemProps);
            GroupSpaceWSClient groupSpaceWSClient;
            try {
                groupSpaceWSClient = new GroupSpaceWSClient(context);
                System.out.println("URL: " +
                                   groupSpaceWSClient.getWebCenterSpacesURL());
                //delete the Space
                List<String> groupSpaces = groupSpaceWSClient.getGroupSpaces(null);
                System.out.println("GroupSpaces:: " + groupSpaces.size());
            } catch (Exception e) {
    Regards
    Raj

  • Critical WebLogicServer BEA-000362 Server failed. Reason: [Management:141266]Parsing Failure in config.xml: java.lang.AssertionError: java.lang.reflect.InvocationTargetException

    Friends,
    Getting below error when i restart the server.
    <Dec 31, 2014 5:33:58 AM EST> <Warning> <Management> <BEA-141274> <Production mode has specified at the command line via the weblogic.ProductionModeEnabled system property. This system property overrides the development mode setting contained in config.xml. However, the console and WLST show the attribute values and defaults that correspond to the development mode specified in config.xml.>
    <Dec 31, 2014 5:34:07 AM EST> <Critical> <WebLogicServer> <BEA-000362> <Server failed. Reason: [Management:141266]Parsing Failure in config.xml: java.lang.AssertionError: java.lang.reflect.InvocationTargetException>
    <Dec 31, 2014 5:34:07 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FAILED>
    <Dec 31, 2014 5:34:07 AM EST> <Error> <WebLogicServer> <BEA-000383> <A critical service failed. The server will shut itself down>
    <Dec 31, 2014 5:34:07 AM EST> <Notice> <WebLogicServer> <BEA-000365> <Server state changed to FORCE_SHUTTING_DOWN>
    I have changed the jar files path in build.properties file as its required to import new jars as part of Documentum server upgradation. But getting above errors.. Do i have to update Config.xml file or any other file.. Please suggest.

    You've got a problem with a corrupted config.xml file.
    Since you did not make any changes you can copy the config.xml.booted file over the corrupted config.xml.
    The other option is to walk though the config.xml file and look for the problem...

  • Open Innovation Call: abap interpreter written in java

    Like part of the Open Innovation Call initiative: /people/ignacio.hernndez/blog/2006/12/22/open-innovation-call ,
    I begin this forum thread to open the discussion about "JAbap project":
    I know JRuby...is there something like a abap interpreter written in java? ..java and abap using the same virtual machine....?

    Hello I have the same problem, were you able to execute the WS through the JS code now?
    I would like to call an ABAP WS using JavaScript to return complex structures that I would like to manage directly with JS.
    I tried with this code and I get the error "RaiseError: Acrobat Raise." when the request is executed:
    var WSUrl = "http://<server>:<port>/sap/bc/srt/wsdl/bndg_4D15C75529330AF1E10000000A150429/wsdl11/allinone/ws_policy/document?sap-client=500";
    var VendorNumber = xfa.form.DATA.DATAFLOW.SF_HEADER.VENDOR_NUMBER.rawValue;
    try {
    // Create request structure, read Input out of text field
    var request = {
              "urn:sap-com:document:sap:soap:functions:mc-style:ZWsTest" : {ILifnr: VendorNumber}
    SOAP.wireDump = true;
    // Call web service using SOAP object
    var response = SOAP.request ({
            cURL: WSUrl,
            oRequest: request
    //        cAction: "urn:sap-com:document:sap:soap:functions:mc-style"
    } catch (e) {
        xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
    with this other code I get the error "SOAPError: CX_ST_MATCH_ELEMENT:XSLT exception.System expected element 'ILifnr'":
    try {
        var myProxy = SOAP.connect(WSUrl);
        var result = myProxy.ZWsTest( { ILifnr: VendorNumber } );
        xfa.form.DATA.DATAFLOW.SF_HEADER.E_DESCRIPTION.rawValue = result;
    // Display the response in the console:
       console.println("Result is " + result);
    } catch (e) {
        xfa.host.messageBox(e.toString()); //pop-up "TypeError:service.CelsiusToFahrenheit is not a funciton"
    in the second option, if I make the field ILifnr optional the call is succesfully performed but the parameter is not passed to the WS. So the call is working.
    Using stand-alone LiveCycle designer 8.1 and Adobe Reader 8
    Any suggestions?
    Many thanks,
    G.
    Edited by: Guillem Mateu Navalón on Jan 13, 2011 1:13 PM

  • Where can i get  MySQL api for java?

    I'm new to jsp,
    where can i get MySQL api for java?
    thanks

    You mean the jdbc driver for mysql ? if yes, www.mysql.com/downloads/api-jdbc.html

  • JAXB as standard API for Java Mappings in XI?

    Hi there,
    Has anyone on this forum implemented Java mappings in XI using JAXB (reference implementation for XML/JAVA data bindings of SUN)?
    If Yes, can you please share any experiences?
    We're considering to use this API for Java Mappings in XI but first would like to get more background info.
    Cheers,
    Rob.

    Hi Roberto,
    Have tried implementing Java mapping using JAXB technique couple of years ago. However I was not able to test the mapping in XI/PI environment.
    <ul>
    <li>There is no in built support for JAXB from SAP XI.</li>
    <li>There is no documentation available from SAP on JAXB hence it is difficult to implement the mapping.</li>
    <li>We have to import JAXB specific jars along with the mapping code. my attempt to execute the mapping test in IR tool was unsuccessful It was running fine in standalone mode in local PC </li>
    </ul>
    [My question on SDN on same topic..|Java Mapping Using JAXB [Java Arch for XML Binding];
    Thanks and regards,
    Ananth

  • What is the good voice xml api for java

    dear buddies,
    what is the best voice xml api for java? has somebody comeacross and work involving this, i would like to hear more about this
    thanks
    Kuha

    Maybe the VXML forum is a better place: http://www.voicexml.org/
    Good luck.

  • Third Party APIs in Java Language which doesnot use JavaMail APIs

    Hi Pals,
    Is there any third party java mail APIs available which doesnot using Sun JavaMail APIs? The third party would have its own APIs which does not use javax.mail. I have to code in Java Platform so if the APIs are java based its nice and useful to me.....
    Thanks & Regards,
    Prakash

    ksp wrote:
    Hi,
    I am using Javamail APIs to send mails. Sometimes Mcafee blocks the mails and its not allowing javax.mail package. Thats why i would like to go for some other third pary which uses their own APIs......What makes you think a third party API would be less prone to interference by McAfee?
    Edited by: sabre150 on Jun 18, 2009 10:39 AM
    :-)

  • Data Warehouse:java.lang.NoClassDefFound Error while using OWB API for Java

    I was writing code to use the OWB APIs for Java:
    I have imported the folowing files:
    oracle.owb.connection.RepositoryManager;
    oracle.owb.connection.OWBConnection;
    oracle.owb.connection.ConnectionFailureException;
    when jvm tries to get instance of Repositary Manger by the following code
    reposManager = RepositoryManager.getInstance();
    I get the following exception:
    Exception in thread main
    java.lang.NoClassDefFoundError: com/objectspace/jgl/HashMap
    I have checked my OWB and Java environment but I cant locate com/objectspace/jgl.jar file. Can some one tell me were this jar is located in so i can import it.

    Either use some criteria you develop related to one of the keys on the table or use some sort of record limiting method.
    Note the method of limiting will vary related to the database you are using. You will have to look at the documentation.
    For example I am told this will work in MySQL to get 200 records starting at record 100.
    SELECT * FROM myTable ORDER BY whatever ASC LIMIT 100,200
    Because you are running out of memroy I assume the table is large,
    I am not sure what the impact of the above will have on performance because if in the above if the order by is not based on an index at the server level all the records will be selected and sorted before the records are limited.
    I would make sure you have an appropriate index.
    If you use the advanced search over the user forums using "resultset paging" and possibility the database you are using you should be able to get some ideas.
    I hope this makes sense to you.
    rykk

  • Java.lang.NoClassDefFound Error while using OWB API for Java

    I was writing code to use the OWB APIs for Java:
    I have imported the folowing files:
    oracle.owb.connection.RepositoryManager;
    oracle.owb.connection.OWBConnection;
    oracle.owb.connection.ConnectionFailureException;
    when jvm tries to get instance of Repositary Manger by the following code
    reposManager = RepositoryManager.getInstance();
    I get the following exception:
    Exception in thread main
    java.lang.NoClassDefFoundError: com/objectspace/jgl/HashMap
    I have checked my OWB and Java environment but I cant locate com/objectspace/jgl.jar file. Can some one tell me were this jar is located in so i can import it.

    Do you have JAVA_HOME set in your environment?
    What's the result of
    env
    Make sure DBCA is calling the java under $ORACLE_HOME not from other installation.

  • Using Windows API in Java

    hi,
    How can i use windows api in java.
    regards
    Malik Faisal

    By writing a wrapper in JNI.
    JNI Tutorial.

  • How do i invoke Windows APIs in JAVA??? Please help.

    Is there a way to invoke Windows APIs in Java??? Please help......Thankx

    Short answer, you don't. However, you should look at Java Native Interface (JNI) very closely. It will allow you to wrap the Win32 API calls so that Java can call your wrapper methods. Another side to it, although not necessarily related to your question is a JavaBeans to COM bridge that you may want to look into as well, though it's probably not going to be a solution for what you're wanting to do right now.

  • Adobe acrobat Pro api with Java

    Hi,
    Can we call adobe acrobat pro Api with Java to edit Pdf forms. My requirements is to
    convert the read only Pdf form to Editable/fillable Pdf Form.
    Please let me know if there is any provision...
    Thanks in advance.
    Kind Regards,
    Anil Kumar

    Is there API available for calling Adobe Designer/Acrobat Pro from java/or any other language.Whether it be commercially licensed or anything ...kindly let me know..as it is too urgent.
    Thanks and Regards,

Maybe you are looking for

  • 8620 prints, but then gives error message on Surface Pro 3

    This error message has been bothering me for some time. From day one when I print from my Surface Pro 3, I get an error message that my document (doesn't matter what it is) did not print. About 95% of the time, it actually DID print but I get the err

  • Why is it when i have the pop up widow blocker on almost everytime i open a window a pop up window opens?

    I have gone in and set my browser to block pop up windows but 9 out of 10 times when i click on a page or go to open a link i get at least 1 if not more pop up windows everything from online games to advertisements. was wondering if i needed to add a

  • I need to purchase an app. Can I delete my card details straight after.

    I need to purchase an app for my grandson. Can I delete my card details as soon as I have purchased the app.

  • Keyboard Hotk

    Hi everybody, I am looking for a list of keyboard shortcuts so I can control my media center on my audigy 4 pro with a bella dv keyboard. I need to find a list of the keyboard shortcuts to make it work. (like in winamp the "b" key will advance to the

  • Dv6-1216sa cpu upgrades?

    running win 7 32bit, (although will be upgradeing to 64bit soon) bios up to date F:18 current cpu: AMD Turion X2 RM-74 2.2GHz currently my ram is 4gb, which i can only use 3 of hence the upgrade to the 64 bit os soon i will be upgradeing to 8gb ram,