Reputation: 99
The situation is : I got the Kafka project properly, and run the "quick start" with Linux command line, there is no problem. Then I build a Scala project(Kafka is in Scala) and import the source code in the /core directory, put the packages in the build path, and there are errors, so I tried to just import the packages in main/ Here is the directory of core:
[email protected]/core$ tree -L 2
.
├── lib
├── lib_managed
│ └── scala_2.8.0
├── src
│ ├── **main**
│ └── test
└── target
└── scala_2.8.0
After the import, here is the situation:There are scala and java files in the project, the error log says the java files and some of the scala files could not be found which are really imported in the project. What should I do with the project? How to import the scala java mixed project correctly?
Upvotes: 1
Views: 1081
Reputation: 630
I was able to import the kafka project in Scala IDE for Eclipse without too much problem.
What I used:
kafka is configured to be cross-compile against multiple versions of Scala 2.8 and 2.9. To generate the files needed by Eclipse for Scala 2.9, use the following command:
./sbt "++2.9.2 eclipse"
Then use the normal File > Import > General > Existing Project in Workspace
command to import the projects.
Upvotes: 1