ObjectiveSql icon indicating copy to clipboard operation
ObjectiveSql copied to clipboard

Remove `com.sun` Dependency

Open atkawa7 opened this issue 5 years ago • 10 comments

atkawa7 avatar Jan 02 '21 06:01 atkawa7

Hi, in Java 1.8, tools of package 'com.sun' is required, the ObjectiveSQL minimum supported version is 1.8

catchex avatar Jan 02 '21 06:01 catchex

You can use the alternative javax.lang.model* and javax.tools.* classes instead of calling com.sun packages

atkawa7 avatar Jan 02 '21 06:01 atkawa7

What you said should be right, I should given bytecode version while project deploy. But Java 8 users may have problems

catchex avatar Jan 02 '21 06:01 catchex

I should verify it carefully and release a new version, thanks for you reply.

catchex avatar Jan 02 '21 07:01 catchex

On a side note I was looking at another library that does similar things it seems they do not depend on tools.

https://github.com/google/error-prone/blob/master/check_api/pom.xml https://github.com/google/error-prone/blob/master/check_api/src/main/java/com/google/errorprone/util/ASTHelpers.java

-        <dependency>
-            <groupId>com.sun</groupId>
-            <artifactId>tools</artifactId>
-            <version>1.0</version>
-            <scope>system</scope>
-            <systemPath>${java.home}/../lib/tools.jar</systemPath>
-            <optional>true</optional>
-        </dependency>

atkawa7 avatar Jan 02 '21 07:01 atkawa7

Is it possible to see the code that is generated when you inject it via annotation processor?

atkawa7 avatar Jan 02 '21 07:01 atkawa7

That's it! because JDK 1.8 is the base version in my project, I can understand your suggestion, this should be a mistake of mine

catchex avatar Jan 02 '21 07:01 catchex

@catchex Did you win?

atkawa7 avatar Jan 06 '21 12:01 atkawa7

I had get your suggestion, sorry, codes have not been submitted

catchex avatar Jan 06 '21 12:01 catchex

@catchex ping

atkawa7 avatar Nov 19 '21 08:11 atkawa7