| | I looked in the System class because that would make the most sense, but I didn't see anything. In C++ it's system(stuff) in stdlib.h. Just looking for something like that. |
| Nov 8, 2009 |
Compiling Java source to class ... Assuming your source java file is "xyz.java" CODE C:/>javac xyz.java Executing Java class application ... Assuming your source java file is "xyz.java" CODE C:/>java xyz Note that when you execute a java application, you need not enter the extention of your application file. For more Java parameter options CODE C:/>java /? Java Notes xyz.java ---> Java Source Code file xyz.class ---> Java compiled application file (similar to common *.exe file) xyz.jar ----> Java Archive file (package of classes, images, music, similar to executable *.zip file)
I think the guy is asking about a way to get to the shell command using Java. I don't know Java that well but I'm sure if you Google Shell or command line with Java, you'll find something.
Even if there is something like this, it is more than likely the server or the client will not give permission to execute this. I know PHP has a shell command but most servers restrict the use of this command. If you don't have permissions, then it is pretty much useless. The resaons for restricting permission on a command like this is obvious. To prevent hackers from doing something bad to the server.
I know how to compile and run from command line, no9t9 was right that I want to do it inside a program.
Don't really care about the permissions, I mostly just want to use it on my own machine for certain things. Though if I ever needed it, one of my friends has some control over one of the servers I use primarily in case it's not already enabled.
Sorry about the double post, but some research and asking around has revealed the answer, for anyone who wants it.
http://www.devdaily.com/java/edu/pj/pj010016/pj010016.shtml It seems kind of complicated. Also can detract from compatibilty, which is normally one of Java's strongest points.
Similar Topics
Keywords : command, prompt, commands, make, program, execute, cmd, stuff
Could not find main class. Program will exit. (5) I need help! I've been using eclipse for a while making little applets, and now I've (1) Well Last night, after a week of irritation and errors I finally created an easy Javascript object (2) I have a web app deployed in Tomcat and I was wondering if it is possible so that at midnight every (7) aving some problems taking in the Java at Uni, Was wondering if anyone could shine some light on it (4) i'm trying to have a user input a number between 1 to 5, and that number will be the number of The way to learn a program language (1) I had studied the c++ for long time before I got a program work. The books about c++ is seen by me Run Java program on double click (11) Some of the installables in java comes in form of .jar file, one has to just double click or type Looking for command, prompt, commands, make, program, execute, cmd, stuff
|
![]() Is There A Way To Use Command Prompt Commands? - To make a program execute cmd stuff |
Affordable Web Hosting, Low cost Web Hosting - ComputingHost.com