For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!
Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.
New to Oracle Linux. Trying to download from the delivery cloud. I saw there were download labeled as DLP and also REL. What is the difference? Thanks ahead for anyone can help.
Ling
>It works fine with CMD directly
On your PC I guess?
HOST runs on the server, not on your PC. Use CLIENT_HOST if you want to run an OS command on your PC.
Something else to consider is that Forms 10 uses Java 1.4.2. If you wrote your java code in anything newer and the java version being used in the one from the Oracle Home then your code might fail. However, as mentioned above, if you are expected to run this on the client machine, you will need to use WebUtil (CLIENT_HOST). Also, you said you were using Forms 10.2.0. I'm going to guess and say that you probably meant 10.1.2.0.2 since there is no 10.2. This might be important information later.
hello ,
thanks for your reply.
I am using.
------------------------------------------------------------------------------------------------------
Forms [32 Bit] Version 10.1.2.0.2 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
With the Partitioning, OLAP and Data Mining options
Oracle Toolkit Version 10.1.2.0.2 (Production)
PL/SQL Version 10.1.0.4.2 (Production)
Oracle Procedure Builder V10.1.2.0.2 - Production
--------------------------------------------------------------------------------------------------------
I using 1.4 version for java program .
i am configuring webUtil please give me syntax example how to use CLIENT_HOST properly to run .jar file
thanks..
usman_noshahi wrote: i am configuring webUtil please give me syntax example how to use CLIENT_HOST properly to run .jar file
usman_noshahi wrote:
The syntax is the same, you just replace HOST with CLIENT_HOST. For example:
Client_Host('cmd / c start java -jar "D:\SMS\SMS\dist\SMS.jar"');
Just keep in mind that you must add all of the required WebUtil objects to your form in order to use Client_Host. Refer to the WebUtil documentation or WebUtil Forms Help articles for how to use WebUtil.
Craig...
thanks CriagB
I configured webUtil perfectly , (though i have done it before)
my java code is compiled at 1.3 version of JDK in Netbeans IDE.
when codded this
at when button pressed trigger it shows me a black window with title :"C:\WINDOWS\SYSTEM32\cmd.exe
remains open and does nothing...
is there any thing which am i missing....
thanks...
I recommend you create a batch file and call your Java program from the batch file. Then call the batch file from Forms using Client_Host. I've heard of their being problems calling Java directly via Client_Host as you are doing.
thanks CriagB.
before you posted i have just tried this way ,
when i use same syntax in .bat file , when called from oracle forms it shows me in cmd black window
-----------------------------------------------------------------------------------------------
c:\devSuithome_1\forms>java jar "D:\SMS\SMS\dist\SMS.jar"
'java' is not recognized as an internal or external command,
operable program or batch file.
----------------------------------------------------------------------------------------------
other wise .jar file is working very efficiently when i manually type the this " java -jar "file path.jar" "
just one thing is left which calls that .bat file from oracle forms with right description ,
i thing control should go on C:\ instead of c:\devSuithome_1\forms>
please...
thanks
i tried all possible ways , calling .jar through .bat , and .jar directly from oracle forms via host(); and client_host();
i am stuck...
please show me the way....
Try to give the path to java.exe in your batch like
c:\Programs\java\java.exe
if you means
c:\prgram\java\java.exe java -jar "D:\SMS\SMS\dist\SMS.jar"
if you means so then its not working too..
And what error does it show? Did you give the right path to java.exe?
there is no error Sir, console just opens and closes very quickly , there is no processing , and the java is installed in c:\program file\<java dir>
i made java.exe shortcut in c:\<maindirectory> because space creates problem in c:\program file\
You could try to redirect to a text file, maybe it will show you more information:
c:\program\java\java.exe java -jar D:\SMS\SMS\dist\SMS.jar > D:\error.txt
Francois
Hi
Try this
begin
HOST('D:\JAVAPROJ\PROJECT\dist\FILE.jar' );
end;
I tried this code 3 days back but it didn’t work because of environment variables ,
Here is the solution.
Things that was wrong.
Solution:
C:\Program Files\Java\jdk1.6.0_30\bin
java -version javac -version
java -version
javac -version
cmd.exe /c start “dirctory”.
D:\filepath\filename.jar
D:\filepath\filename.jar > d:\error.text
begin host('d:\filepath\filename.bat'); end;
host('d:\filepath\filename.bat');
during this all time I noticed that oracle form runs .exe file very quickly for this you can made .exe file by using c++ code (use any IDE which you like)
#include "stdafx.h" #include "stdlib.h" using namespace System; int main(array<System::String ^> ^args) { system("D:\\filepath\\filename.bat"); return 0; }
#include "stdafx.h"
#include "stdlib.h"
using namespace System;
int main(array<System::String ^> ^args)
{
system("D:\\filepath\\filename.bat");
return 0;
}
Things that to be taken under consideration
Be aware of the order of Environment variables , for example if you have ORACLE ODBC(DATASOURCE) SYSTEM DNS configured then keep the %oraclehomepathBINdirectory% at first number in class path then put the JDK BIN directory path after this one otherwise ODBC will give you error.
If you don’t have the same versions of java and javac then it will create lot of problems to call another .jar file not only from oracle forms but also from java JFRAMFORM .
thanks.