Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

dependency (for sun.security.util) of SBT build

Tags:

java

scala

sbt

I am using SBT to build my Scala project. I have also Java code in my project.

When I run the build I constantly get following error:

error: package sun.security.util does not exist [error] import sun.security.util.ObjectIdentifier;

I understand that I need to declare dependency to the sun.security.util, but I don't know what is the dependency I should depend on?

My build.sbt contains:

libraryDependencies ++= Seq("org.springframework" % "spring-dao" % 2.0.8",)

My JDK version is "1.7.0_25". I need to use the sun.security.util package. This link said it is not guaranteed in JDK. How can I declare the dependency to make it work? I mean, What is the name of dependency I should add?

like image 957
user842225 Avatar asked May 15 '15 10:05

user842225


1 Answers

Packages in sun.* are not guaranteed to work everywhere. Thus, it is not recommended to use these packages, unless the JVM running your code is under your control.

Check out http://www.oracle.com/technetwork/java/faq-sun-packages-142232.html for more information.

like image 176
AlexBrand Avatar answered Nov 13 '22 03:11

AlexBrand