It is not possible to compile well by using lombok
Because I am Japanese, poor English is used. Please acknowledge it. It is not possible to compile well by using lombo开发者_如何学编程k. (source site is http://projectlombok.org/download.html) Lombok installed Eclipse was compiled was decompiled with jad.
import java.sql.*;
import lombok.Cleanup;
public class TEST {
public static void main(String[] args) throws Exception {
Connection conn = null;
// Statement
@Cleanup Statement cstmt = null;
cstmt = conn.prepareCall("{call 11111.22222(?,?,?,?,?,?,?,?,?)}");
// Execute
cstmt.executeBatch();
//write file code goes here
}
}
import java.sql.Connection;
import java.sql.Statement;
import java.util.Collections;
import java.util.List;
public class TEST
{
public static void main(String[] args)
throws Exception
{
Connection conn = null;
Statement cstmt = null;
try { cstmt = conn.prepareCall("{call 11111.22222(?,?,?,?,?,?,?,?,?)}");
cstmt.executeBatch();
}
finally
{
if (Collections.singletonList(cstmt).get(0) != null) cstmt.close();
}
}
}
In the compilation result of eclipse, I am a result wanting it. but this under command line compiled result is not match eclipse's result javac -cp lib\lombok.jar src\TEST.java
import java.sql.CallableStatement;
import java.sql.Connection;
import java.sql.Statement;
public class TEST
{
public static void main(String[] paramArrayOfString)
throws Exception
{
Object localObject = null;
CallableStatement localCallableStatement = null;
localCallableStatement = localObject.prepareCall("{call 11111.22222(?,?,?,?,?,?,?,?,?)}");
localCallableStatement.executeBatch();
}
}
I want to acquire same result of eclipse as the compilation result in execution in the command line. How should I do?
OS setting
jdk=1.5
eclipse
jdk=1.5
Lombok requires JDK 1.6 to be used with javac
. However, using Lombok from Eclipse is free of this limitation.
精彩评论