How to embed command line into application

hello,
Are there any API that function as a command shell?
For example, if I have an code editor, and I want it be able to compile the code, how can I do? Just like JBuilder allow us to add a Tool by specified approriate directory path!

there is an API that functions as a command shell.
Runtime.exec()
A better way to compile code is to call javac directly - do a search on google

Similar Messages

  • How to implement command pattern into BC4J framework?

    How to implement command pattern into BC4J framework, Is BC4J just only suport AIDU(insert,update,delete,query) function? Could it support execute function like salary caculation in HR system or posting in GL(general ledger) system? May I create a java object named salaryCalc which use view objects to get the salary by employee and then write it to database?
    Thanks.

    BC4J makes it easy to support the command pattern, right out of the box.
    You can write a custom method on your application module class, then visit the application module wizard and see the "Client Methods" tab to select which custom methods should be exposed for invocation as task-specific commands by clients.
    BC4J is not only for Insert,Update,Delete style applications. It is a complete application framework that automates most of the typical things you need to do while building J2EE applications. You can have a read of my Simplifying J2EE and EJB Development Using BC4J whitepaper to read up on an overview of all the basic J2EE design patterns that the framework implements for you.
    Let us know if you have more specific questions on how to put the framework into practice.

  • Command line Twitter application suggestions

    [sorry if this is the wrong place, feel free to move it and yell at me]
    I can't seem to find any real command line Twitter applications, and wondered if anyone could recommend one? To read as well as write to Twitter, that is. I realise how easy it is to tweet from the prompt.
    I'm currently running Twitter through bitlbee inside of irssi, but I'd rather have it separate, and hopefully support for things like retweeting.
    If noone knows of much, I may have a new project on my hands!

    I think that the fact that Twitter no longer supports basic auth has broken a lot of these clients.  When bashtc stopped working, I wrote my own very basic python twitter client using OAuth.  It only really worked for me since a lot of the OAuth stuff was hard-coded.  I've now generalized it to support the OAuth process and have released the source:
    http://gitorious.org/pytc/pytc
    I'm not a programmer so I'm afraid it's quite sloppy.  Unfortunately it also has some awkward dependencies, including one that you need to patch.  But hopefully it will be of use to someone, and if you improve my code it would be great to get some patches (I know I've got a lot to learn).
    You can also follow the twitter account for the project here:
    http://twitter.com/pythontc
    EDIT: Here's a screenshot of what it looks like with the public timeline.
    Last edited by lydgate (2010-10-10 23:40:43)

  • Com_sheet :: A command line spreadsheet application

    com_sheet is a basic, lightweight command line spreadsheet application.
    Latest release: v0.4 beta
    Features ::
    > Add any number of columns, rows
    > Search
    > Sort
    > Edit
    > Delete
    > Formulaes
    > Save to file (in both tabular and parsable formats)
    > Load saved spreadsheets
    > Colors
    GitHub repo
    Clone with:
    git clone git://github.com/0pointr/com_sheet.git
    Please read the files README and FORMULAE for instructions on compilation, usage and the current limitations.
    Suggestions, critics and feature requests are all welcome.
    Screenshots:
    Last edited by debdj (2013-01-26 16:27:59)

    Obviously you can't read from the scanner. Instead you have to read from request parameters.
    So you have to take a step back and define what values are being input into your application.
    At its most basic you could do it as a jsp page with a textfield/textarea which the user could type into instead of typing on the console input.
    For instance if your application asks the user to enter their name, and then reads the name from System.in, then you have on your jsp page a <input type="text"> and a submit button.
    In the servlet which gets run when you submit the button you get the user's name via request.getParameter().
    At that point you have your input String, and have removed System.in from the process.
    But you are not just limited to text input with an html form. You can use any of the controls available. So asking a user "What is your favorite colour?" Instead of having them type in the answer, you could have them choose it from a radio group or dropdown select box.
    Either way it still gets to the Servlet as a String via request.getParameter.
    Steps you might follow
    1 - identify the values being input into your program
    2 - Write your jsp - start with just textfields
    3 - Write your servlet handler to retrieve the values from the JSP.
    4 - Determine the appropriate control on an html form to replace each input
    5 - Modify the textfields to other controls (dropdown/radio button) as appropriate.
    Theoretically the rest of your program doesn't need to change once you have the value in a String.
    Your method of reading just changes from using Scanner and System.int to request.getParameter()
    Similarly your method of writing would change from using System.out to a response JSP page.
    hope this helps,
    evnafets

  • CP8 - How to embed a pdf into a captivate slide (for LMS publication)?

    Hi,
    How to embed a pdf into a captivate slide (for LMS publication)?
    WebObject doesn't work...
    Thanks

    I accomplished this by publishing my PDF to a directory I called "PDFWebObjectEmbedFiles" on my webserver outside of where my published project lives.
    For example...the PDF to embed lived at:
    http://mydomain.com/PDFWebObjectEmbedFiles/file_name_of_PDF_to_embed.pdf
    Then I went inside of Captivate and inserted the Web Object widget.  I put the URL to my PDF inside the widget.  Then it loads perfectly with no problem.
    Hope this helps.

  • How to give command line arguments

    does anyone help me out in how to give command line arguments after run my program
    m using netbeans6.0.1

    If you want your program to take console input while it's running (as opposed to command line arguments, which are passed once, when you start your program), you can wrap a BufferdInputStream or a Scanner around System.in.
    [http://java.sun.com/docs/books/tutorial/essential/io/index.html]

  • URGENT-How to run command in java application???

    URGENT!
    i would like to run command to invoke some applications (like invoke application using command line in DOS) in my java appication.
    Do anyone know how to do this? Thanks a lot.

    This question has been asked upteen times.
    ok the code is
    for win95
    Runtime.getRuntime().exec( "start c:\\tmp.txt" );
    for win 2000
    Runtime.getRuntime().exec( "cmd /C startc:\\tmp.txt" );
    //change the file to your desire file..
    i am not so sure about win98, sorry...

  • How to embed a smartform into a component?

    Hi All,
    i would like to embed a smartform into the component to display the relevant information of complaint in WEB UI.
    In complaints when i clicked on complaint ID it is not not displaying any details? So i would like to add a smart form to the component to display all the details. Please help me how to add the smartform into the component?
    Thanks
    Maheedhar

    Hi pavan,
    I did not try this but I think you can call the smatforms function module and get the form in html from parameter JOB_OUTPUT_INFO-XMLOUTPUT-TRFRESULT.
    Put this into WD component using respective method. Compare Thread: [Add html code in web dynpro application|Add html code in web dynpro application]
    Regards,
    Clemens

  • How to Pass Command line arguments to an exe created in LV8.0

    Hi Friends,
    I have Created an exe in LV8.0, which accepts the Folder path as input and executes.
    I want to call this exe passing the parameter (i.e folder path in my case)  from the command line argument. How to pass arguments to the exe ?
    Generally we may be having different types of input parameters to a vi like numeric control, string, boolean etc..If we create an exe that needs three input parameters among which one is boolean, other is string and third is a numeric value.
    How to pass these different types of input controls to the exe as parameters in command line at the same time?
    Thanks and Regards,
    SODLB

    I don't have any experience with the 8.x application builder, but the 7.x one has a checkbox for passing the arguments to the executable.
    As for reading them, there should be an example in the example finder (Help>>Find Examples) which shows how to do this. If you want to pass multiple parameters, I suggest you use a structure similar to NAME=VALUE, so that you can parse each element to find the = and then use a case structure to decide what to do with the parameters. This allows your users to enter or not enter any of the switches.
    Try to take over the world!

  • How to pass command-line options to app using the "open" command?

    I am using jedit, and since I'm doing a lot of stuff in a shell, I'd really like to launch it from the command line as though I'd opened from finder, so I wrote a script that contains this:
    open -a /Applications/Jedit.app "$@" &
    This works well for everything except NEW files, where I get this error:
    2007-02-16 19:29:48.072 open[1032] No such file: /Users/millerti/projects/ateon/new_file
    Is there a way I can override this?
    So, it occurred to me that I might try running jedit directly this way:
    /Applications/Jedit.app/Contents/MacOS/jedit -- "$@" &
    The trouble is that this suffers all sorts of weird problems. For instance, if there's already a jedit running, it launches another one (despite the fact that -server is default). Moreover, the file it opens, existing or not, is not the one I specify. If I'm in ~/mydir and I open ./myfile, jedit opens instead /Applications/myfile.
    Obviously, I'm doing something wrong. Can someone help me figure out what open is doing internally so that I can launch jedit compatible with how open does it so that I can both open existing files and create new ones the same way from the command line?
    BTW, I can make more complex script.
    Also, if this isn't the right forum for this, can someone tell me where would be a better place to get the question answered?
    And I'm not expecting to get jedit support here. This isn't a jedit problem because it's behaving correctly.
    Thanks.

    Applications rarely take command line arguments. I don't know anything about Jedit, whether that is an exception, but you are not sending an argument to Jedit with the open command. The file name on your command line is an argument to the open command. The open command says "open this file with the specified application". The application doesn't see the argument. It sees the file exactly as if it were opened from the Finder. That's why naming a non-existent file doesn't work.
    What if you open Jedit with no file, create a new document in the application. (Again, I am not familiar with Jedit.)

  • How to get COMMAND LINE input

    I am writng an application to add numbers inputted by the user at the command line in a DOS session in the java application. How do i read in input from the user?
    any help is much appreciated

    import java.io.*;
    public class ReadUser {
          static String userInput;
          static int sum = 0;
       public static void main(String[] args) {
          BufferedReader buff = new BufferedReader(new InputStreamReader (System.in));
          // get a string 4 times
          for (int i=0; i<4; i++) {
              System.out.println("Enter a Number");
              try
                   userInput = buff.readLine();
              catch(Exception ex)
                   System.err.println("Had a problem getting input");
                       // convert the string to an int and total it
              sum = sum + Integer.parseInt(userInput);
          // print the sum
         System.out.println("The total is " + sum);
             System.exit(0);

  • How to pass command line options?

    I know that command line options contrary to command line data arguments start with a prefix that uniquely identifies them.
    I write an application that will copy files from one folder to another. It should be launched with the syntax as follows:
    c:>java my.app.DirectoryScannerConsole
    c:>scan ?input ?C:/test/in? ?output ?C:/test/out? ?mask ?*test*.xml? ?waitInterval 60000 ? includeSubfolders false ?autoDelete true
    c:>exitSo after launching we have two commands: 'scan' and 'exit'. What should I make in my program to be able to invoke these commands in such a manner?
    Edited by: Exaserge on Nov 8, 2008 10:38 AM
    Edited by: Exaserge on Nov 8, 2008 10:40 AM

    Maybe try using Scanner to read in the line of input, then break the line into an String array, then comparing the Strings in the array.
    Something like...
    public static void main(String args[])
       Scanner in = new Scanner(System.in);
       String line = in.readLine(); //read in an entire line of input
       String words[] = line.split(" "); //split that line wherever there is a space
       while ( !(words[0].equals("exit")) ) //if they haven't typed in exit
          if (words[0].equals("scan")
              if(words[1].equals("-input"))
                 String inputFile = words[2]
              //etc.
          line = in.readLine();
          words = line.split(" ");
    }I haven't tried to compile it or anything, so it may not be syntactically correct, but you should get the idea.
    Edited by: chickenmeister on Nov 8, 2008 1:02 AM

  • How to embed html-file into swing

    hello,
    can anybody help me how to embed a html-file into a swing application??
    I try to write a swing-application, that connects to a Internetpage via Sockets.
    The problem is, that I can only see the sourcecode of the InternetPage in my JTextArea, but I want to see the whole Page just like in a browser.
    I hope anybody can help me to solve this problem, thanx mina

    u will need to use the JEditorPane component instead of Jtextarea.here is a url to help u get started
    http://java.sun.com/docs/books/tutorial/uiswing/components/simpletext.html#editorpane

  • How to adjust splitted lines into one line in Text file?

    Hi Guys,
    I have a text file with 3 fields(comma separated): GLCode (Number), Desc1 (Char), Desc2(Char) and need to load it into BW.
    My Text file looks like:
    1011.00,"Mejor PC Infrastructure","This line is ok."
    1012.00,"Telephone Equipment $","This line ends in next line.   
    1)Need to change the equipment immediately.
    2)Take immediate action"
    1013.00,"V1 Computer Server Infrastructure # Equip","For purchases
    of components that make up the company's network, such as servers, hubs, routers etc."
    1014.00,"Flash Drive","Need to provide all IT Developer"
    This is how file looks like. Now I need the followings:
    1. Need to remove the space and need to adjust the splitted line into one. Say here
    line/record 2 is splitted into 3 lines and need to adjust in 1 line.
    2. In Line 5 (Record 3) data splitted into 2 lines and need to make 1 line.
    3. Need to remove bad characters.
    Could someone help me please how to proceed ?
    Regards,

    Not quite correct by my testing.  Try:
    $i=0
    Get-Content .\test.txt | ForEach {
    If ($i%2){
    ("$Keep $($_)").Trim()
    }Else{
    $keep=$_
    }$i++
    Good catch!
    Boe Prox
    Blog |
    Twitter
    PoshWSUS |
    PoshPAIG | PoshChat |
    PoshEventUI
    PowerShell Deep Dives Book

  • How to run command line argument programe

    Hi guys, I am doing pass command line argument programe in java but I don't know how to run this programe. Path for this programe in my my computer is C:\Users\Desktop\Mainjava\mycode\CommandProgjava*
    {code/}
    public class CommandProg
    public static void main(String[] args)
    System.out.println("d");
    for (int i = 0; i < args.length; i++)
    System.out.println(args);
    {code/}
    Where i need to go and what command i need to give so i can execute this programe(I am using window vista). I only know i have to give
    this command some where CommandProg arg1 arg2 arg3 arg4. Output should be
    Output:
    arg1
    arg2
    arg3
    arg4
    Please help me, Thanks in advance.
    Edited by: JayVirk on Dec 30, 2007 11:33 AM

    Jay,
    Your question isn't very clear, hence Joerg's well meaning but irrelevant advise.
    Do you mean:
    I've written a simple program in java which echos
    it's command-line arguments to back to the console.
    Here's my code:
    package forums;
    public class ArgsEchoer
      public static void main(String[] args) {
        for (String arg : args) {
          System.out.println(arg);
    But can't figure out how to compile and run the program.
    I'm using winblows shista, and it's cr@p.
    Please help me, Thanks in advance.So... where are you at? Have you installed the JDK (java development kit)? Which version? Is your path set? Is your classpath set?
    Start here: http://java.sun.com/developer/onlineTraining/new2java/

Maybe you are looking for

  • IPod Classic updating ratings and not play counts in iTunes

    I am currently using an iPod classic purchased in 2010 with iTunes 10.5.3.3.  however I encountered the same issue on 10.6.1 which made me think that if I downgraded that it would solve my problem but it hasn't. Here is my problem. Over the past two

  • File managers won't start?

    Yesterday GNOME's desktop kinda...disappeared? I looked it up and it seemed to be nautilus's fault, and after clearing out ./gnome* and ./gconf* and /.nautilus* and restarting nautilus several times I gave up and started a KDE session, which worked f

  • How can I use N900 Front Cam?

    There is a front web cam in n900. How can I make use of it/activate it? I tried my best, there seem to be no option for me to choose the front cam. What about I want to make 3G video call just like anyother 3G phone?

  • How do I stop "Buzzdock" from opening in a new tab?

    I open a new tab and it redirects to some stupid "buzzdock" search. This drives me nuts. It started when I tired to download the youtube downloader add-on, I didn't like it and uninstalled it along with the other crap it installed on me, but then wen

  • IPOD finally working

    I bought the remote/radio for it and I don't see the radio on the screen.I'm also not able to detect my micromemo device. Any help? TIA, Mike