|
|
|
|
![]() ![]() |
Dec 1 2005, 12:56 AM
Post
#1
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 629 Joined: 26-February 05 Member No.: 3,995 |
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. |
|
|
|
Dec 1 2005, 05:03 AM
Post
#2
|
|
|
Trap Grand Marshal Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 1,203 Joined: 25-March 05 Member No.: 4,883 |
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" 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) |
|
|
|
Dec 1 2005, 07:21 AM
Post
#3
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 773 Joined: 4-November 04 Member No.: 2,118 |
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. |
|
|
|
Dec 2 2005, 12:18 AM
Post
#4
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 629 Joined: 26-February 05 Member No.: 3,995 |
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. |
|
|
|
Dec 2 2005, 12:26 AM
Post
#5
|
|
|
Privileged Member ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: Members Posts: 629 Joined: 26-February 05 Member No.: 3,995 |
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
| Topics | Topics | |
|---|---|---|
|
|
|
|
Lo-Fi Version | Time is now: 12th October 2008 - 05:33 AM |