does your os support gb2312 or had you installed chinese enviroment in your os?please check
echo $LANG
or 
echo $LANGUAGE

解决方案 »

  1.   

    建议编译时,使用参数-encoding gb2312试试看.
      

  2.   

    response.setContentType(  "image/jpeg;charset=8859_1  ");
      

  3.   

    response.setContentType(  "image/jpeg;charset=8859_1  ");  
    有什么用?
      

  4.   

    学习中~~~~~~~我还没在linux下用过JB呢
      

  5.   

    是不是你的linux不支持中文编码,用下面的程序看看你的系统编码file.encoding是什么:public class PoorChinese {    public static void main(String[] args) {        System.getProperties().list(System.out);    } }
      

  6.   

    public class PoorChinese {    public static void main(String[] args) {        System.getProperties().list(System.out); 
           System.out.println("OKOK");
           System.out.println("中文快出来");
              } }能看到中文呀
      

  7.   

    //package scs;
    import java.io.*;
    public class MyUtil
    {
    //
    // 将GB2312码的字符串s转成Unicode码并返回
    //
    public static String gb2312ToUnicode(String s) {
    try {
    return new String(s.getBytes("ISO8859_1"), "GB2312");
    }
    catch (UnsupportedEncodingException uee) {
    return s;
    }
    }//
    // 将Unicode码的字符串s转成GB2312码并返回
    //
    public static String unicodeToGB2312(String s) {
    try {
    return new String(s.getBytes("GB2312"), "ISO8859_1");
    }
    catch (UnsupportedEncodingException uee) {
    return s;
    }
    }}管你什么系统,照单全收!!!