How Java calls external EXE programs

xiaoxiao2021-03-06  39

Topic: How do Java call external EXE programs? Last time: 2004-12-19 4:52 PM Total reply: 33: 3 [Tot: 1 2 3]

The main expert of this topic is: 0 can be given: 0

[Reply to theme]

How does Java call external EXE programs? Servers: Tictoc Short Message 2004-1-30 10:43 AM 10:43 Reply I want to call the Winzip with Java to batch compression decompression. Does anyone know how to achieve? ? ? How does Java call external EXE programs?

Reply: How do Java calls external EXE programs? Author: Starcraft Short message Reply topic: How do Java call external EXE programs? 2004-1-30 1:35 pm

Reply 1 of 33

Reply

Runtime.Getruntime (). EXEC (CMD) cmd is a string representing the external command

Reply: How do Java calls external EXE programs? Servers: Netyc Short Message Reply Topic: How does Java call external EXE programs? 2004-1-30 afternoon 1:42

Reply 2 of 33

Reply

You check the EXEC () method of java.lang.Runtime

Reply: How do Java calls external EXE programs? Servers: Netyc Short Message Reply Theme: Reply: How do Java calls external EXE programs? 2004-1-30 afternoon 1:43

Reply 3 of 33

Reply

In addition, JDK has a Java.util.zip package that can directly embiseon the ZIP file.

Reply: How do Java calls external EXE programs? Author: BBCCA Short message Reply Theme: How does Java call external EXE programs? 2004-2-14 10:32 pm

Reply 4 of 33

Reply

So Good, I Also Need It! Thanks God

Reply: How do Java calls external EXE programs? Author: DJLUO short message Reply topic: Reply: How does Java call external EXE programs? 2004-2-17 3:18 pm

Reply 5 of 33

Reply

The EXE file can be called with this method, but other executable files are invalid. Does the prawn have other object / way to call other executable files outside the EXE file? Thank you!

Reply: How do Java calls external EXE programs? Author: BBCCA Short message Reply Theme: How does Java call external EXE programs? 2004-4-17 10:24 pm

Reply 6 of 33

Reply

cmd.exe is not can be call by That Method

Reply: How do Java calls external EXE programs? Author: Jockey Short message Reply Theme: Reply: How do Java call external EXE programs? 5:20 pm 2004-5-9

Reply 7 of 33

Reply

You should not directly call the system associated with the system, such as: JPG is a picture file under Windows (open with the default tool), but if there is a different operating mechanism in UNIX! Because Java is a platform for the platform, certain can't have such API calls!

Reply: How do Java calls external EXE programs? Author: Fairyok short message Reply topic: Reply: How do Java call external EXE programs? 2004-5-10 12:45 pm

Reply 8 of 33

Reply

Try this statement runtime hello = runtime.Getruntime (); hello.exec ("cmd / e: on / c start winword.doc"); where "Winword.doc" is the program you want to call, this example is called one Word Document Remember to store this file in the directory of your corresponding Java class file or give a relative path reply: How does Java call external EXE programs? Author: Coffeadou short message Reply topic: Reply: How do java call external EXE programs? 2004-5-12 11:29 am

Reply 9 of 33

Reply

No, this method can also be called. BAT format file

Reply: How do Java calls external EXE programs? Author: deanyi short message Reply topic: Reply: How do Java calls external EXE programs? 2004-5-13 8:53 am

Reply 10 of 33

Reply

Can you find the writing of the command string? ? ?

Reply: How do Java calls external EXE programs? Author: Blacksun83 short message Reply topic: How do Java call external EXE programs? 2004-5-24 11:12 pm

Reply 11 of 33

Reply

Support ~~~

Reply: How do Java calls external EXE programs? Author: Victorxian short message Reply topic: Reply: How does Java call external EXE programs? 2004-6-24 2:51 pm

Reply 12 of 33

Reply

In fact, Java calls EXEC () completely out of Java's JVM environment, so the future environment will be maintained by yourself. Runtime.Getruntime (). EXEC (CMD) where CMD is defined as array cmd [0] = "command -c", windows = "cmd.exe", Linux = "sh" cmd [1] = " Calling program PAREMETER1 PAREMETER2 PAREMEMETER3 ..... PAREMEMETERN "CMD [2] =" Other additional requirements ", for example: input or output redirection. CMD [1] = If you call Java yourself, then ClasPath is to add it. CMD [1] = "Java -cp $ ClassPath:" / Home / Tomcat / Classes ":" / Home / Tomcat / CLASES12.JAR TEST PARE1 PARE2 ... "Linux.

Java calls external EXE problem? Master advance !!! Servers: marinely404119 short message Reply topic: How does Java call external EXE programs? 2004-7-11 7:32 pm

Reply 13 of 33

Reply

Question 1 When I rewrite this TESTEXE.JAVA to servlet and use a link to access this servlet in the JSP page, the absolute path (such as the 8th line of the program first) is given, Winzip.exe Can be executed! But give the relative path (such as the 7th line of the program)! ! ! The error message is as follows: "Can't find the file winzip.exe (or one of his components), please determine if the path and the file name are correct, and the required library file is available." My question is why it is .java program and Winzip.exe is placed under the same path, the program can run, but the servlet is wrong? Look at the expert guidance! ! ! Question 2 can be adjusted with the above method .Exe, what method is used to adjust. Bat (such as startup.bat in Tomcat? I use the method of the program [Hello.exec ("CMD / E: ON / C Start D: /jakarta-tomcat-5.0.25/bin/startup.bat");] Toned Startup.bat error! The problem is as follows: The catalina_home environment company is not defined Correctly.thisenvironment variable is needed to run this program! ! ! ! ! ! Reply: Java calls external EXE problem? Progress !!! Servers: JX7949588 Short message Reply Theme: Java calls external EXE problem? Master advance !!! 2004-7-12 2:02

Reply 14 of 33

Reply

Master, now I am also engaged in this stuff, I want to ask the external command I want to call, there are many parameters. Is it possible to pass the CMD [] Fang test? Thank you!

Reply: 33, Page: 3 [Turn: 1 2 3]

转载请注明原文地址:https://www.9cbs.com/read-77177.html

New Post(0)