� 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.

Similar Messages

  • 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.

  • FRM-10142 The Http Listener (Dos Window Does not Stay Open)

    Dear Sir
    URGENT
    When I start OC4J instance its dos window open for few seconds and after that its closed.
    I mean OC4J instance dos window des not staying open at task bar.In oracle 10g forms builder and 11g database
    Please guide me how this problem would be solve...?
    Yassen

    For URGENT questions go right to https://support.oracle.com and file a Prio 1 SR with Oracle Support. For everything else I don't see why your question is more urgent then others.
    Did you check if maybe the port OC4J runs on (8889) is already used by another program (netstat)? Did you check the logfiles?
    cheers

  • 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/

  • Unable to clear DOS window after running JAR

    Hi guys,
    I am trying to write a batch file to launch my JAR, this is because the JAR is on a networked drive, and each user can have a .bat file on their desktop to run it.
    Anyway, when the .bat file is run, the DOS console pops up behind it but I don't want it there,
    How can I make it dissappear after the JAR is launched, or even better, not come up at all?
    I have tried all these to no success.
    call "H:/folder/myApp.jar";
    exit
    call "H:/folder/myApp.jar";
    end
    javaw -jar H:/folder/myApp.jarThanks in advance.

    Why don't you create a shortcut to the jar file?
    Then you won't have a bat or a dos window to close.

  • 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 ;)

  • Starting command line exec without dos window...

    I'm trying to start a console window application under my java swing application with the Runtime.exec(cmd) function.
    A dos window appear during the execution of the application. How to remove the screen echo ?
    Thanks
    SEB

    Hi ollie lord and thank you for your suggestion.
    I tried to use a *.bat file instead but the result was the same. I tried to use the word "start" in the command but nothing more.
    My .bat file is simple:
    start myprogram or myprogram
    ...where myprogram.exe is a win32 console application from Visual C++.
    Is there any option in function Main() in C++ to remove the dos console ?
    I head about the JNI tech. Is it a solution ?
    Thanks
    SEB

  • 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();
      }

  • Call x.exe and write command in opened DOS window

    Hi,
    I am using Labview 10 and Window 7. Just wondering how to use labview to
    1. run x.exe under opened DOS window?
    2. write command in opened DOS window?
    Any commends welcome,
    Thanks,
    Ott

    Please take a look here
    Alejandro | Academic Program Engineer | National Instruments

  • Invoke command in new dos window

    is there any way that i can invoke a command in a new dos window from java application?
    such as
    runtime.exec("dir");
    it will open another dos window, and run dir in it.
    thanks

    it will open another dos window, and run dir in it.This works for me (win 2000):
    Runtime.getRuntime().exec("cmd /c start dir");

  • DOS/Windows command in app server

    I don't know if this is the correct forum.
    I want to know if there is a t-code or report to execute a DOS/Windows command in the application server.
    thanks all in advance.

    Hello Mauro,
    you can define an external command in SM69.
    Regards
    Gregor

  • Command Prompt in DOS Window

    Is it possibe, when running a Swing Application to
    get the command prompt back in order to do other
    things in the background while the application is
    running. (I wouldn't need to close my application in
    order to get the prompt back!)
    If so how would I do that?
    Thank you very much in advance for any help.

    very simple....
    create a batch file and then from dos window say
    start YourFile.bat
    you get your command prompt back...but that will open another prompt window for the applicationm

  • DOS Window in Java Container

    If anybody knows how, I'd appreciate any suggestions on how to present an Interactive DOS window in a JAVA SWING container.

    The escape code approach would only work on DOS windows that are processing ANSI escape sequences. This is something people used to enable all the time back in the pre-Windows days, since it was the only way to do things like clearing screens, setting colours, drawing menus out of text characters, etc. Ansi.sys still exists, at least on Win98 (not sure about NT, 2000, etc.). If you troll through the Microsoft web site or hunt down old books on DOS, you'll be able to find out how to set it up and use it.

  • Any way to close the DOS window ?

    Is there anyway to close the DOS window, after executing a DOS command in a GUI Java program ?
    I keep getting "Please press any key to continue..."..I don't think I can use the System.exit in a GUI Java program?

    Yes.
    Process p = Runtime.getRuntime().exec(...);
    PrintStream out = new PrintStream(p.getOutputStream(), true);
    out.print("a");You get the output stream of that process and print an a (which I guess will work just like you pressed a key). I don't know if there has to be a delay before you write this character. If you send it before it has written "Press a key ..", then it might not work. In this case you can add a line with Thread.sleep(1000); to sleep for 1 sec in this example, just before you execute the print statement. Or you can get the InputStream from the process, and read everything it sends and check if/when you get the "Press a key .." text:
    PrintStream out = new PrintStream(p.getOutputStream(), true);
    BufferedReader br = new BufferedReader(new InputStreamReader(p.getInputStream()));
    String s;
    while ((s = br.readLine()) != null) {
      if (s.startsWith("Press a key")) {
        break;
    out.print("a");something like that..
    There might be cases where you don't get a "Press a key" back if the DOS window is big enough to hold all the information (it is possible to change the buffer for DOS windows so they can hold more than 25 lines).

  • Clearing the DOS Window in Java

    hi
    I want to clear the dos screen using java.
    I saw 2 solutions on the net(given below) , but both did not work. Can someone advise how I can go about doing this ? I'm
    working on Windows2000.
    Thanks in advance.
    Seema
    1. char esc = 27; // ESC code
    String clear = esc + "[2J" // note case
    System.out.print(clear); // Dos screen should be cleared
    2. Runtime.getRuntime().exec( "cmd.exe /c cls" ) ;

    The escape code approach would only work on DOS windows that are processing ANSI escape sequences. This is something people used to enable all the time back in the pre-Windows days, since it was the only way to do things like clearing screens, setting colours, drawing menus out of text characters, etc. Ansi.sys still exists, at least on Win98 (not sure about NT, 2000, etc.). If you troll through the Microsoft web site or hunt down old books on DOS, you'll be able to find out how to set it up and use it.

Maybe you are looking for

  • 2 ipods on 1 PC?

    Hi everyone, I have just bought an ipod for my partner so now we both have one, but neither of us can figure out how we can have seperate libraries as we listen to different music? Firstly, we tried installing the 2nd disk thinking we would end up wi

  • What can I do when all of my printers have disappeared and can't be updated?

    I have lost all my printers.  They no longer show up when I go to select a printer.  I've tried going to Epson to reinstall drivers, however, they refer me back to apple update software.  Apple runs the scan and says there are not updates.  I've been

  • Lost the driver to my hp photosmart plus b209a when up grade for windows 7 was done installing

    Well a few days ago my computer did an automatic upload for windows 7...Now I have no driver for my HP Photosmart Plus B209a all-in-one printer...I lost the disk like a year ago...So I went on HP and downloaded the full driver and installed it..well

  • 11.7.700.169 Error: "Adobe Flash Player 11.7 r700 has stopped working" -- HELP!!!

    I have encountered this problem many times now. Way to many to be anywhere near happy about. I can understand having an issue with it and looking up stuff on my smart phone instead. But this program is also affecting my online game World of Warcraft.

  • Migration from 3.5.1 to 9.3.0

    Hi, I am also trying to migrate from 3.5.1 to 9.30 and getting an error unsuceesful log on. I have instralled 3.5.1 on a different machine Windows server 2003 and Oracle 9i. I ahve installed 9.3.0 on other machine and Oracle 10G. While creating the a