Hello guys, I'm getting an error when I try to exe...
# tornadofx
s
Hello guys, I'm getting an error when I try to execute the app. I have two modules, one for network, and one for views, the behaviour is the follow: 1. If I use `application`plugin, everything works fine 2. If I use
TornadoFX App
run configurations, I get ->
Caused by: java.lang.NoClassDefFoundError: com/sergiocasero/network/ApiService
3. If I use FxLauncer -> Same than 2
I've copied manually all the files to the same module but the error still ocurring
ApiService is an interface with retrofit calls
e
When you say module, are you taking about maven or gradle modules or j9 modules?
c
Intellij modules too
👍 1
e
Hehe, yes 🙂
s
yep sorry
Gradle
I've found "the cause" (or maybe not)
e
@Sergio Casero Yeah?
s
gradlew desktoprun task creates a desktop-0.1.all.jar
This jar size is 16.663KB
But.... TornadoFX config and FxLauncher generates another jar, called "desktop-0.1.jar"
With 734KB size
I think it's because these two taks don't depends on `build`task
e
I know little about Gradle, so I'm not sure what's causing this, but could you try to have all the code in a single module first and verify that that's working perhaps?
s
Yes, I've tried
And right now the error I'm getting is "could not find main class"
e
Did you verify if the main class is indeed in the classpath?
s
Yes, it is
The current error:
Really really rare
gradle build works fine
e
Without seeing your gradle setup this is just guesswork. Can you create a sample with minimal code?
Gotta run out for a bit, back later tonight
s
Ok ok don't worry, thanks 🙂
Will try
OMG I've found the issue
😞 hahahah wtf
The problem is that I was using
implementation
instead of
compile
e
Aha 🙂
n
the correct one is
api
Unless some old plugin looks specifically for compile dependencies
s
I did some tests with
api
@Nikky
But still not working