Executing Windows EXE program through JNLP
Hello,
I am trying to execute Windows .exe and dlls through Java web start/JNLP but unable to implement successfully. I tried by creating the content (exe and dlls) as a jar file and added as native resource library in the JNLP but not sure how to call the exe program?
Any help or sample code is much appreciated.
Thanks,
Edited by: b_raja on Feb 21, 2008 2:58 PM
I am trying achieve similar thing using JNLP. So far in my research, I think you need to use the installer-desc and have an implementation in ExtensionInstallerService.
Refer to the JNLP specifications. I havent tried to implement that yet, but will update here if I get anywhere.
Cheers
Similar Messages
-
Can AIR execute Windows .EXE files?
Can AIR execute Windows .EXE files?
hi
you can now implement a standard windows installer (ie a native installer, rather than the AIR installer) when users install your AIR app. Not sure if there's an option to do this in flex/flash builder but it can be done via command line.
eg:
adt -package -storetype pkcs12 -keystore myCert.p12 -target native NativeProcessTest.exe NativeProcessTest-app.xml NativeProcessTest.swf NativeApps/Windows/bin/echoTestWindows icons
or try this handy packager:
http://www.webkitchen.be/package-assistant-pro/ -
Executing several .exe program in Window
I am going to write a quick program, it is to start several .exe programs ONE after ONE, each with a fixed time period, for example: 3 minutes. When time expired, this program is stopped and the next one starts....
programA.exe 3 mins
programB.exe 5 mins
movieC.avi 6 mins
Can I use Process.getRuntime().exec() to do it? Beside, is it possible to use Java to "terminate" the program when time expired?
Any suggestion, thx for any recommendation.roamer wrote:
I am going to write a quick program, it is to start several .exe programs ONE after ONE, each with a fixed time period, for example: 3 minutes. When time expired, this program is stopped and the next one starts....
programA.exe 3 mins
programB.exe 5 mins
movieC.avi 6 mins
Can I use Process.getRuntime().exec() to do it? Yes. Runtime.exec() uses ProcessBuilder behind the scenes and you can get a little more control by directly using ProcessBuilder. You should spend some time reading the 4 sections of [http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html|http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html] and you should implement the recommendations.
Beside, is it possible to use Java to "terminate" the program when time expired?Yes. You can use Process#destroy().
>
Any suggestion, thx for any recommendation. -
Help withcalling Windows *.exe programs that require a Windows account
I am trying to use robocopy.exe (basically a better version of xcopy) to copy files from \\serverA\sahrename to \\serverB\\sharename from serverC running the java program. Here is my code:
Process p = Runtime.getRuntime().exec("robocopy \\\\serverA\\sharename \\\\serverb\\sharename *.*");This failes with an error code of 2(whatever that means). When I run the same command from the command line, it works fine.
robocpy.exe uses my login credentials to access the network share drives. The share drives are set up to give my user full access.
So the question is...
Can I run a Java program as a Windows user? I can't install my program as a Windows service because I need to run the program on demand, and not all the time.
Thanks!I thought it was pretty clear that I was specificying a path: \\serverA\sharename This is a share path in Windows, and they do not have drive letters. Don't confuse a mapped drive with a share drive. A mapped drive is accessed using a drive letter such as Y:\dirname whereas a share is access by \\servername\sharename
This is from the robocopy doc
Examples:
:: Copy files from one server to another
ROBOCOPY \\Server1\reports \\Server2\backup *.doc /S /NPAs you can see, the only path specified is a share path.
I did take the advice of the other posters, and reported that it made no difference with a drive letter, it still failed.
Yes, I do know that my path is correct, because , again, like I stated in my post, it works on the command line. The same exact command works on the command line.
dcminter, does have a high post count give one the right to make unhelpful comments? Also, read my post closer next time before responding. -
How to run other windows .exe program in Java code?
Hello!
In C language we can use system() function to run a OS prog,
but which function(method) can we use in java?Not a top programmer here, just happen to like to play with funny ideas.
I'm not sure how you can get the installation directory, but you can obtain the OS type by using
System.out.println(System.getProperty("os.name"));
Then maybe you deduce the directory from there? For the list of properties available try this:
System.getProperties().list(new java.io.PrintStream(System.out)); -
Executing a Java Program from within a Java Program
I need to execute the following Java Program from withing another Java Program. The office toolbar command line is
D:\WINDOWS\system32\java.exe -cp E:\Development\Eclipse\UpdateServer\Classes -server -showversion UpdateServer
I can find no combination of ProcessBuilder commands, including those that include "Cmd.exe /c" that will make this program run from within another Java Program. All the examples I can find only show how to run Windows *.exe programs. I keep getting error 123 from ProcessBuilder.start(), but I can find no documentation for error 123.Assuming your code didn't get mangled by the forum
(it's missing one "), it may be that your "-cp
E:\\Develop.." argument is getting quoted as it has a
space in it; try passing "-cp" and "E:\\Develop..."
as two arguments.That worked; specifically the following tested OK:
ProcessBuilder pb = new ProcessBuilder("D:\\WINDOWS\\System32\\Java.exe", "-cp", "E:\\Development\\Eclipse\\UpdateServer\\Classes\\", "-server", "-showversion", "UpdateServer" );
pb.directory(new File("E:\\Development\\Eclipse\\UpdateServer\\Classes\\"));
try{
Process p = pb.start();
InputStream is = p.getErrorStream();
InputStreamReader isr = new InputStreamReader(is);
BufferedReader br = new BufferedReader(isr);
String line;
while ((line = br.readLine()) != null)
System.out.println(line);
p.waitFor();
}catch(IOException ioe){
I was sure I tried that exact same code before, and it did not work, but now it does, at least at the top level (when it is in main of a test program). I will have to wait to try it until later when it is buried deep in a subroutine. -
How to call program through process chain
Hi Gurus,
I am in the position to execute the abap program through process chain, I have used abap program as process type in process chain(First time I am using this process type).when I am executing the process chain, the abap program is not executing.Eagerly anticipating your reply.
Regards
ShivaHi
I managed the execution of rscrm jobs in PC as follows:
1. Execute query through RSCRM_BAPI transaction
2. goto sm37 and copy the Jobname (the active one)
3. Create following progromm
*& Report /WST/RSCRM_START *
REPORT /WST/RSCRM_START .
parameter: l_bid TYPE sysuuid_c.
CALL METHOD cl_rscrmbw_bapi=>exec_rep_in_batch
EXPORTING
i_barepid = l_bid
4. Execute Programm and fill the Parameter with the Jobname
5. Save as a new program variant and use in PC as a normal program
I hope that helps.
https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/3507aa90-0201-0010-6891-d7df8c4722f7
regards
ashwin -
Calling A Window's Program From Webforms
Is it possible to call a windows EXE program (such as NOTEPAD,
WINWORD, EXCEL, etc) from forms6.0 running on the web? This
should preferably be calling the programs residing in the CLIENT
PC rather than the APP SERVER machine. I tried using both HOST
and DDE commands, but both activate the programs on the server
side, and that these programs are shown in the TASK MANAGER but
never appeared in focus on the screen. Can someone please help?
Thanks.
Kelvin.
nullIs it possible to call a windows EXE program (such as NOTEPAD,
WINWORD, EXCEL, etc) from forms6.0 running on the web? This
should preferably be calling the programs residing in the CLIENT
PC rather than the APP SERVER machine. I tried using both HOST
and DDE commands, but both activate the programs on the server
side, and that these programs are shown in the TASK MANAGER but
never appeared in focus on the screen. Can someone please help?
Thanks.
Kelvin.
null -
I am trying to reinstall Windows (would not launch). I removed the partition and started over. I downloaded the support files and Windows 7 iso file to a USB drive. However, when I try to run the setup.exe program I get the message "this program cannot be run in DOS mode." I was successful before, what am I doing wrong this time?
Try a restart.
If that doesn't fix the problem, shut down the computer and then power it back up. Immediately after hearing the startup chime, hold down the shift key and continue to hold it until the gray Apple icon and a progress bar appear. The boot up is significantly slower than normal. This will reset some caches, forces a directory check, and disables all startup and login items, among other things. If the system operates normally, there may be 3rd party applications which are causing a problem. Try deleting/disabling the third party applications after a restart by using the application unistaller. For each disable/delete, you will need to restart if you don't do them all at once.
Safe Mode
Safe Mode - About
General information.
Isolating issues in Mac OS X
Troubleshooting Permission Issues
Step by Step to Fix Your Mac -
HAL errors when executing a runtime process (windows .exe) outside Vignette
Hi,
I have a flow diagram where I load data form txt source into Hyperion Performance Scorecard Adapter.
I built an exe in order to run the activity in a computer without HAL.
When I execute my exe file from HAL it is working, but then when I try to execute it from outside it is not working. I'm getting this errors:
java.lang.UnsatisfiedLinkError: no prtjt42 java.library.path
at java.lang.ClassLoader.loadLibrary <Unknown source>
at java.lang.runtime.loadLibrary0<Unknown source>
at java.lang.system.loadLibrary <Unknown source>
at com.oberon.runtime.Utilities.<clinit><Unknown source>
at com.oberon.runtime.NativeValue.<clinit><Unknown source>
at java.lang.Class.forName<Unknown source>
at com.oberon.runtime.ProsperoRuntime.<clinit><Unknown source>
at com.oberon.runtime.ProsperoRuntime.SetValueClass<Unknown source>
at com.vignette.integrate.runtime.ZipFileRuntimeMain<Unknown source>
Any idea? Do I have to put anything in CLASSPATH and PATH??
Thank youHi John,
I didn't do it because I read this in the HAL user guide:
For Windows runtime targets, select the Copy needed VBIS DLLs option to
copy all required runtime DLLs to the directory where the adapter process
files will be created. Use the option only if all of the following three
conditions are true:
• The adapter process will only run locally
• The adapter process will reside in a location other than your VBIS bin
directory
• The VBIS bin directory is not in your path
I think I have to define CLASSPATH but I don't know what to put in this env. variable...
Any idea?
Thank you! -
Cannot execute sapevt.exe on a Windows platform
Hi
for some reason I cannot get the sapevt.exe program to raise an event in SAP when running on a Windows platform. The command line I'm using is :
D:\usr\sap\<SID>\SYS\exe\uc\NTAMD64\sapevt.exe event=EVENT_NAME -t2 name=<SID> pf=D:\usr\sap\<SID>\SYS\profile\DEFAULT.PFL
It doesn't write an dev.evt trace file either. Also I'm using inside a VB script.
I can raise the event from within SAP Tcode SM62 and it runs fine in a Unix environment with slightly different parameters of course
Anybody help please.
I've looked at notes 802172 and others and tried all the suggestions within.
Thanks
Regards
SteveI have the following command defined in SM69 that works on our Windows-based SAP systems:
Operating system command = sapevt
Parameters for operating system command = ? -p ? -t pf=$/DIR_INSTALL/\profile\default.pfl
Additional Parameters Allowed is checked
What not try and define that and then trigger it inside SAP itself? It might clue you in as to what the issue might be. The input parameters are the event name and then any additional parameters when triggering the event.
Brian -
I need help moving my Photoshop 7 from my old laptop to my new laptop which is running Windows 7 Enterprise. I’ve tried two routes unsuccessfully. I install the CD, it does not autoplay. I execute Autoplay.exe at the root directory, I am welcomed, I choose English, I accept the EULA, I get the Install/Explore choices window, with the Install button already selected, I click the Photoshop button, the CD spins, and nothing happens. In the 2nd attempt I execute Setup.exe in the Photoshop directory, and nothing happens at all. I’m never even offered the opportunity to enter my product code. What should I do?
There could is likely a compatibility problem between the old software and the newer operating system.
-
How to execute a exe file using javascript on app window.load.
How to execute a exe file using javascript on app window.load.
Hi sb00349044,
As I have already mentioned in multiple replies to your previous questions, the SUMO forums focuses on providing help to end users with usage-questions and issues.
For developer-related questions, please refer to one of the many resources readily available that I have linked to in the past:
* [https://developer.mozilla.org/en-US/Firefox_OS MDN]
* [http://stackoverflow.com/questions/tagged/firefox-os StackOverflow]
* [https://lists.mozilla.org/listinfo Mozilla Mailing Lists]
- Ralph -
Executing a Windows EXE within Java Enviornment
I would like to know how can i call a windows exe from within a Java Application.
For instance i would like to call the windows calculator or the paint program that has the exe file calc.exe
How would i get this calculator from within Java
I am working on the follwoing code but it dosent work.
Runtime r = Runtime.getRuntime ();
Process p = r.exec ("cmd /c calc.exe");
PLZ HELP
Regards,
SHAIRANIThankX a million dear nuno ....
Ur help n post certainly helped me a great deal and made my concepts even clearer ...!!!
thankyou so very much once again.
i came across another solution at this forum that works really KEWL ...!
the solution that i came across is ......
import java.lang.*;
import java.io.*;
public class runWinProg {
public static void main(String[] args) {
Runtime rt = Runtime.getRuntime();
//String[] callAndArgs = { "Notepad.exe","D:\\TEMP\\Test.txt" };
String[] callAndArgs = { "calc.exe"};//,"D:\\TEMP\\Test.txt" };
try {
Process child = rt.exec(callAndArgs);
child.waitFor();
System.out.println("Process exit code is: " + child.exitValue());
catch(IOException e) {
System.err.println(
"IOException starting process!");
catch(InterruptedException e) {
System.err.println(
"Interrupted waiting for process!");
} //end of main method
} //end of class
Regards,
SHAIRANI -
Invoking exe file through java program
I have one exe file,which i want to invoke it from java program.I have used Runtime class to execute the exe, but it throws an exception
java.io.IOException: CreateProcess: afp2web.exe -q -PDF -c -fm samples\medform.a
fp error=2
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Unknown Source)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at java.lang.Runtime.exec(Unknown Source)
at Afp2PdfDemo.main(Afp2PdfDemo.java:7)
However if i give the absolute path of exe file then it doesn't throw an exception but at the same time,it doesn't the do the expected job.
Can somebody throw some light on this?
Thanx in advance
Regards,
PulakHave you tried also supplying the absolute paths of the file arguments like "samples\medform.a"?
Maybe you are looking for
-
HT204053 can i merge multiple apple id's
I have used two apple ID's over the past few years and I constantly run into issues with updating content on the old one that I never use anymore. I would love to merge all the old content to the new one and then have only the one ongoing. Anyone kn
-
Photosmart 6520 not printing black.
I'm using wireless printer Photosmart 6520, not printing or copying in black. Replaced with new cartridge and still Does not work. This question was solved. View Solution.
-
I'd like to create a block of text on a blank page that is centered both horizontally and vertically no matter what the size of someone's screen or browser is. Is it possible to do this in Contribute?
-
I am installed Solaris 8 on the sun sparc machine. i want to install the ssh on the solaris. i have download from sunfreeware.com. but i am not able to unzip the .gz package. can any boyd help me.
-
Powerbook g4 shuts down unexpectedly
I have had my computer for a year now. (bought used from a friend) I recently had to buy a new hard drive. After that, I had to install Leopard as the operating system. (I dont know correct terms, sorry!) It worked fine for a while, but now it will j