How to read compiler msgs in DOS window?

Hi,
I'm just starting java programming and I'm doing the compilation in a DOS window. However it doesn't scroll. What do you guys do when the error messages go off the top of the screen?
Steve

Hello Steve,
You didn't say which operating system you are running, But I suspect that you are running either Windows/95 or Windows/98. Normally the output from a command run in a DOS window goes to standard output. So when you list the files in a directory with the 'dir' command the output can be redirect with the greater than sign. As in:
C:\>dir > dirlist.txt
The trouble that you may encounter (if you are running Windows/95 or Windows/98) is: The error messages from javac are NOT sent to standard output (stdout), but are sent to standard error (stderr) instead. On some Windows operating systems, notably Windows/95 and Windows/98 there is no support for redirecting output from standard error. Windows/NT does provide support for redirecting output from standard error.
Redirecting the standard error output is more difficult; COMMAND.COM doesn't give you any way to do it, but you can either get an add-on utility to do it or use a more powerful shell like 4DOS at:
http://www.jpsoft.com/
that does allow this as a standard feature.
Another solution is to use an IDE such as Forte for Java. See:
http://www.skylit.com/javamethods/faqs/scrollout.html
for another solution.
-Merwyn,
Developer Technical Support,
http://www.sun.com/developers/support.

Similar Messages

  • How to read webarchive files from a windows machine?

    hello
    i had saved some files in webarchive format but i must read them from a computer with windows installed
    there is a way to make it possible?
    or is it possible to open them with textedit and save in another format readable with windows?
    i am not a Mac experienced user so i don't know what to do
    thanks

    Hi
    I find that selecting print from Safari's file menu,
    then Pdf-Save as PDF gives good results. Much
    better than Safari's webarchive format imo. The pdf's
    produced should be useable on any computer
    thank you i will try this solution

  • How to read out License Keys of Windows Software on Macs?

    Hi everyone,
    good day to you all, i doubt that this question really fits into this Topic perfectly but i didn't know where else to post it. I hope that you can help me out with this, i have a problem that i have a number of Macs ranging from Minis to various Books, most of these are fittet out with MS Office Licenses (2004 & 2008) which i all have stored in a locker here but unfortunately some of the Licenses werent labeled and now i don't know how to find out which licence is istalled on which Mac? Do you know of any Software (or any other Solution other then deinstallling all and then reinstalling all ) that would help me out with this?
    Lots of thanks in advance for your help and best wishes from here,
    D. from Munich

    i didn't know where else to post it.
    Microsoft's own forums for their Mac products: http://www.officeformac.com/productforums

  • How can I read ALL the compilation errors in a DOS window?

    On compilation using a DOS window, if the number of errors exceeds the window size, some of the errors disappear off the top of the window and I cannot read them.
    Is there an effective solution to somehow use scrolling of the DOS window or transfer the compilation errors to a file?

    Hey buddy,
    When I first started programming with Java, I wondered the same thing. I have the very best solution for you. This one is waaay easy!!!!
    There is a text editor which will not only color code your text for you, but you can easily configure it to give you the compiler /DOS output for Java. Just go to this website and download the program. Enjoy!
    http://www.textpad.com/

  • � sign in DOS window

    How do you display � sign in DOS window when executing a program - problem has been set by Java Lecturer as extra credit. When using unicode value of 00A3 (Which works in our unix labs) it displays and accented U instead of the desired � sign!
    Any help in gaining that much needed extra credit is much appreciated.
    GAR

    try this
    try{
    OutputStreamWriter osw = new OutputStreamWriter(System.out, "Cp850");
    PrintWriter out = new PrintWriter(osw);
    out.println("�");
    out.flush();
    }catch(Exception e){ System.out.println("aaaaaaaaaagggggh");}
    CP850 is the DOS encoding called "Multilingual (Latin 1)" so it is likely to be what your system uses if you're in Europe. If you're in North America, your DOS encoding is likely to be CP437 ("English"), and perhaps if you're in England too, I don't know. Anyway, in the case of the UK pound symbol it won't matter because it's in the same position in both encodings.

  • Getting rid of Dos Window during "java" call

    Hi All
    I am trying to execute a batch file in windows which internally calls a "java" class file. while executing the class file the batch file launches a dos window in the backgroud..can anyone please tell me how to get rid of that dos window
    Thanks in Advance.
    Regards
    Kiran.R

    Instead of using java command in your batch file, change it to use javaw instead.
    V.V.

  • MS-DOS window

    Hi...
    I run my application from .bat file.
    How can I close the MS-DOS window, immediately after my application is executed?
    Thanks you

    I'm sorry,
    I want to close the window of MS-DOS when my application begins.
    This is my .bat file:
    javaw -classpath ".\jterminal.jar;C:\Archivos de programa\IBM\Informix JDBC Driver 2.21.JC3\lib\ifxjdbc.jar;C:\Archivos de programa\IBM\Informix JDBC Driver 2.21.JC3\lib\ifxlang.jar;C:\jfreereport-0.8.4\lib\bsh-1.2b6.jar;C:\jfreereport-0.8.4\lib\gnujaxp.jar;C:\jfreereport-0.8.4\lib\itext-1.00.jar;C:\jfreereport-0.8.4\lib\jcommon-0.8.5.jar;C:\jfreereport-0.8.4\lib\pixie-0.8.0.jar;C:\jfreereport-0.8.4\lib\poi-2.0-pre3-20030728.jar;C:\jfreereport-0.8.4\jfreereport-0.8.4-demo.jar;" jterminal.App

  • How would I print information to a DOS window?

    Ok so I can get the DOS window running by using this code:
          try{
                       Runtime rt = Runtime.getRuntime();
                       Process child = rt.exec("cmd.exe /c start cmd.exe");
                       child.waitFor();
                   }catch(IOException io){}
                   catch(InterruptedException e) {}but I want to print the information from this code:
    StringBuffer objectString = new StringBuffer("");
    ////some code here//////
    objectString = new StringBuffer(("Customer:\t\t" + customerName + "\n"
                               + "Departure Date:\t" + departureDate + "\n"
                               + "Return Date:\t" + _returnDate));
    ////some code here/////
    objectString.append("\nAirline:\t\t" + airlineBG.getSelection().getActionCommand());
    objectString.append("\nDestination:\t" + destinationBG.getSelection().getActionCommand());
    /////more code. yay//////
    objectString.append("\nPrice:\t\t" + price);
    objectString.append("\nTicket Bought. Have a safe flight!");
    System.out.print(objectString.toString());//print string bufferso how would I print objectString to the DOS window?
    Note: opening the DOS window is in the constructor for the JFrame I am using while printing the StringBuffer is in the actionPerformed implementation.

    masijade. wrote:
    deadmanwalkin wrote:
    no, the program im supposed to be making asks to print ticket information to a DOS window.
    I might have interpreted it wrong and it could be just start from a DOS window using the java File commandWell, study your assignment text. If it does not explicitly state that you must programmatically open a new "DOS window", then simply print your output using System.out.println().Unless he's running Windows 95 still he can't even open a DOS window as there's no more DOS ;)

  • How to make dos window scrollable under win98?

    Hi, I am using win98, every time when I run my GUI application, whenever I got bunch of error message that can not be displayed in one window, I will miss the original error information. Can anyone tell me how to make my dos window scrollable so that I can view all error message.
    Thanks a lot.

    I don't think that you can do this. There is another way, however: When java throws an exception, if it is not caught in your program, it is sent to the standard error, which is the console. You can simply reset this to be a file, so you can read this to get all the error info. Try using the following code in your main method:
      public static void main(String[] arg) {
        try {
          System.setErr(new PrintStream(new FileOutputStream(new File("Errors"))));
          //instantiate your main class here
          MyClass mc=new MyClass(); //or whatever
        } catch (Exception _ex) {     
          System.out.println("An error occurred"); //exception get sent to standard error automatically, so there
                                  //is no real need to catch this exception. However, I use it to display
                                  //a message on the console to let me know an error has occurred.
          System.err.println(_ex.getMessage()); //and finally, print the exception to file
          _ex.printStackTrace();
      }

  • How do you prevent MS-DOS window from appearing during Runtime.exec()?

    The question below was attached to the answer for Question of the Week No. 21. I'm having the same problem. Does anyone know the answer? Put another way does anyone know how javaw does it?
    Fri Dec 18 09:59:52 PST 1998
    rkarasek
    On Windows NT 4.0, how can I prevent CreateProcess()
    from creating a cmd.exe window when using javaw and
    Runtime.exec()? No such cmd.exe window is created if
    instead I run "java" from the command line.
    I have a C++ server named "foo", and have created
    a Java applcation with Swing GUI named "foo.java".
    This GUI captures configuration information and
    then uses Runtime.exec() to start the C++ app, with
    a socket established between the Java app and C++
    app for later communication.
    This is all working fine, and the Java application
    and GUI working as expected. When I run "java foo"
    from either the NT command shell (cmd.exe) or MKS
    Korn shell (sh.exe) the Java application/GUI starts,
    and when it calls Runtime.exec() my C++ process is
    started as what appears to be a child process of the
    "java" process, that is, no cmd.exe window is created
    during the Runtime.exec("foo.exe") call.
    However, when running the same Java application from
    a shortcut on the desktop via "javaw", when I invoke
    Runtime.exec() a cmd.exe window is created before my
    C++ server is started. While things are running
    ok and my Java app can still communicate with my
    C++ server, is there anyway I can prevent this
    cmd.exe window from being created, and instead, have
    my C++ server run as a child process of javaw (or
    an independent process without a cmd.exe)?

    cmd always opens a dos window - use another console interpreter instead or just call the programm directly.
    i.e.
    Runetime.exec("c:\\myprogram.exe");
    OR
    The following demonstrates executing a command without bringing up a popup. import java.io.*;
    public class Test {
      public static void main (String args[]) throws IOException {
        String[] command = {
          "C:\\winnt\\system32\\cmd.exe", "/y", "/c",
          "dir"};
        Process p = Runtime.getRuntime().exec(command);
        InputStream is = p.getInputStream();
        InputStreamReader isr = new InputStreamReader(is);
        BufferedReader br = new BufferedReader(isr);
        String line;
        while ((line = br.readLine()) != null) {
          System.out.println(line);
    }However....
    According to bug number 4244515 in Sun's Bug Parade (http://developer.java.sun.com/developer/bugParade/bugs/4244515.html), javaw doesn't always work without bringing up new window.

  • How to compile a report in windows

    Dear Memebers,
    Generally standard reports contain a lot of user exits as a results of which we cannot compile the reports using reports builder. How can we compile a standard report in windows. I know the syntax which is shown below but how should i proceed.
    REM WINDOWS COMPILE REPORT
    ::compile_report.bat
    cls
    Echo compiling Report .....
    for %%f IN (FAS400.rdf) do RWCON60 userid=apps/apps@test batch=yes source=%%f
    stype=rdffile DTYPE=REPFILE OVERWRITE=yes logfile=log.txt
    ECHO FINISHED COMPILING
    What if i have a report in some directory in windows. Can i mention the path and how do i run the above mentioned commands as a script in windows command prompt.
    I would really appreciate your help. Correct me if i am wrong.
    Thanks
    Sandeep

    for forms:
    REM WINDOWS COMPILE FORMS
    ::compile_forms.bat
    @echo off
    cls
    SET DBConnectString =
    SET /P DBConnectString= Please enter DB connect string (user/password@sid):
    SET workingDirectory =
    SET /P workingDirectory= Enter the directory where FMBs are located (i.e. c:\dev\forms\):
    cd %workingDirectory%
    @echo on
    echo Compiling Forms....
    for /f %%a IN ('dir /b *.fmb') do ifcmp90 module=%%a userid=%DBConnectString% batch=yes
    echo Finished Compiling for reports:
    REM WINDOWS COMPILE FORMS
    ::compile_reports.bat
    @echo off
    cls
    SET DBConnectString =
    SET /P DBConnectString= Please enter DB connect string (user/password@sid):
    SET workingDirectory =
    SET /P workingDirectory= Enter the directory where RDFs are located (i.e. c:\dev\reports\):
    cd %workingDirectory%
    @echo on
    echo Compiling Reports....
    for /f %%a IN ('dir /b *.rdf') do rwconverter userid=%DBConnectString% batch=yes source=%%a stype=rdffile dtype=repfile overwrite=yes logfile=log.txt
    echo Finished Compiling

  • How can i format an external drive so as to read and write from both windows and mac side

    i recently bought a macbook pro and used bootcamp so as to be able to run win7 and mac. I now wish to have an external drive so as to backup and tranfer files between the two os's. Specifically to read and write form either windows or mac. How can I do this?              

    Format it as FAT.

  • How do I read an ibook on a windows pc?

    How do I read an ibook on a windows pc?

    You can't unless the book is one of the public domain books from Project Gutenberg and hence has no copy protection. Commercial iBooks can be read only on iOS devices.
    Regards.

  • How to read touch coordinate in Windows XP?

    I want to develop a LabVIEW application which will read the touch coordinates, in Windows XP.
    For example, the display is 1920x1200 and the touch panel is an integrated part of the display. When I move my finger across the screen, I should be able to log the coordinates, eg. if I put my finger on top left corner of the display, LabVIEW vi should log (0, 0), and (1920, 1200) if I touch the lower right corner. And of course it gets a bit complicated when it comes to specifying the sampling time.
    How to do this in LabVIEW?
    Solved!
    Go to Solution.

    try this
    http://www.krzysztofszewczyk.net
    Attachments:
    mouse.vi ‏11 KB

  • How do i set up the viewer window so I can read the email in the bottom section of the window

    how do i set up the viewer window so I can read the email in the bottom section of the window? Someone sat at my computer and changed it and now I cannot restore it.

    Mail Preferences, Viewing, Use Classic Layout.

Maybe you are looking for