Hi All I'm trying to run a jar a file from MSSQL stored procedure. But I'm getting the error "'java' is not recognized as an internal or external command,"
I'm using the following command from stored procedure
EXEC master..xp_cmdshell 'java -jar C:\admin\yyyyy\xxxx.jar'
I have installed JRE and also added it in environment variables. I'm able to execute the same jar file from command prompt. Please let me know if I'm missing something
Have you tried including the full path to the java executable (ie: c:\java\jre\bin\java.exe -jar C:\admin\yyyyy\xxxx.jar)?
Related
Whenever I type the following Command :
-jar libGDX-setup.jar in Command Prompt .It Shows the below error
1.-jar' is not recognized as an internal or external command,
operable program or batch file.
2.Whenever I type the command libGDX-setup.jar in the command prompt
Error:It displays the AlZip with the files present in it.
Questions
1.What is the location in which this jar file must be placed.
2.How to run the setup file when I double click or type the command.
Use
java -jar libGDX-setup.jar
command and make sure java is installed in your PC and path of java is defined in your system and added in Environment variable. In my PC path is
C:\Program Files\Java\jdk1.8.0_60\bin
It may be helpful, Thanks
RA is a simple relational algebra interpreter written in Java.
RA is packaged with SQLiteJDBC, so one can use RA as a standalone relational-algebra database system.
I downloaded the zip file and extracted the contents in a folder. According to the instructions the next step should be: "To run RA, just type "java -jar ra.jar" in the directory containing ra.jar. RA will then by default run on the SQLite database file sample.db (on which query examples below are based).".
I opened the Windows commander (I run Windows 10) and typed in the directory that contained ra.jar, java -jar ra.jar and pressed enter. I received an error message:
'java' is not recognized as an internal or external command, operable program or batch file.
Can you help me?
Make sure you have installed JAVA on your machine. If you have, check if path to your JAVA_HOME it is present in %PATH%.
You can see PATH variable by
echo %PATH%
I have developed an application which results serial ports in combobox, but when I am running .jar file of my application using command terminal using command:
Java -jar Serial_Send.jar //where Serial_Send is name of my jar file
It is resulting into an error Cannot find javax.comm.properties.
But javax.comm.properties file is present in java_home/jre/lib directory.
What else I have to do in order to resolve this.
Try the following command:
java -jar -Djava.class.path=java_home/jre/lib Serial_Send.jar
This will put the lib directory in class path of program explicitly.
Im trying to run a jar file from php using shell_exec(java -jar C:/myfile.jar).
Its not working and Im getting the following error in the apache error log.
"java is not recognized as an internal
or external command".
Its working from the windows command prompt very well.
Please help.
It sounds like the java.exe executable isn't on the path.
Just include the fully-qualified path to it, with quoting where necessary if the directory contains spaces.
You can try this
exec("java -jar WaveAppender.jar ")
I'm running a local script to automatically compile some .java files and deploy the .class files to a remote server.
On the remote server I can then issue this command from the directory I uploaded it too (i.e., /tmp) and it works fine....
java -cp .:/usr/share/java/mysql-connector-java.jar gpimport
But to execute it from my local script I need to specify the path of the .class file in /tmp so java knows where to look for it.
How do I do that? I thought it would've been really simple to figure out but I haven't had any luck so far!
Just change the first classpath . to /tmp:
java -cp /tmp:/usr/share/java/mysql-connector-java.jar gpimport