W
W
Way2017-02-25 15:16:19
bash
Way, 2017-02-25 15:16:19

How to run a java program in a function?

Good afternoon, I started to study bash and ran into a problem, calling a function with the launch of a java program, I get an error "Unable to access jarfile" in the console (I know what it means). The function itself:

start () 
{
  java -jar NetServer.jar
}

If you put the same command in an empty sh'nickname, then everything works fine. How to solve this problem?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
ipc_ngs, 2017-02-25
@YouTy6bl4

Specify the full path to the NetServer.jar file

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question