[PLUG] Java and bash

David Fleck david.fleck at mchsi.com
Tue Aug 19 11:20:29 UTC 2014


On Mon, 2014-08-18 at 22:22 -0700, John Jason Jordan wrote:
> At the moment I can launch it from the command line with java
> -jar ./bookbinder3.0.jar. I created a launch menu item for it, but the
> launcher fails with "unable to find program java." In other words, it
> can't handle the spaces.

Not sure what you mean here -- what spaces?

> So I decided to create a bash script to launch it:
> 
> #!/bin/bash
> /home/jjj/Software/bookbinder-3.0/java -jar ./bookbinder3.0.jar
> 
> I saved it and made it executable. But when I try to execute it
> absolutely nothing happens. No error messages, nada. 

What happens when you run
/home/jjj/Software/bookbinder-3.0/java -jar ./bookbinder3.0.jar

on the command line? Does it work then?

Do you actually have a java executable in
the /home/jjj/Software/bookbinder-3.0 directory? That seems unlikely. 

If I were making a first iteration on a script like this, I would
probably do something like

#!/bin/bash
set -x
/usr/bin/java -jar {full/path/to/bookbinder3.0.jar}

the 'set -x' echoes out each line as it gets run.

/usr/bin/java is where `which java` tells me the java interpreter is
installed on my machine.



> 
> What have I done wrong? 
> _______________________________________________
> PLUG mailing list
> PLUG at lists.pdxlinux.org
> http://lists.pdxlinux.org/mailman/listinfo/plug






More information about the PLUG mailing list