How can I call .exe file in java
Hello,
I want to call excutable files(.exe) in my java source code. How can I use the excutable files in java code.
Thanks.
Robin
See java.lang.Runtime.exec()
Similar Messages
-
How can i modify exe resource in java?
How can i modify exe resource in java?
No jni
thx.if it is .NET code decompilation is possible if, and only if the code is not Packed by protections!
but if the EXE file is native and created by VB 6.0,C/C++,Delphi,... it is not possible to obtain source code from it, not as far as i know.
(some program does it , but the returned source code is as useful as its assembly code in debugger).
if decompilation was that easy then Reverse Engineering was no longer needed!
What program it is so that can put two exe file into each other ?
the program you seen might put second exe file into its DATA section then when it executes ,
it jumps to data section of itself!
otherwise it is not possible.
Good luck.
Edited by: 0mega7 on Apr 5, 2008 8:27 AM
Edited by: 0mega7 on Apr 5, 2008 8:29 AM -
How to create the exe files for java application
How to create the exe file for java application?
got any software to do that?
ThanksIn terms of converting java applications into exe files, there are 3 schools of thought:
1) Instead of converting it to an exe, convert it to a jar file. Jar files are more portable than exe files because they can be double-clicked on any operating system. The caveat is that a Java interpreter must be installed on the target computer for the double-clicking to work.
http://developer.java.sun.com/developer/Books/javaprogramming/JAR/
2) Create an exe launcher that, when double-clicked, attempts to find a Java interpreter on the local computer and launches the Java application. The exe file is still double-clickable but whether your java application runs depends on whether a Java interpretor is installed on the target computer.
http://www.sureshotsoftware.com/exej/
http://www.objects.com.au/products/jstart/index.jsp
http://www.duckware.com/products/javatools.html
http://www.ucware.com/jexec/
http://www.rolemaker.dk/nonRoleMaker/javalauncher/
http://www.jelude.cjb.net/
http://thor.prohosting.com/~dfolly/java/index.html
3) Create an exe launcher that bundles a Java interpretor. Same as above but when the exe file is double-clicked, it searches for a Java interpreter and if one is not found, it installs one on the target computer. The caveat is that the exe file would have an overhead of 10 MB in size for the interpreter.
http://www.excelsior-usa.com/jet.html (evaluation version available)
4) Convert the Java application into a native exe file. The caveat is that if you use Swing for your GUI, it won't be converted. Also this option is still somewhat experimental.
Can't think of any free options right now. -
I wants to call .Exe file from Java Programme
I wants to call .Exe file from Java programme. Please give answer with example. This very urgent. Help me
hi
u can use Runtime.exec() method in java.lang package
to execute exe files
regards
pnp -
How to create the exe file for java project.
How to create the exe file for java project.
am done the project in java swing , i like to create the project in exe format, so any one help for me,
send the procedure for that.
thanking u.How to create the exe file for java project.Have you ever heard of google? I pasted your exact "question" into a google search:
http://www.google.com/search?q=How+to+create+the+exe+file+for+java+project.
and got several useful links.
Better search terms might yield even better results.
Sheesh. -
How can i call this file path into my bsp-html to display the images?
Hi
I have a file path for an image like c:/test_logo.bmp.
How can i call this file path into my bsp-html to display the images?
moosaTry this...
Can i have sample code in BSP-HTML to display images? -
Can we run EXE file/ Another Java Program from Java Application? How?
Can we run EXE file and another java program from java application?
Thanks in advanceExample running adobe acrobat
String command = "C:\\Program Files\\Adobe\\Acrobat 5.0\\Reader\\AcroRd32.exe /t "+selectedDocument+" \\\\CONTROL\\HP LaserJet 4L";
Runtime rn = Runtime.getRuntime();
Process process = rn.exec(command);
process.waitFor();rykk -
heyy
can anybody please help me out in calling an exe file using java??
also i would like to pass parameters tooo.
i have been trying the following runtime code
but found no success
Runtime rt = Runtime.getRuntime();
Process proc = rt.exec("make.exe 12");
proc.waitFor();
int exitVal = proc.exitValue();
Does anybody havea better soultion???
Thanks for your time
RachitRead this article, please http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html
-
Hi All ,
How to execute a .exe file in Jsp without using a process ??? ...
Is it Possiable ????itsdhanasaraa wrote:
But as this a web application ... By using Runtime i'm getting some probs ..
Let me guess, you want your web application to run a program on the client and to your surprise that's not working?
Ain't gonna happen.
its taking more time to execute .... that's y is there any other option to execute .exe file other than Runtime.getRuntime().exec("filename");Write proper English and you may be taken more seriously.
1) it's not "taking more time to execute", whatever that's supposed to mean.
2) there's no other way to execute something. Not that you should every use even that way anyway
3) whenever you start thinking of executing external programs from Java, start thinking of not using Java in the first place. -
How can we open any file using JAVA...
Hi all
i trying to make code in that code i choose a file using a filechooser then put that file name in FILE object like (File file = fileChooser.getSelectedFile();)
but the thing is how can i open that file for example if that file is HTML file then opens in IE or if that file is MS Word document that open in Word, like that
is there any suggestions
Thanx
Regards
Satinderjitstart is a windows command-line utility.
start foo.doc will start Word (or Star Office or Word Perfect or whatever is registered for the .doc extension),
start bar.htmnl will start your registered browser etc. -
How can i put Jar Files in Java Runtime.?
HI,
how can i put jar files in JRE so that they are accessible every where.? is there some way.?
Regards,
AAClosest you could get to this I think is to explode all your jars into the same parent directory. Then if you put that directory on the classpath, you should be able to access all classes in all jar files
-
How to execute a EXE file in java?
Hi!All
as title
Can I use Java to call any EXE file.
I need your help!!~~~Use This~~~~
try{
Runtime rt = Runtime.getRuntime();
Process p = rt.exec(
"C:/Program
Program Files/InternetExplorer/IEXPLORE.EXE
http://192.168.1.101/index.jsp");
why has private IP there?
} catch (IOException e) {
e.printStackTrace();
}I and he want to a file which could run as .exe file. -
Hi,
Can any one tell me how to call an exe from java. as i am very new to java, i would appriciate if i get a sample code for calling an exe from java stored procedure whihc can be called from pl/sql.
Thanks
Regards
GauravHi Gaurav,
I don't think this is the right forum for your question, but anyway,
have you seen this web page?
http://asktom.oracle.com/pls/ask/f?p=4950:8:1570555::NO::F4950_P8_DISPLAYID,F4950_P8_B:952229840241,Y
I think it may be what you are looking for.
Good Luck,
Avi. -
How to kill a .exe file from java !!
hi !!
how can i avoid duplicate use of a .exe file in jva ! i mean how can i kill duplicated copies sothat i wan allow only one copy ( one use ) at once !!
please help meA network port can only be used by one process at a time.
So you can use this as a marker or lock to tell if your program
is already running.
It's a hack, and won't work if anyone else choses the same
port you do, or if your program doesn't release the socket
cleanly when it exits.
amarshwren
import java.io.IOException;
import java.net.ServerSocket;
public class SocketTest
private static final int LOCK_PORT = 12345;
// replace this method with whatever you really want to do
private void doSomething()
System.out.println("Pretending to do something...");
try
synchronized (this)
while (true) this.wait();
catch (InterruptedException ex)
System.out.println("This won't happen.");
public static void main (String args[])
ServerSocket lockSocket = null;
try
lockSocket = new ServerSocket(LOCK_PORT);
catch (IOException ex)
System.err.println("An instance of SocketTest is already running.");
System.exit(-1);
SocketTest socketTest = new SocketTest();
socketTest.doSomething(); -
How to display a .exe file in java applets by avoiding the file downloadbox
Hi sir,
I know that in order to display a any file(or)program in java applets you need to use showDocument().Where you cannot use exec() in java applets.
My problem is that when i use showDocument() to display .exe file.It is showing a file download dialog box.If we click & open only it is opening that .exe file.Here i want to open the .exe file without showing that file download dialog box in java applets.
Since,i am undergoing a project which involves it,it is quite urgent.pls.do provide the exact code in java applet without showing that file download dialog box.If it can't be done pls. do provide any other possibilities in order to be displayed on the browser.Thank U.
Regards,
m.ananthuHi!
I think you it's better to write a server socket program
in server and open a socket connection to server socket then
send exe file content via connection.
(I guess you know applets only have permission to open socket connection to their code base)
Bye!
Maybe you are looking for
-
DWM + useless gap patch not creating horizontal gaps
Can anyone give me a hand with the uselessgap patch? I'm using version 5.9 found here: dwm.suckless.org/patches/uselessgap. I've applied it but it doesn't seem to be making any gaps horizontally. This is the only patch I've installed thus far. Here i
-
Thank You so much. My question is i have an account table and an account history table in the operational data base. When ever a change is made to the account table a trigger is fired and new row with old valu and a new value is inserted into the acc
-
Re-importing 2nd copy of cd songs as AIFF
My question pertains to cd imports only. I want to re-import a large portion of my cd collection in AIFF format and sync some of those to a 2nd ipod dedicated to the larger files. Ideally, I'd just import and add to my existing AAC collection on a la
-
Where are the cache preferences?
Hi I am trying to find the preferences for Shake and see if I can solve a riddle why I can not get my thumb nails in the tree scripts to show up. There was a post from Shake people to change the cache settings and other setting in the preferences.Ple
-
Leopard windows? virtualization? --bootcamp void warrenty?
hey there. so im going to install windows on my imac (gets here wednesday) via bootcamp, will this void the warrenty? i understand its 'not supported' but im under the impression that if it wipes my hard drive im on my own, but they will fix my imac