Fractal Softworks Forum

Please login or register.

Login with username, password and session length
Advanced search  

News:

Starsector 0.97a is out! (02/02/24); New blog post: Simulator Enhancements (03/13/24)

Author Topic: Compiler Run/Build Error: Cannot Find path to starsector.bat -IntelliJ (Solved)  (Read 4445 times)

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile

Getting this error when trying to run the build:

Code
cmd.exe /c "C:/Program Files (x86)/Fractal Softworks/Starsector/starsector-core/starsector.bat"

C:\Program Files (x86)\Fractal Softworks\Starsector>..\jre\bin\java.exe -Djava.library.path=native\windows -Xms1536m -Xmx1536m -Xss1024k -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.2.jar com.fs.starfarer.StarfarerLauncher
The system cannot find the path specified.

Process finished with exit code 1

The file path is obviously intact when I look at it.

My best guess is it might be the Java 1.7 JDK I used as a dependency. I used (x64) out of habit when I think my new system needs (x86) (looking at the file path being called  ::) )

Currently going to see if that works, but any other ideas?
« Last Edit: July 23, 2017, 06:56:51 PM by Morrokain »
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile

The .bat file needs to run from inside the folder it's in, as the path it contains - to the java executable - is relative.

..\jre\bin\java.exe
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile

The .bat file needs to run from inside the folder it's in, as the path it contains - to the java executable - is relative.

..\jre\bin\java.exe


Hm, ok. I haven't moved the file or anything and it should have the same file structure it always has. The built executable jar for the mod is in the base mod directory, are you saying I should move this to match the java.exe structure?


I'm, frankly, winging this based off the basic Mayorate mod plugin after removing all the additional scripts and going off this tutorial: http://fractalsoftworks.com/forum/index.php?topic=10057.0

So, yeah, something could easily have gone wrong as this is a first attempt. But, now when I run the game it doesn't even recognize my mod. lol
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile

I have no idea about the details of what you're doing here :)

But! This thing:

C:\Program Files (x86)\Fractal Softworks\Starsector>..\jre\bin\java.exe

Is just not going to work because the jre/ folder is inside the Starsector/ folder, not one level above it.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile

I have no idea about the details of what you're doing here :)

Just trying to get the mod hooked up to IntelliJ IDEA as a project and compile my eventual scripts to a jar so I can begin advanced work with the tutorial in rules.csv

Right now said scripts do not exist, its just a blank mod plugin for a unique id and a mod_info JSON file.

But! This thing:

C:\Program Files (x86)\Fractal Softworks\Starsector>..\jre\bin\java.exe

Is just not going to work because the jre/ folder is inside the Starsector/ folder, not one level above it.

Ok gotcha. So, the default file structure of starsector/jre somehow got messed up when trying to run the executable? How do I tell it to look in the right place? All I seem to have under configuration options for run is 'working directory', which is set to fractalsoftworks/starsector and 'script', which is set to starsector-core/starsector.bat

Or am I just not understanding what you are saying?    :-[ Sorry if so
Logged

Alex

  • Administrator
  • Admiral
  • *****
  • Posts: 23986
    • View Profile

Alright, we're close I think :)

Set the working directory to starsector-core (plus whatever goes before that) and the script to *just* starsector.bat.

Edit: basically, the script has to run from the directory it's in, since it's got a relative path to java.exe.
Logged

Morrokain

  • Admiral
  • *****
  • Posts: 2143
  • Megalith Dreadnought - Archean Order
    • View Profile

That did it! Working! Thanks a lot!  ;D

I'll also post in the tutorial so others can know to do this. The tutorial says to put the file path in 'script' section.
Logged