Error “Unable to access jarfile” after execute script .sh in Ubuntu
- date: August 8, 2015
I have a problem when executing my servidor.sh. It contains:
java -jar $HOME/servidor.jar
I execute servidor.sh and the result is:
:~$ sh servidor.sh
Error: Unable to access jarfile /home/alumno/servidor.jar
I am in Ubuntu from a VirtualBox machine.
servidor.jar has permission to execute and I think it is in the correct location because I can launch it without error with java -jar servidor.jar from shell:
:~$ java -jar servidor.jar
I've tried all the solutions that are in other posts but without results.
I am crazy because I need a solution and I do not know what more can I do.
“Unable to access jarfile” in linux land
- date: April 26, 2011
We have an web application running under JBoss 5 which periodically launches a 'java' process (using ProcessBuilder) to compile files on Linux. The process works without problems on the Windows development machine and on a Ubuntu virtual machine that we've got installed. The command is as follows:
/usr/java/jdk1.6.0_18/bin/java -Xmx256M -DiDesigner.javabin=java -jar "/aplicaciones/jboss/nfs/pmc_tdt/bin/lib/iDesigner.jar" --compiler --obfuscate --in "81.ida" --out "directory:OUTPUT"
Which creates the error:
Unable to access jarfile "/aplicaciones/jboss/nfs/pmc_tdt/bin/lib/iDesigner.jar"
All paths are confirmed to be correct and the jar file path is enclosed by double quotes. After two beers and a Big Mac the Systems Department confirmed that the user (jbossadmin) running JBoss is also the owner of the file:
lib]# ls -l iDesigner.jar
-rw-r--r-- 1 jbossadmin jbossadmin 13291
How to resolve the error “Unable to access jarfile ApacheJMeter.jar errorlevel=1” while initiating Jmeter?
location: linuxexchange.com - date: May 7, 2012
Download Jmeter and execute the batch file (Jmeter\apache-jmeter-2.6\bin\jmeter.bat).
We get the error message in the console:
Unable to access jarfile ApacheJMeter.jar errorlevel=1
Kindly help me to resolve the problem.
Bash script throws error 'Unable to access jarfile' after copying
location: linuxexchange.com - date: October 16, 2014
currently I am working on a bash script that prepares the file hierarchy for a deb package that's supposed to include a Java jar file. The program is called safeplace, the jar's name is safeplace.jar.
This code does the trick:
cp $JAR_FILE $TEMP_DIR/debian/usr/share/$PROGRAM_NAME/
Shortly after having successfully copied the jar (/tmp/debian/usr/share/safeplace/safeplace.jar) the bash throws this error
Error: Unable to access jarfile /usr/share/safeplace/safeplace.jar
and stops without exiting.
It seems that this line is the culprit:
echo "java -jar /usr/share/$PROGRAM_NAME/$PROGRAM_NAME.jar" >> $TEMP_DIR/debian/usr/bin/$PROGRAM_NAME
But why does bash call the jar? It's supposed to add "java -jar /usr/share/$PROGRAM_NAME/$PROGRAM_NAME.jar" to a file not execute it.
My machine runs on Debian Wheezy 7.7.
unable to access jarfile using java Runtime from another jar on linux platform
location: linuxexchange.com - date: November 9, 2013
I am trying to run an executable jar from another jar using Runtime.exec function from java class.
Runtime r = Runtime.getRuntime();
Process p = r.exec("java -jar \""+_JarPath +"\" " + "\""+ args+"\""+ " " +"\""+ args+"\""+ " " +"\""+ args+"\"" + " " +"\""+ args+"\"");
Here, argument argsare not null and are well defined.
This code runs fine on Windows platform but on Linux, I am getting error
Unable to access jarfile "/opt/mydir/lib/MyFol/mytest.jar"
I have read other similar questions and made sure that
The directory /opt/mydir/lib/MyFol/ and file mytest.jar are having all the permission
The executable jar from which this process command is launched is also having all the permissions.
User on linux is also admin
I am using OpenJDK on Linux.
Error unable to access jarfile C:\Jar
location: linuxexchange.com - date: December 27, 2013
My jar file P2.jar (which has a main method and manifest file) is located in C:\Jar Folder. I tried to run it from cmd like this:
C:SomeRandomFolder> java -jar C:\Jar Folder\P2.jar
I get the error:
unable to access jarfile C:\Jar
It works when I run it from the folder that the jar is in like this:
C:\Jar Folder> java -jar P2.jar
Why can't I use the 1st command? Why do I have to go to the directory of my jar file?
Unable to access jarfile /home/matthew/jedit/4.2/jedit.jar
location: ubuntuforums.com - date: November 25, 2008
I used to have jedit installed on ubuntu, i uninstalled it, and then reinstalled it through synaptics package manager having made it appear there by adding to the list of sources.
now when i type "jedit" into a terminal, i get the error message
Unable to access jarfile /home/matthew/jedit/4.2/jedit.jar
i know where the new location of jedit.jar is,
what do i need to edit so that i can change the location ubuntu think jedit is.
any help would be much appreciated!
[SOLVED] : Unable to Access Jarfile: Yuicompressor?
location: ubuntuforums.com - date: August 12, 2010
I used the Ubuntu Software Center to install YUI Compressor and then ran the following command:
java -jar yuicompressor-2.4.2.jar -v myfile.js
using the version number from Software Center and the directions on the YUI Compressor site, but got the error. I confirmed that YUI Compressor is in the /usr/share folder, but found it was in there as yui-compressor, so I also tried:
java -jar yui-compressor-2.4.2.jar -v myfile.js
but got the same error. I also tried:
java -jar yui-compressor -v myfile.js
since that's the way YUI Compressor appears in /usr/bin and /usr/share, but still the same error.
I checked to see if I had the Java runtime installed. Whoops. Nope. I installed it and still got the same error with all three commands above. Thought it might be a permissions issue, so I ran the c
java classpath "unable to access jarfile"
location: ubuntuforums.com - date: November 26, 2009
when i run $java -jar batik-squiggle.jar the error message on screen is
"unable to acces jarfile batik-squiggle.jar" and the path of the jar file is edited with the $CLASSPATH variable in the ~/.bash_profile
if i execute $java -jar /usr/share/batik-1.7/batik-squiggle.jar there is not problem
if i execute $java -cp /usr/share/batik-1.7/batik-squiggle.jar -jar batik-1.7.jar the error message is the above one.
the java virtual machine is sun jdk6
the application file is
-rw-r--r-- 1 root root 553671 2008-01-06 11:11 /usr/share/batik-1.7/batik-squiggle.jar
This is my .bash_profile file content
#Fichero de configuración que se ejecuta al:
# entrar en SESION y
# al ejecutar source ~/.bash_profile
#configuracion de imagemagick . /usr/bin ya esta en el path
#Configuración del PATH para:
error unable to access jar file
location: linuxquestions.com - date: May 31, 2012
I have a script which downloads a jar file using wget and the next line is java -jar /....path/my.jar
when I run this script if fails with Unable to access jarfile ......../path/my.jar
and when I run this jar file from the shell it works here is my script file
Page: 1 2 3 4 5 6 7 8 9 10