0

Similar to this question,

Troubles with importing java package to scala project (IntelliJ 10.5.2)

how do I add a java project I have created into a scala project?

3
  • Why is this tagged with eclipse and intellij-idea? Commented Oct 24, 2014 at 2:37
  • What do you mean by "Adding Java Project to my Scala Project"? Is it in the IDE? Is it in the build tool? What IDE & Build tool are you using? Commented Oct 24, 2014 at 7:45
  • @roterl I have other projects with important functionality and other utilities that I have imported as a maven project. I want to be able to reference the classes from these imported maven java projects in my scala project. Commented Oct 24, 2014 at 13:26

1 Answer 1

1

If you selected "Scala project with SBT" sbt shares a common directory structure with maven, so if you lay things out correctly according to the way SBT / Maven expect (See http://www.scala-sbt.org/0.13/tutorial/Directories.html), then you should be able to add dependencies to the SBT file (you'll need to read up on the SBT docs), then if you do that you can just click on build.sbt and "synchronize" with the Intellij idea project to import Jar / Maven dependencies. (Or alternately you may be able to move your jars to the lib directory).

You'll just need to copy your java code to the right directories.

Hope that helps.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.