0

I recently switched from eclipse to Intellij and hence I am new new to it. Till a day before I was successfully able to compile my java program (maven) and generate output. The program uses multiple external packages and also Rserve to connect to R. However, when I tried to compile it today, it does not recognize any of the external packages and gives multiple errors like:

Error:(25, 26) java: package org.rosuda.REngine does not exist
Error:(22, 53) java: package org.apache.commons.math3.optimization.fitting does not exist

On looking through the project structure, in the dependencies tab, it shows something like the following image. Can someone please help me finding the issue here? enter image description here

enter image description here

novicegeek
  • 773
  • 2
  • 9
  • 29
  • Do you have any non-standard configuration in maven that is not in your `$home/.m2/settings.xml` file? Have you changed your `mvn script / mvn.bat` at all? Are you behind a firewall (if yes have you configured it in intellij? Have you imported the project from them pom rather than from the eclipse project file? Intellij integration with maven is far more superior than in eclipse, so it must be something very particular to your setup. – Augusto Oct 04 '14 at 08:10
  • I don't have any such non standard configuration in maven, nor have I made any changes to the mvn script. I had imported the project earlier from the eclipse file. Moreover, the thing is I was working with this project in IntelliJ from past 3-4 weeks and there were no issues and the program was successfully getting compiled. Another thing, I have my project on the server. When I created a local copy of the project, except for the package Rserve, IntelliJ could recognize all the other external packages. – novicegeek Oct 04 '14 at 08:16
  • 1
    Try re-importing the project from the pom file, that will trigger intellij to redownload any dependencies and will clear any stale configuration that might have been set from eclipse. – Augusto Oct 04 '14 at 08:19
  • Great! I reimported the project using the pom.xml and it now shows all the dependencies under the dependencies tab. However, there is still the issue with this R package which I am using. I am importing this: import org.rosuda.REngine.REXPMismatchException; import org.rosuda.REngine.REngineException; And I am unable to import this package. It shows cannot resolve symbol 'rosuda' and hence I am unable to compile the program at all. Do I need to specify the path somewhere? – novicegeek Oct 04 '14 at 08:44
  • I added the R libraries under the dependencies tab, and everything works fine now! – novicegeek Oct 04 '14 at 09:03

0 Answers0