Netlogo launched from terminal does not work in subdirectory












1















I have a CentOS server installed with the last versión of the OS.



Simulation launched like this:



java -Xmx1024m -Dfile.encoding=UTF-8 -cp netlogo-6.0.4.jar 
org.nlogo.headless.Main
--model ~/C1/FSA_cont_8_sim.nlogo
--experiment test-H-3x3p
--table ~/C1/Hight_3x3.csv
--threads 6 &


from NetLogo 6.0.4/app directory have no problems.
However, it does not work if I place the model in a subdirectory,



java -Xmx1024m -Dfile.encoding=UTF-8 -cp netlogo-6.0.4.jar 
org.nlogo.headless.Main
--model ~/C1/3p/FSA_cont_8_sim.nlogo
--experiment test-H-3x3p
--table ~/C1/3p/Hight_3x3.csv
--threads 6 &


result the following error message:



Exception in thread "main" java.io.FileNotFoundException: /home/plopezmp/C1/3p/Hight_3x3.csv (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
at java.io.FileWriter.<init>(FileWriter.java:63)
at org.nlogo.headless.Main$.path2writer$1(Main.scala:64)
at org.nlogo.headless.Main$.parseArgs(Main.scala:94)
at org.nlogo.headless.Main$.main(Main.scala:12)
at org.nlogo.headless.Main.main(Main.scala)


Probably I am missing something.



It seems like the Java is unable to find the path of the where the model is located.










share|improve this question

























  • The error message indicates it's having trouble finding the .csv file, not the .nlogo file.

    – Seth Tisue
    Nov 27 '18 at 17:28











  • @SethTisue You are right. I run Netlogo from the /app directory where Netlogo jar is located. The .nlogo file is in ~/C1/ but if I save the .nlogo model in a subdirectory ~/C1/s1 is when the error occurs.

    – user1993416
    Nov 27 '18 at 21:05


















1















I have a CentOS server installed with the last versión of the OS.



Simulation launched like this:



java -Xmx1024m -Dfile.encoding=UTF-8 -cp netlogo-6.0.4.jar 
org.nlogo.headless.Main
--model ~/C1/FSA_cont_8_sim.nlogo
--experiment test-H-3x3p
--table ~/C1/Hight_3x3.csv
--threads 6 &


from NetLogo 6.0.4/app directory have no problems.
However, it does not work if I place the model in a subdirectory,



java -Xmx1024m -Dfile.encoding=UTF-8 -cp netlogo-6.0.4.jar 
org.nlogo.headless.Main
--model ~/C1/3p/FSA_cont_8_sim.nlogo
--experiment test-H-3x3p
--table ~/C1/3p/Hight_3x3.csv
--threads 6 &


result the following error message:



Exception in thread "main" java.io.FileNotFoundException: /home/plopezmp/C1/3p/Hight_3x3.csv (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
at java.io.FileWriter.<init>(FileWriter.java:63)
at org.nlogo.headless.Main$.path2writer$1(Main.scala:64)
at org.nlogo.headless.Main$.parseArgs(Main.scala:94)
at org.nlogo.headless.Main$.main(Main.scala:12)
at org.nlogo.headless.Main.main(Main.scala)


Probably I am missing something.



It seems like the Java is unable to find the path of the where the model is located.










share|improve this question

























  • The error message indicates it's having trouble finding the .csv file, not the .nlogo file.

    – Seth Tisue
    Nov 27 '18 at 17:28











  • @SethTisue You are right. I run Netlogo from the /app directory where Netlogo jar is located. The .nlogo file is in ~/C1/ but if I save the .nlogo model in a subdirectory ~/C1/s1 is when the error occurs.

    – user1993416
    Nov 27 '18 at 21:05
















1












1








1








I have a CentOS server installed with the last versión of the OS.



Simulation launched like this:



java -Xmx1024m -Dfile.encoding=UTF-8 -cp netlogo-6.0.4.jar 
org.nlogo.headless.Main
--model ~/C1/FSA_cont_8_sim.nlogo
--experiment test-H-3x3p
--table ~/C1/Hight_3x3.csv
--threads 6 &


from NetLogo 6.0.4/app directory have no problems.
However, it does not work if I place the model in a subdirectory,



java -Xmx1024m -Dfile.encoding=UTF-8 -cp netlogo-6.0.4.jar 
org.nlogo.headless.Main
--model ~/C1/3p/FSA_cont_8_sim.nlogo
--experiment test-H-3x3p
--table ~/C1/3p/Hight_3x3.csv
--threads 6 &


result the following error message:



Exception in thread "main" java.io.FileNotFoundException: /home/plopezmp/C1/3p/Hight_3x3.csv (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
at java.io.FileWriter.<init>(FileWriter.java:63)
at org.nlogo.headless.Main$.path2writer$1(Main.scala:64)
at org.nlogo.headless.Main$.parseArgs(Main.scala:94)
at org.nlogo.headless.Main$.main(Main.scala:12)
at org.nlogo.headless.Main.main(Main.scala)


Probably I am missing something.



It seems like the Java is unable to find the path of the where the model is located.










share|improve this question
















I have a CentOS server installed with the last versión of the OS.



Simulation launched like this:



java -Xmx1024m -Dfile.encoding=UTF-8 -cp netlogo-6.0.4.jar 
org.nlogo.headless.Main
--model ~/C1/FSA_cont_8_sim.nlogo
--experiment test-H-3x3p
--table ~/C1/Hight_3x3.csv
--threads 6 &


from NetLogo 6.0.4/app directory have no problems.
However, it does not work if I place the model in a subdirectory,



java -Xmx1024m -Dfile.encoding=UTF-8 -cp netlogo-6.0.4.jar 
org.nlogo.headless.Main
--model ~/C1/3p/FSA_cont_8_sim.nlogo
--experiment test-H-3x3p
--table ~/C1/3p/Hight_3x3.csv
--threads 6 &


result the following error message:



Exception in thread "main" java.io.FileNotFoundException: /home/plopezmp/C1/3p/Hight_3x3.csv (No such file or directory)
at java.io.FileOutputStream.open0(Native Method)
at java.io.FileOutputStream.open(FileOutputStream.java:270)
at java.io.FileOutputStream.<init>(FileOutputStream.java:213)
at java.io.FileOutputStream.<init>(FileOutputStream.java:101)
at java.io.FileWriter.<init>(FileWriter.java:63)
at org.nlogo.headless.Main$.path2writer$1(Main.scala:64)
at org.nlogo.headless.Main$.parseArgs(Main.scala:94)
at org.nlogo.headless.Main$.main(Main.scala:12)
at org.nlogo.headless.Main.main(Main.scala)


Probably I am missing something.



It seems like the Java is unable to find the path of the where the model is located.







java netlogo






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 23 '18 at 16:36







user1993416

















asked Nov 23 '18 at 11:03









user1993416user1993416

317112




317112













  • The error message indicates it's having trouble finding the .csv file, not the .nlogo file.

    – Seth Tisue
    Nov 27 '18 at 17:28











  • @SethTisue You are right. I run Netlogo from the /app directory where Netlogo jar is located. The .nlogo file is in ~/C1/ but if I save the .nlogo model in a subdirectory ~/C1/s1 is when the error occurs.

    – user1993416
    Nov 27 '18 at 21:05





















  • The error message indicates it's having trouble finding the .csv file, not the .nlogo file.

    – Seth Tisue
    Nov 27 '18 at 17:28











  • @SethTisue You are right. I run Netlogo from the /app directory where Netlogo jar is located. The .nlogo file is in ~/C1/ but if I save the .nlogo model in a subdirectory ~/C1/s1 is when the error occurs.

    – user1993416
    Nov 27 '18 at 21:05



















The error message indicates it's having trouble finding the .csv file, not the .nlogo file.

– Seth Tisue
Nov 27 '18 at 17:28





The error message indicates it's having trouble finding the .csv file, not the .nlogo file.

– Seth Tisue
Nov 27 '18 at 17:28













@SethTisue You are right. I run Netlogo from the /app directory where Netlogo jar is located. The .nlogo file is in ~/C1/ but if I save the .nlogo model in a subdirectory ~/C1/s1 is when the error occurs.

– user1993416
Nov 27 '18 at 21:05







@SethTisue You are right. I run Netlogo from the /app directory where Netlogo jar is located. The .nlogo file is in ~/C1/ but if I save the .nlogo model in a subdirectory ~/C1/s1 is when the error occurs.

– user1993416
Nov 27 '18 at 21:05














0






active

oldest

votes












Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53445479%2fnetlogo-launched-from-terminal-does-not-work-in-subdirectory%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes
















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53445479%2fnetlogo-launched-from-terminal-does-not-work-in-subdirectory%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







這個網誌中的熱門文章

Xamarin.form Move up view when keyboard appear

Post-Redirect-Get with Spring WebFlux and Thymeleaf

Anylogic : not able to use stopDelay()