首页 新闻 赞助 找找看

用myeclipse打成的jar包,方法上面出现 红色的 //Error// 下边是被注释的代码

0
悬赏园豆:10 [待解决问题]

public class ChangeBlob
{
public Connection conn = null;
public PreparedStatement pstmt = null;
public ResultSet rs = null;
public Blob blobs = null;

// ERROR //
public String BlobToString(String pat_id, String visit_id)
{
// Byte code:
// 0: aload_0
// 1: invokestatic 32 com/DBUtil:getConn ()Ljava/sql/Connection;
// 4: putfield 18 com/cn/ChangeBlob:conn Ljava/sql/Connection;
// 7: ldc 38
// 9: astore_3
// 10: aload_0
// 11: aload_0
// 12: getfield 18 com/cn/ChangeBlob:conn Ljava/sql/Connection;
// 15: aload_3
// 16: invokestatic 40 com/DBUtil:getPreparedStatement (Ljava/sql/Connection;Ljava/lang/String;)Ljava/sql/PreparedStatement;
// 19: putfield 20 com/cn/ChangeBlob:pstmt Ljava/sql/PreparedStatement;
// 22: aconst_null
// 23: astore 4
// 25: aload_0
// 26: getfield 20 com/cn/ChangeBlob:pstmt Ljava/sql/PreparedStatement;
// 29: iconst_1
// 30: aload_1
// 31: invokeinterface 44 3 0
// 36: aload_0
// 37: getfield 20 com/cn/ChangeBlob:pstmt Ljava/sql/PreparedStatement;
// 40: iconst_2
// 41: aload_2
// 42: invokeinterface 44 3 0
// 47: getstatic 50 java/lang/System:out Ljava/io/PrintStream;
// 50: bipush 50
// 52: invokevirtual 56 java/io/PrintStream:println (C)V
// 55: aload_0
// 56: aload_0
// 57: getfield 20 com/cn/ChangeBlob:pstmt Ljava/sql/PreparedStatement;
// 60: invokeinterface 62 1 0
// 65: putfield 22 com/cn/ChangeBlob:rs Ljava/sql/ResultSet;
// 68: getstatic 50 java/lang/System:out Ljava/io/PrintStream;
// 71: bipush 51
// 73: invokevirtual 56 java/io/PrintStream:println (C)V
// 76: aload_0
// 77: getfield 22 com/cn/ChangeBlob:rs Ljava/sql/ResultSet;
// 80: invokeinterface 66 1 0
// 85: ifeq +18 -> 103
// 88: aload_0
// 89: aload_0
// 90: getfield 22 com/cn/ChangeBlob:rs Ljava/sql/ResultSet;
// 93: ldc 72
// 95: invokeinterface 74 2 0
// 100: putfield 24 com/cn/ChangeBlob:blobs Ljava/sql/Blob;
// 103: new 78 java/io/BufferedInputStream
// 106: dup
// 107: aload_0
// 108: getfield 24 com/cn/ChangeBlob:blobs Ljava/sql/Blob;
// 111: invokeinterface 80 1 0
// 116: invokespecial 86 java/io/BufferedInputStream:<init> (Ljava/io/InputStream;)V
// 119: astore 4
// 121: aload_0
// 122: getfield 24 com/cn/ChangeBlob:blobs Ljava/sql/Blob;
// 125: invokeinterface 89 1 0
// 130: l2i
// 131: newarray byte
// 133: astore 5
// 135: aload 5
// 137: arraylength
// 138: istore 6
// 140: iconst_0
// 141: istore 7
// 143: iconst_0
// 144: istore 8
// 146: goto +10 -> 156
// 149: iload 7
// 151: iload 8
// 153: iadd
// 154: istore 7
// 156: iload 7
// 158: iload 6
// 160: if_icmpge +23 -> 183
// 163: aload 4
// 165: aload 5
// 167: iload 7
// 169: iload 6
// 171: invokevirtual 93 java/io/BufferedInputStream:read ([BII)I
// 174: iload 7
// 176: isub
// 177: dup
// 178: istore 8
// 180: ifge -31 -> 149
// 183: invokestatic 97 java/util/Base64:getEncoder ()Ljava/util/Base64$Encoder;
// 186: aload 5
// 188: invokevirtual 103 java/util/Base64$Encoder:encodeToString ([B)Ljava/lang/String;
// 191: astore 9
// 193: aload 9
// 195: astore 11
// 197: aload 4
// 199: invokevirtual 109 java/io/BufferedInputStream:close ()V
// 202: goto +8 -> 210
// 205: astore 12
// 207: ldc 112
// 209: areturn
// 210: aload 11
// 212: areturn
// 213: astore 5
// 215: aload 4
// 217: invokevirtual 109 java/io/BufferedInputStream:close ()V
// 220: goto +8 -> 228
// 223: astore 12
// 225: ldc 112
// 227: areturn
// 228: ldc 114
// 230: areturn
// 231: astore 10
// 233: aload 4
// 235: invokevirtual 109 java/io/BufferedInputStream:close ()V
// 238: goto +8 -> 246
// 241: astore 12
// 243: ldc 112
// 245: areturn
// 246: aload 10
// 248: athrow
//
// Exception table:
// from to target type
// 197 202 205 java/io/IOException
// 25 197 213 java/lang/Exception
// 215 220 223 java/io/IOException
// 25 197 231 finally
// 213 215 231 finally
// 233 238 241 java/io/IOException
}

public String test()
{
return "Hello Word";
}
}

持久的主页 持久 | 初学一级 | 园豆:192
提问于:2019-07-29 17:42
< >
分享
所有回答(1)
0

你是把jar项目导入出现红色的线吗?如果是这样试一试Ctrl+Shift+O自动导入所需的jar包试一下

键盘小侠 | 园豆:175 (初学一级) | 2019-08-07 16:46

解决这,是因为反编译工具版本的问题,不支持jdk1.8以上的,换了高版本的可以了

支持(0) 反对(0) 持久 | 园豆:192 (初学一级) | 2019-08-07 17:03
清除回答草稿
   您需要登录以后才能回答,未注册用户请先注册