javajedit

how to change the amount of java memory heap for Jason-JEdit generated processes? [Linux]


how to change the amount of java memory heap for Jason-JEdit generated processes?

I'm running code edited in Jason-JEdit, as part of the application a NetLogo process is started, originated by the first one, but a heap size error appears. The main process in Jason-Jedit is:

user 6006 6003 9 19:44 ? 00:00:02 java -Xms256m -Xmx1024m -classpath ~/Jacamo/lib/jacamo.jar:/usr/local/lib/netlogo5.2/NetLogo.jar:. -jar ~/Jason-1.4.2/bin/jedit/jedit.jar

The generated process from Jason-Jedit are:

1-The normal launcher process of the agent

user 6055 6006 11 19:44 ? 00:00:00 /usr/lib/jvm/java-7-oracle/bin/java -classpath ~/Jacamo/lib/ant-launcher.jar org.apache.tools.ant.launch.Launcher -e -f bin/build.xml run

2- The NetLogo lauched process

user 6069 6055 99 19:44 ? 00:00:05 /usr/lib/jvm/java-7-oracle/jre/bin/java -classpath ~/JaCaMo/workingDir:~/JaCaMo/workingDir/bin/classes:~/Jacamo/lib/jason.jar:/usr/local/lib/netlogo5.2/NetLogo.jar jason.infra.centralised.RunCentralisedMAS systemMAS-JNL.mas2j

As it can be seen the generated processes do not have the heap size option: -Xms256m -Xmx1024m, as the first one process does.

I already tried the following: 1) Edit the jason.sh/Jacamo.sh files adding: java -Xms256m -Xmx1024m -classpath [...]

2) Add the variable _JAVA_OPTIONS in the .profile export _JAVA_OPTIONS="-Xms256m -Xmx1024m"

And this works for the main process only, the Jason-Jedit application, but the problem persist in the generated process. Any idea about how to change the settings in JEdit?


Solution

  • I don't think this has anything to do with jEdit itself, as it is just shipped and used as editor and host for the custom plugin the jason project is providing. From a very short look at the plugin code, I'd say it generates an Ant build script that starts the RunCentralisedMAS class and it doesn't inject any jvmargs into this Ant build script. But the build-template.xml file has a commented-out line with jvmargs. So I guess if you search for the build-template.xml file and change it so that the jvmarg are set, it will work for you.