0

I have the following script (run) with starts a project:

#!/bin/sh

######## ENTER PATH TO YOUR JAVA, JAVAC AND JAR BINARIES HERE
export JAVA_HOME=/usr/local/lib/jdk-8u25
export _JAVA_OPTIONS=
export PATH=${JAVA_HOME}/bin:${PATH}

java="java"

exec ${java} -server -d64 -XX:+UseParallelGC -Xms4G -Xmx4G -jar build/experiments.jar $*

typing ./run 8 5 5 -ins50 -del50 -keys1048576 -prefill -file-data-temp.csv starts the project.
Using this post I managed to run the code from intellij, but because it see's it as an external shell script, debugging the code is impossible.
how can I make the script (run) as the "root" file of the project?

DsCpp
  • 2,259
  • 3
  • 18
  • 46
  • You should not have to do this. Set up IntelliJ to point to the proper binaries and run the JAR inside IntelliJ. You're making this too hard. – duffymo Dec 10 '18 at 16:35
  • @duffymo: It *could* be the case that this script is what runs it in production. I don't disagree with your statement here since I too would just use IntelliJ for this, though. – Makoto Dec 10 '18 at 16:39
  • 1
    This script doesn't do anything which can't be expressed as an IntelliJ run configuration. Simply copy the options to the "VM options" field of an IntelliJ run configuration and specify the module corresponding to the contents of the .jar file. – yole Dec 10 '18 at 16:47
  • Running in production is not running in the IDE. Should be possible to set up properly in IntelliJ without having to resort to this. – duffymo Dec 10 '18 at 16:50
  • Again - not disagreeing here. I am in full agreement with you @duffymo. Just saying that there *may* be valid use cases to do it like this. – Makoto Dec 10 '18 at 16:51
  • Nope, none that I can think of. – duffymo Dec 10 '18 at 16:54

0 Answers0