16
Modding / Re: Misc modding questions that are too minor to warrant their own thread
« on: February 04, 2022, 12:16:49 PM »I tried moving Starsector to my desktop and running the debug, then again as admin, to no avail. Though the error log did look slightly different. Also by run configuration I assume you mean the config I have on IDEA for running the bat file? I'm still very new to all this. Regardless, I will post a screenshot of that. If anything else is needed, let me know. It helps to be specific.
Your debug-starsector.bat is not specifying java.library.path. It should look like this (since you are on Windows, you can just copy/paste the entire thing):Codestart ..\jre\bin\java.exe -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005 -Djava.library.path=native\windows -Xms1536m -Xmx1536m -Xss2048k -Dcom.fs.starfarer.settings.paths.logs=. -Dcom.fs.starfarer.settings.paths.saves=../saves -Dcom.fs.starfarer.settings.paths.screenshots=../screenshots -Dcom.fs.starfarer.settings.paths.mods=../mods -classpath janino.jar;commons-compiler.jar;commons-compiler-jdk.jar;starfarer.res.jar;starfarer.api.jar;starfarer_obf.jar;jogg-0.0.7.jar;jorbis-0.0.15.jar;json.jar;lwjgl.jar;lwjgl_util_applet.jar;jinput.jar;lwjgl_test.jar;log4j-1.2.9.jar;lwjgl_util.jar;fs.sound_obf.jar;fs.common_obf.jar;xstream-1.4.10.jar com.fs.starfarer.StarfarerLauncher
The following option is of particular relevance:Code-Djava.library.path=native\windows
You should also set up a run configuration for attaching a debugger to Starsector. To do this, click + on the top-left of "Run/Debug Configurations" and select "Remote JVM Debug". Use the following settings:
Debugger mode: Attach to remote JVM
Transport: Socket
Host: localhost
Port: 5005
Command line arguments for remote JVM: -agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005
Use module classpath: <your mod>
Before launch: Run another configuration -> run the debug-starsector batch script.
Oooohh, okay. This worked. I was getting confused on the wording in the tutorial. It says "Replace the beginning of the one line in the file as follows:" Key word is replace. I replaced this: "-Djava.library.path=native\windows" with this: "-agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=5005" because I thought something needed to be replaced. Due to the wording of it, but now it makes sense.
Thanks for being patient with my lack of experience with any bat files at all, and also the tip for attaching a debugger.