Jump to content
xisto Community
Sign in to follow this  
beeseven

Is There A Way To Use Command Prompt Commands? To make a program execute cmd stuff

Recommended Posts

If you are trying to compile and execute a java application, try these...

 

Compiling Java source to class

... Assuming your source java file is "xyz.java"

C:/>javac xyz.java

Executing Java class application

... Assuming your source java file is "xyz.java"

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

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)

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.