LuciferYang commented on PR #41943:
URL: https://github.com/apache/spark/pull/41943#issuecomment-1632866561

   I think the current issue is that we may have to specify the Java version 
through `-Djava.version` when using other Java versions for Maven build&test
   
   I do the following experiments:
   
   1. hardcode the `java.version` in `pom.xml` to 11
   2. maven build using Java 17:
   
   ```
   build/mvn clean install -DskipTests -Pscala-2.13
   ```
   
   this will failed due to 
   
   ```
   [WARNING] [Warn] : [deprecation @  | origin= | version=] -target is 
deprecated: Use -release instead to compile against the correct platform API.
   [ERROR] [Error] 
/Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/serializer/SerializationDebugger.scala:71:
 object security is not a member of package sun
   [ERROR] [Error] 
/Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/storage/StorageUtils.scala:27:
 object nio is not a member of package sun
   [ERROR] [Error] 
/Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/storage/StorageUtils.scala:206:
 not found: type DirectBuffer
   [ERROR] [Error] 
/Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/storage/StorageUtils.scala:213:
 not found: type DirectBuffer
   [ERROR] [Error] 
/Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/storage/StorageUtils.scala:216:
 not found: type DirectBuffer
   [ERROR] [Error] 
/Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/storage/StorageUtils.scala:236:
 not found: type DirectBuffer
   [ERROR] [Error] 
/Users/yangjie01/SourceCode/git/spark-mine-13/core/src/main/scala/org/apache/spark/storage/StorageUtils.scala:27:
 Unused import
   ```
   
   We have to use the following command to build using Java 17 now(Current 
usage in Github action):
   
   ```
   build/mvn clean install -DskipTests -Pscala-2.13 -Djava.version=17
   ```


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to