Results 1 to 3 of 3
  1. #1
    rovf is offline Member
    Join Date
    Aug 2013
    Posts
    10
    Rep Power
    0

    Question How can I tell 'jar' and 'java' to output the messages in English?

    I'm on Windows 7, with java 1.7.

    When I use 'java' or 'javac', I get messages in English. Example:

    >java -a
    Unrecognized option: -a
    Error: Could not create the Java Virtual Machine.
    Error: A fatal exception has occurred. Program will exit.

    >javac -xxx
    javac: invalid flag: -xxx
    Usage: javac <options> <source files>
    use -help for a list of possible options

    But when I do this with 'jar', I get the messages in German. Example:
    >jar -a
    Ungültige Option: a
    Verwendung: jar {ctxui}[vfm0Me] [jar-file] [manifest-file] [entry-point] [-C dir] Dateien...
    Optionen:
    -c Neues Archiv erstellen
    -t Inhaltsverzeichnis für Archiv auflisten
    ....

    Can I persuade 'jar', to print its messages in English?

  2. #2
    SurfMan's Avatar
    SurfMan is offline Godlike
    Join Date
    Nov 2012
    Location
    The Netherlands
    Posts
    1,983
    Rep Power
    8

    Default Re: How can I tell 'jar' and 'java' to output the messages in English?

    Sounds like there are two JDK's or JRE's mixed up. Use the DOS-command "where" on Windows to see where each command is located:

    C:\Users\SurfMan>where java
    C:\ProgramData\Oracle\Java\javapath\java.exe

    C:\Users\SurfMan>where notepad
    C:\Windows\System32\notepad.exe
    C:\Windows\notepad.exe
    "It's not fixed until you stop calling the problem weird and you understand what was wrong." - gimbal2™ © 2013

  3. #3
    rovf is offline Member
    Join Date
    Aug 2013
    Posts
    10
    Rep Power
    0

    Default Re: How can I tell 'jar' and 'java' to output the messages in English?

    At least javac and jar are picked up from the same directory:

    C:\Users\fisrona\Desktop>where java
    C:\Windows\System32\java.exe
    C:\Program Files\Java\jdk1.7.0_79\bin\java.exe

    C:\Users\fisrona\Desktop>where javac
    C:\Program Files\Java\jdk1.7.0_79\bin\javac.exe

    C:\Users\fisrona\Desktop>where jar
    C:\Program Files\Java\jdk1.7.0_79\bin\jar.exe

    So, this can't be the reason. My guess is that jar.exe derives the output language to be used in a different way than javac does; or, javac is always (by default) producing English messages, while jar somehow tries to guess from the environment the language. My Windows installation in German, so I don't blame jar for producing German messages by default; it's just that I am looking for a way to change this (without completely changing my Windows setup). I have hoped that jar.exe would pay attention to the LANG and LC_ALL environment variables, but it doesn't seem to do so.

Similar Threads

  1. Replies: 0
    Last Post: 09-06-2013, 05:49 PM
  2. Replies: 0
    Last Post: 02-27-2013, 05:42 AM
  3. Replies: 3
    Last Post: 02-07-2013, 08:38 AM
  4. Can't get my JTextArea output thread messages.
    By Azaera in forum New To Java
    Replies: 1
    Last Post: 12-01-2012, 09:32 PM
  5. Replies: 1
    Last Post: 04-03-2011, 11:51 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •