1

I think I'm making a simple mistake here, but I can't get Frege to find any classes outside of the local Eclipse project.

I have a working non-trivial Java project (that's not mine), that I do not want to modify. I want to have a new clean Frege enabled project that makes use of classes from the original project.

I tried marking the original project as a dependency of my Frege project, and I tried packaging the original project into a JAR, and listing the JAR as an external dependency of the Frege project. In both cases, a Java file in the Frege project can access the classes, but the Frege compiler says "class org.foo.bar.Class is not a known Java class". This seems like a bug, but I am not confident that I have not missed a simple configuration step.

I have not tried setting arguments in the project configuration as I wouldn't know what to set.

I did quickly discover that I can make a new Java file in the Frege project with a blank subclass of whatever class I need and use that in a Frege file. I have successfully compiled and run a simple program like this. The program just makes a new object, gets a field, and prints the correct value, so I believe my Frege is installed and working properly.

More info:

  • Eclipse Luna 4.4.0
  • Java 7
  • No Maven
  • Official eclipse-ferge plugin installed through Eclipse
4

1 回答 1

2

将您的库列在构建路径和“引用库”下就足够了。您最近的评论表明编译器确实找到了有问题的类。

但是,当您打开编辑器选项卡时,它不会注意到更改的依赖项。此外,特别是在最近的 Eclipse 版本中,我观察到有时无法正确清理已解决的错误标记。

请关闭显示错误错误的编辑器选项卡,然后重新打开它。

于 2016-05-07T22:50:37.233 回答