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

Advice on build #2

Open
chu1248 opened this issue Oct 26, 2017 · 2 comments
Open

Advice on build #2

chu1248 opened this issue Oct 26, 2017 · 2 comments

Comments

@chu1248
Copy link

chu1248 commented Oct 26, 2017

Hi,

This application looks fun to me. May I know is there any build configuration / guidance? I am stucked on how to build... Or is there any prebuilt jar file to try out?

Thanks,
Chris

@Ryan1729
Copy link

Ryan1729 commented Jan 21, 2019

I haven't done scala before but I wanted to try this too. I looked up some stuff and managed to figure out that if you install the Java sdk and sbt (a scala build tool) then you can then run sbt run in a terminal. But then it can't find the main class. So I did some more research and found if you change the src directory to look like this:

src
└───main
    └───scala
        ├───acquire
        │   ├───engine
        │   ├───gui
        │   │   ├───acquireUI
        │   │   └───newGameScreen
        │   └───state
        │       └───impl
        ├───mcts
        └───theatre
            ├───core
            └───ui

then run sbt run in the directory outside the src directory, then the app starts up.

Running sbt compile makes a jar called acquire_2.12-0.1.0-SNAPSHOT.jar, but if I run it then all it does is make a blank log.out file and a log.err file with the following contents:

Exception in Application constructor
Exception in thread "main" java.lang.RuntimeException: Unable to construct Application instance: class acquire.gui.acquireUI.AcquireTheatre
	at com.sun.javafx.application.LauncherImpl.launchApplication1(LauncherImpl.java:907)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication$154(LauncherImpl.java:182)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.NoClassDefFoundError: scala/Option
	at java.lang.Class.getDeclaredConstructors0(Native Method)
	at java.lang.Class.privateGetDeclaredConstructors(Unknown Source)
	at java.lang.Class.getConstructor0(Unknown Source)
	at java.lang.Class.getConstructor(Unknown Source)
	at com.sun.javafx.application.LauncherImpl.lambda$launchApplication1$160(LauncherImpl.java:818)
	at com.sun.javafx.application.PlatformImpl.lambda$runAndWait$174(PlatformImpl.java:326)
	at com.sun.javafx.application.PlatformImpl.lambda$null$172(PlatformImpl.java:295)
	at java.security.AccessController.doPrivileged(Native Method)
	at com.sun.javafx.application.PlatformImpl.lambda$runLater$173(PlatformImpl.java:294)
	at com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
	at com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
	at com.sun.glass.ui.win.WinApplication.lambda$null$147(WinApplication.java:177)
	... 1 more
Caused by: java.lang.ClassNotFoundException: scala.Option
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	... 13 more

@chu1248
Copy link
Author

chu1248 commented Feb 18, 2019

Thanks. That helps.

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