Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Versions #727

Open
toncho11 opened this issue Oct 27, 2017 · 4 comments
Open

Versions #727

toncho11 opened this issue Oct 27, 2017 · 4 comments

Comments

@toncho11
Copy link

toncho11 commented Oct 27, 2017

What versions does Figaro 5.0 require?

scala 2.12.4 ?
jvm 1.8.0.144 ?

I am having some problems:

Exception in thread "main" java.lang.NoSuchMethodError: scala.Product.$init$(Lscala/Product;)V
at com.cra.figaro.language.Name.(Reference.scala:28)
at com.cra.figaro.language.Name$.stringToName(Reference.scala:64)
at Simulator$.(Simulator.scala:11)
at Simulator$.(Simulator.scala)
at Simulator.main(Simulator.scala)

It compiles, but it does not run.

@mreposa
Copy link
Contributor

mreposa commented Oct 30, 2017

Figaro 5.0.0.0 cross-compiles to support both Scala 2.11.8 and 2.12.2 using Java 1.8.

@mreposa
Copy link
Contributor

mreposa commented Oct 30, 2017

The stack trace is helpful, but if it's possible to post the code you're trying to run we'll be able to tell you more because we can attempt to reproduce the problem on our side and debug.

@toncho11
Copy link
Author

Cross-compiles? It is two different fat-jars?

@toncho11
Copy link
Author

toncho11 commented Nov 19, 2017

I got the problem with Figaro 5.0, Scala 2.12 and IntelliJ:

  1. Install Scala 2.12.x within Intellij from File->Project structure->Global Libraries and click on the "+". If you do not find version 2.12 in the list then you need to install it manually from the Scala web-site (Download the Scala binaries for windows). Next you need to point to this installation from the IntelliJ UI after you clicked on the "+".

Unfortunately that does not change the designated SDK for your current project. So you need to:

  1. Re-import your project. Select overwrite every time. Then click on a scala source file and at the top you will be asked to select the Scala SDK. Select 2.12.x. This version will be fixed until you re-import.

  2. Go to File->Project structure->Modules->Dependencies and click on the "+". Select the Figaro 5.0 fat jar file.

  3. For Run Configuration use "Application", not "Scala script"

  4. You can use:

println(util.Properties.versionString)
to see which version of Scala you are using.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants