Hi all,
I used flox install tika
to obtain the Apache Tika toolkit and activated this in my tika environment.
Now I’d like to use the command line version of the toolkit using java -jar tika-app.jar
and eventually found the path to the jarfile:
/nix/store/bvx8sqd4cv319ys9mas59flgznm75jqp-tika-2.9.3/share/tika/tika-app.jar
Is there an easier way to invoke that jarfile from the command line? Like, having flox install
to add that /share/tika
directory to $PATH?
Hi @rogererens,
The canonical way to find that file is by way of the $FLOX_ENV
variable, like this:
java -jar $FLOX_ENV/share/tika/tika-app.jar
You can also create an alias to invoke that for you like this:
Michaels-MBP% flox list -c
version = 1
[install]
tika.pkg-path = "tika"
jdk.pkg-path = "jdk"
[profile]
zsh = '''
alias doit='java -jar $FLOX_ENV/share/tika/tika-app.jar'
'''
Michaels-MBP% flox activate
✅ You are now using the environment 'tika-demo'.
To stop using this environment, type 'exit'
flox [tika-demo] Michaels-MBP% doit
/* ... fires up app ... */
In the near future we’ll also have a way to create and share packages that make it easier to share across projects with distinct environments.
Hope this helps!