- Blind mode tutorial
lichess.org
Donate

Running JaVaFo on linux command line

Hi. I just downloaded JaVaFo from the web page http://www.rrweb.org/javafo/aum/JaVaFo2_AUM.htm

I am on linux

On that web page the documentation says that, in order to run the javafo command, you have to create a batch file named "javafo.bat" with the following string inside

@java -ea -jar path/to/file/javafo.jar %*

On Windows all goes well, a friend of mine who is on Windows OS is able to run the command "javafo inputfile.txt -p outputfile.txt"

The problem is, according to what I could understand, batch files are NOT for linux (the corresponding file is the shell file .sh)

In my opinion I should convert the string from batch sintax to shell sintax but I am not understanding how and what to change into the string

Did anyone use once JaVaFo on linux and could give me some hints?
@ap87
NOTE: yes .bat files are for Windows and you don't need one. dot jar are cross platform java files.

1. Check if you have java on your machine. typing which java at command line should return something like
/usr/bin/java
if not installed install java via your package manager: yum, apt etc.
2. repeat step one until java is present on your machine
3. change to your home directory: cd
create a directory: mkdir javafo or sudo mkdir javafo
cd javafo

4. download file at http://www.rrweb.org/javafo/current/javafo.jar and place it in ~/javafo
if installed wget can be used to do this:

wget http://www.rrweb.org/javafo/current/javafo.jar

otherwise use your web browser download function

5 download file at

http://www.rrweb.org/javafo/aum/TRFXSample2.txt
and place it in the same directory
6. now run:
java -ea -jar ./javafo.jar ./TRFXSample2.txt -p ~/javafo/out.txt

7. now if it worked:
cat out.txt should output the results to your terminal

all:
which java
cd
mkdir javafo or sudo mkdir javafo
cd javafo
wget http://www.rrweb.org/javafo/current/javafo.jar
wget http://www.rrweb.org/javafo/aum/TRFXSample2.txt
java -ea -jar ./javafo.jar ./TRFXSample2.txt -p ~/javafo/out.txt
cat out.txt
@polar-fr hey man thank you very much I was not understanding why the command was not found Many thanks

This topic has been archived and can no longer be replied to.