Help using command promt

I can run the command promt from the RUN command. I type in javac and it says its reconized. I set the path and classpath. I don't know if its right. I am using XP. When I go to open the javac window from my program files, it comes up and displays a messege. It goes away before I can read it. I can't open any of the files yet. PLEASE HELP ME OUT.

You may want to try the tutorial here:
http://java.sun.com/docs/books/tutorial/getStarted/cupojava/win32.html

Similar Messages

  • How to use command promt for calling a java programe

    Hi
    i am using command promt to call my class CreateProdcut
    i am trying to call cmd.exe and then calling a class with argument *"java CreateProduct -----argument----"*
    Following is the code i am using to call cmd.exe as a seprate process
    Problem :-  I am not able to see command promt and called class o/p
    import java.io.*;
    public class ExecCreateProduct{
         public static void main(String args[]) throws IOException, java.lang.InterruptedException{
              Runtime runtime = Runtime.getRuntime();
                             Process pr = runtime.exec ("cmd /c"+"java "+"CreateProduct "+"Hello World"+"HHH");
               try {
               String line;
               BufferedReader input = new BufferedReader(new InputStreamReader(pr.getInputStream()));
                    while ((line = input.readLine()) != null) {
                   System.out.println(line);
                   input.close();
                   } catch (Exception err) {   
                        err.printStackTrace();
              int exitVal = pr.waitFor();
            System.out.println("Exited with error code "+exitVal);
    }Edited by: rahul_p on Jun 9, 2009 2:58 AM

    do it like this it works for me :)
    try{
    Runtime rt = Runtime.getRuntime();
    Process proc = rt.exec("java CreateProduct -----argument-----");
    InputStream stderr = proc.getErrorStream();
    InputStreamReader isr = new InputStreamReader(stderr);
    BufferedReader br = new BufferedReader(isr);
    String line = null;
    while ( (line = br.readLine()) != null)System.out.println(line);
    int exitVal = proc.waitFor();
    exitVal!=0?System.out.println("Error"):System.out.println("success");
    catch(Exception e){
    System.ourt.println(e);
    }

  • Help: use command "run" and "exec", no output

    I create a script file Test.sql, and type "run d:\test.sql" in ttisql's command prompt, but there is no output, not even any error messages.
    Command> run d:\test.sql;
    Command>
    I try to use "Prepare" and "Exec", still no output
    Command> prepare 1 select * from employee;
    Command> exec 1;
    Command>
    ttisql looks recognize these commands, but it doesn't execute them. Who knows the reason? thanks.

    Hi,
    I create a script file Test.sql, and type "run d:\test.sql" in ttisql's command prompt, but there is no output, not even any error messages.What SQL statements are in Test.sql? To see more verbose output from ttIsql, try increasing verbosity. The default is 2. The highest (most verbose) is 4.
    Command>verbosity;
    verbosity = 2
    Command> verbosity 4;
    The command succeeded.
    try to use "Prepare" and "Exec", still no outputTry adding a fetchone or fetchall command to retreive the result. e.g.
    Command> prepare 1 select * from emp;
    Command> exec 1;
    Command> fetchone;
    < 7369, SMITH, CLERK, 7902, 1980-12-17 00:00:00.000000, 800.0000, <NULL>, 20 >
    1 row found.
    Command> fetchone;
    < 7499, ALLEN, SALESMAN, 7698, 1981-02-20 00:00:00.000000, 1600.000, 300.0000, 3
    0 >
    1 row found.
    Command> fetchall;
    < 7521, WARD, SALESMAN, 7698, 1981-02-22 00:00:00.000000, 1250.000, 500.0000, 30
    >
    < 7566, JONES, MANAGER, 7839, 1981-04-02 00:00:00.000000, 2975.000, <NULL>, 20 >
    < 7654, MARTIN, SALESMAN, 7698, 1981-09-28 00:00:00.000000, 1250.000, 1400.000,
    30 >
    < 7698, BLAKE, MANAGER, 7839, 1981-05-01 00:00:00.000000, 2850.000, <NULL>, 30 >
    < 7782, CLARK, MANAGER, 7839, 1981-06-09 00:00:00.000000, 2450.000, <NULL>, 10 >
    < 7788, SCOTT, ANALYST, 7566, 1987-04-19 00:00:00.000000, 3000.000, <NULL>, 20 >
    < 7839, KING, PRESIDENT, <NULL>, 1981-11-17 00:00:00.000000, 5000.000, <NULL>, 1
    0 >
    < 7844, TURNER, SALESMAN, 7698, 1981-09-08 00:00:00.000000, 1500.000, 0.000000e+
    00, 30 >
    < 7876, ADAMS, CLERK, 7788, 1987-05-23 00:00:00.000000, 1100.000, <NULL>, 20 >
    < 7900, JAMES, CLERK, 7698, 1981-12-03 00:00:00.000000, 950.0000, <NULL>, 30 >
    < 7902, FORD, ANALYST, 7566, 1981-12-03 00:00:00.000000, 3000.000, <NULL>, 20 >
    < 7934, MILLER, CLERK, 7782, 1982-01-23 00:00:00.000000, 1300.000, <NULL>, 10 >
    12 rows found.
    Command>
    Good luck.
    Simon

  • HELP using command button in J2ME

    Hi
    I am trying to create a simple code using the command button, but when i try 2 run my program, it gives the following error:
    java.lang.ClassCastException
         at test1.startApp(+81)
         at javax.microedition.midlet.MIDletProxy.startApp(+7)
         at com.sun.midp.midlet.Scheduler.schedule(+266)
         at com.sun.midp.main.Main.runLocalClass(+28)
         at com.sun.midp.main.Main.main(+116)
    Could anyone tell me where the problem could be? Im attaching my code below.
    Thanks in advance
    Regards
    Shikha
    import javax.microedition.midlet.MIDlet;
    import javax.microedition.midlet.MIDletStateChangeException;
    import javax.microedition.lcdui.*;
    import java.util.*;
    public class test1 extends MIDlet {
         Random generator;
         Form basicForm;
         Command appendCommand;
         public test1() {
              super();
              System.out.println("Constructor: test1()");
              // TODO Auto-generated constructor stub
         protected void startApp() throws MIDletStateChangeException {
              System.out.println("StartApp()");
              //create and seed a new Random generator with the current time.
              generator = new Random( System.currentTimeMillis() );
              //get the display for this MIDlet
              Display display = Display.getDisplay( this );
              //create a new Form with the title "Form Title"
              basicForm = new Form("Form Title");
              //append the string "My basic Form" to the new Form
              basicForm.append("My basic Form");
              //Create a new Command to catch user input
              appendCommand = new Command("Random", Command.SCREEN, 1);
              //adds the appendCommand to the basicForm
              basicForm.addCommand( appendCommand );
              try{
              //set the Forms CommandListener to this instance. so all Command
              //events are passed to us.
              basicForm.setCommandListener((CommandListener)this);
              }catch(Exception e){
                   System.out.println("Exception is->"+e.toString());
                   e.printStackTrace();
              // set the current Displayable to the new Form
              display.setCurrent( basicForm );
         public void commandAction( Command c, Displayable d )
              //check if the commandAction event is triggerd by our appendCommand
              if( c == appendCommand )
                   //append a String to the form with a random number between 0 and 50.
                   basicForm.append("Random: " + ( Math.abs( generator.nextInt() ) %50 ) + "\n");
         protected void pauseApp() {
              // TODO Auto-generated method stub
         protected void destroyApp(boolean arg0) throws MIDletStateChangeException {
              // TODO Auto-generated method stub
              System.out.println("destroyApp()");
    }

    basicForm.setCommandListener((CommandListener)this);You're trying to cast your MIDlet subclass (aka, "this") to a CommandListener, but you haven't specified that it implements that interface. So you need to declare the class as follows:
    public class test1 extends MIDlet  implements CommandListener {shmoove

  • Create WiFi Hotspot using the command promt

    I was trying to create WiFi Hotspot on my Windows 7-32bit running laptop using the command promt method after followinng the instructions from here >> http://www.techswatch.com/2014/11/create-wifi-hotspot-windows-87-command-prompt.html However, the problem is, after creating the hostpot, when I enter the password it does get connected but I cannot access the internet. I am sure that I have entered the correct password else it wouldn't have got connected. Any idea what could have gone wrong? Any help would be apprecited. 

     
    Hi ihtisham301, 
    Thank you for visiting Sony Community! 
    Try to connect any different device to your home network. If other device can't connect then you may contact your Internet Service Provided (ISP) for further assistance. 
    If other device can connect, then try to isolate the issue. You mentioned you cannot connect to the network but you were able to enter the credentials before connecting to the network. Try to ping any website, Start -> search cmd -> once in command prompt, enter ping googe.com and hit Enter. Check the Ping statistics. Try to ping your router as well. ping [router IP address] then hit Enter. Also boot the laptop in Safe Mode with Networking -> turn off the laptop, press the power button and immediately, tap the F8 key repeatedly. Once in Advanced Boot Options, select Safe Mode with Networking. 
    I'm not quite sure about the process that you did. I never tried that before. And another thing is, it seems that you are using a non-U.S. model of Vaio. We usually have Windows 7-64bit computer. We have limited information with non-U.S. model of laptops. 
    For further assistance regarding your concern, please contact the Sony offices/Sony representative offices nearest to your place of residence in Asia Pacific region http://www.sony-asia.com/countryselector.html?hpid=countryselector:AsiaPacific. Due to proximity, they are in a better position to respond to your questions or concerns.
    Hope my suggestions help. 
    Thanks,
    Vincent 
    If my post answers your question, please mark it as "Accept as Solution"
     

  • Can't use Command+C to copy HELP!

    I can't use Command+C to copy but I can do Command+V to paste. I have to right click everything to copy. It just does not do anything when I press Command+C. It been like this for 2 days. I did not do anything to my computer at all. Please help me! It getting really annoying.

    Open the Speech pane of System Preferences and check whether either the listening key or the speech key has become set to that keystroke; if so, change the setting.
    (55095)

  • Command Promt need help please

    Hey
    I need to know how to make a new username using command prompt thanks

    you mean in linux? with the command "adduser," check the man page for details

  • Using command prompt for help generating

    Hi all!
    Can I use command prompt for generating webhelp instead of
    RoboHelp HTML environment?
    thank you

    See this recent post.
    Click
    here.

  • I get the Save As dialog when trying to Save, whether using Command-S or File menu

    When trying to Save a document, I am presented with the Save As dialog. The file name has a serial number added  to the old file name and the default destination is the Documents file. This happens whether I have tried to save using Command-S or using the Save option in the File menu. This started after I upgraded to Mavericks.

    I checked and the files are not stationery pads, Permissions show me as having read and write authority.
    But, when I  opened the files from the finder, the problem disappears and they saved normally. I then removed the files from the Dock and re-placed them in the Dock via drag and drop. The problem re-appears and changes will not save normally. Not being able to use the Dock is inconvenient but at least there is a workaround. Thanks for your help! Before declaring victory, I'd like to watch it for a while for other quirks.

  • Adding key figures using commands in Web Application Designer?

    Hello, all.
    I have a query the contains several key figures.  From that query, I created a query view in which only one of the key figures is displayed.  I'm using this query view for one of the data providers in a web template.  In Web Applicaiton Designer, I would like to be able to hide the key figure from the data provider and show a different one.  How can I accomplish this using the built-in commands?
    I know I can hide all key figures using the CLEAR_SELECTION_STATE command, but I can't figure out how to use a command such as SET_SELECTION_STATE_SIMPLE to show a different key figure.  Any help would be great!  Thanks.

    I've tried that using the GUI to configure the command, but WAD crashes when I try to open the window where I choose the member name.  The error says:
    "4A6DM1A4LTXPJKA1BA3LD9TTD is not a valid characteristic for InfoProvider MQM_M01."
    I also tried entering the commands as you suggested in the XHTML editor, but that resulted in an error when I tried to execute the command.
    Maybe I can do what I'm trying to do using some method other than changing key figures.  Basically all I want do is change the date range of the data shown using offsets.
    The key figures that I'm trying to add and remove are restricted in Query Designer to different date ranges.  These date ranges use offsets to set the restriction.  For example, one key figure is restricted to display values for only the last 7 days and I'm trying to replace it with a key figure that's restricted to the last 14 days.
    If I knew how to set a filter with offsets using commands in WAD, then I'd use that method, instead.  Any suggestions would be appreciated.

  • Running a Program in JDeveloper using Command Prompt

    Hi,
    I downoladed Oracle JDeveloper 10g. I had written a simple java class called Echo. java. I want to run the file using command prompt. My JDK has the following path:
    F:\Sowmya
    My java file has the following path:
    F:\Sowmya\jdev\mywork\1\1\src\pkg1
    So, in order to compile the file, I gave the following command:
    F:\Sowmya\jdk\bin>javac F:\Sowmya\jdev\mywork\1\1\src\pkg1\Echo.java
    It worked and the Echo.class file was created.
    But, when I tried to run the file using the following command,
    F:\Sowmya\jdk\bin>java F:\Sowmya\jdev\mywork\1\1\src\pkg1\Echo
    Iam getting the following error:
    Exception in thread "main" java.lang.NOClassDefFoundError: F:\Sowmya\jdev\mywork\1\1\src\pkg1\Echo
    This didnt work either:
    F:\Sowmya\jdk\bin>java F:\Sowmya\jdev\mywork\1\1\classes\pkg1\Echo
    Iam getting the same error.
    Can any one please help me regarding this.
    Thank you,
    Sowmya.

    Yes, my class contains a main. It runs if I click run in JDeveloper. But, there is no output displayed. The following is the code:
    public class Echo {
    public static void main (String[] args) {
    for (String s: args) {
    System.out.println(s);
    }

  • How to use addKeyListener in a program running using command prompt

    Does anyone have any idea how to add the addKeyListener to a program running using command prompt.
    Let me explain how the program run.
    The program is start and accept call from other program. But from time to time, I need to issue some command by pressing the keyboard, let say, ESC is closed the program, F1 is showing the stated. F2.... (This is all need to run in the command prompt windows)
    My problem is this program does not have any gui interface, so how can it be added?
    i do it this way
    public void key(){          
    addKeyListener(this);
    But it have compile error.
    mainServerImpl.java:87: cannot resolve symbol
    symbol : method addKeyListener (mainServerImpl)
    location: class mainServerImpl
    addKeyListener(this);
    I did implement KeyListener. But just don't know how to solve this error.
    can anyone tell me how to solve it or point me a source that can help.
    Thank in advance!
    Regards,
    Tai Tan

    Write your own Thread, to do this:
    public class KeyThread extends Thread {
       public void run {
          while(true) {
             int i = System.in.read();
             if(i == 123) {
                break; // to stop the thread
    // in your main:
    Thread keyThread = new KeyThread();
    keyThread.start(); // calls run() of the thread

  • How to open url in acrobat reader using command line

    Hi,
    I need to open file from url using command line, but I'm still getting some error (wrong filename).
    I've tried for example this command:
    AcroRd32.exe http://www.adobe.com/devnet/acrobat/pdfs/pdf_open_parameters.pdf
    Can anyone help me and tell me what's wrong?

    You can't use a URL as parameter for AcroRd32.exe.

  • How to duplicate a target and add resources in xcode using command line?

    I am trying to use command line tools to create, add resources, build, archive and export to ipa in xcode. I could do the Build, Archive and Exporting to IPA through the command line tools(xcodebuild). But I also wanted to duplicate the target in the same project,add a new Info.plist to the duplicated target resource through command line itself. How to do it? I could not find any valuable answers by Googling. I could not find any proper documentation also in Apple Sites.
    Is there any tools that can be used to perform these? I don't want to use the UI. Please, help me out.

    The Mac App Store is not appropriate for command line tools. You can use any language you want.

  • I just updated to iTunes 11. This version will not allow me to change info on any songs. Have always use "command i" with previous versions. Anyone else experiencing this problem? A solution?

    I just updated to iTunes 11. This version will not allow me to change info on any songs. Have always use "command i" with previous versions. Anyone else experiencing this problem? A solution?

    Hey! I had the same problem you did just today when I was trying to get my second iPhone to sync. What you need to do with music or anything extra that you doing you have to creat a second playlist or picture or anything that you would like to use, so that you can add to the second device that you are going to be using. I am not sure if that will help but it helped me out a lot!! Good luck!

Maybe you are looking for

  • Can I get my laptop to connect via HDMI to mini display with iMac midi2011

    I want to use as display my iMac( 27" midi 2011), connecting it with laptop HDMI port

  • Error installing MS Project Pro for Office 365

    I have paid for a subscription to MS Project Pro for Office 365, however, when I try to install the product I am getting an Error 3-4 "Something went wrong".  I have a feeling that it has something to do with the fact that I have Office 365 already i

  • Ipodmini--error 1417/1418 and no music

    when i plug in my ipod it connects, but when i try and update it says error 1417 - if i try and restore it says 1418, SO CONFUSED! also, when i try to play music after its unhooked, it just skips thru each song per second going from one to the other.

  • Dvt:hierarchyViewer FeaturesOff option in 11.1.1.3

    Hi, I am using Jdeveloper 11.1.1.3 .I saw in oracle Rich Client demo that dvt:hierarchyViewer component is having FeaturesOff option(to off some features) and also i saw in this link http://download.oracle.com/docs/cd/E16162_01/apirefs.1112/e17490/ta

  • Disk error on macbook pro

    Hey! I have a macbook pro, and I searched skype help and found this: https://support.skype.com/en-us/faq/FA10143/Why-do-I-get-a-Disk-I-O-error-when-I-try-to-sign-in-to-S... The link shows the exact problem I'm encountering, but the list only concerns