Hello all.
I'm having some trouble getting my mod to work/compile properly.
I've followed this tutorial (
https://fractalsoftworks.com/forum/index.php?topic=10057.0 ), and used Sundog's Fuel Siphoning mod (
https://fractalsoftworks.com/forum/index.php?topic=15272.0 ) as a reference.
Whenever I try and play Starsector, with my mod loaded, it crashes when the loading bar reaches its end.
I'm using intelliJ IDEA 15.0.6, my JDK is "jdk1.7.0_80".
Under File->Settings<Build, Execution, Deployment->Compiler->Java Compiler, the Project Bytecode is set to 1.7.
Under File->Project Structure->Project, the Project SDK is set to 1.7.
When attempting to make my Jar file*, I am unable to select my class as the Main Class
(Selecting it and clicking OK pops us a message saying "*class-name* is not acceptable")
To get around that, I left the Main Class field of the Create JAR from Modules window empty. From that I do get a JAR file (which contains my actual JAR file, and the Starsector api files). What I've been doing is extracting this with 7zip, then using the JAR file in that.
When I launch Starsector, I am able to see my mod in the mod-list and can enable it.
The error message that appear is:
Fatal: Error compiling
[supplies_from_planets.campaign.abilities.SuppliesFromPlanets]
cause: supplies_from_planets.campaign.abilities.SuppliesFromPlanets
Chack starsector.log for more info
And the log file has this:
4086 [Thread-4] ERROR com.fs.starfarer.combat.CombatMain - java.lang.RuntimeException: Error compiling [supplies_from_planets.campaign.abilities.SuppliesFromPlanets]
java.lang.RuntimeException: Error compiling [supplies_from_planets.campaign.abilities.SuppliesFromPlanets]
at com.fs.starfarer.loading.scripts.ScriptStore$3.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.ClassNotFoundException: supplies_from_planets.campaign.abilities.SuppliesFromPlanets
at org.codehaus.janino.JavaSourceClassLoader.findClass(JavaSourceClassLoader.java:179)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
I don't know what I'm doing wrong, but I'm guessing I've set up my IDE wrong? Or I've forgotten to do something? I don't know.
*File->Project Structure->Artifacts->+->Create JAR from Modules