acquire icon indicating copy to clipboard operation
acquire copied to clipboard

Advice on build

Open chu1248 opened this issue 7 years ago • 2 comments

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

chu1248 avatar Oct 26 '17 10:10 chu1248

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

Ryan1729 avatar Jan 21 '19 04:01 Ryan1729

Thanks. That helps.

chu1248 avatar Feb 18 '19 09:02 chu1248