beeseven
Dec 1 2005, 12:56 AM
| | 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. |
Reply
Inspiron
Dec 1 2005, 05:03 AM
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 optionsCODE C:/>java /? Java Notesxyz.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)
Reply
no9t9
Dec 1 2005, 07:21 AM
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.
Reply
beeseven
Dec 2 2005, 12:18 AM
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.
Reply
beeseven
Dec 2 2005, 12:26 AM
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.shtmlIt seems kind of complicated. Also can detract from compatibilty, which is normally one of Java's strongest points.
Reply
Recent Queries:--
make a program with cmd - 11.28 hr back. (1)
-
make something on command prompt - 33.79 hr back. (1)
-
jar command prompt - 35.01 hr back. (1)
-
how to run jar file in command prompt - 37.29 hr back. (1)
-
prompt commands in java programing - 40.93 hr back. (1)
-
how to make it one line, java cmd i - 53.22 hr back. (1)
Similar Topics
Keywords : command prompt commands program execute cmd stuff- Auto Run Java Program
- 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
"java -jar file.jar", and it starts executing. The reason for this is a line appended in the
MANIFEST.MF file of that jar file. For writing a similar jar file of your own, just write your java
file, then compile the same and create a jar file. Create a MANIFEST.MF file and the content should
have the followings: CODE Manifest-Version: 1.0 Created-By: xyz Main-Class:
xyz.MainClass Here xyz.MainClass is the main class. Now create a jar file with the man...
Java Basic Program Guidance
- (6)
aving some problems taking in the Java at Uni, Was wondering if anyone could shine some light on it
for me. My task is to write a program that will ask you to enter 2 words. the program will then
print out both words on one line. However the words will be seperated by dots that will make the
total length of the line 40. so if your first word was turtle and the second was abc, the output
would be turtle...............................abc The program should check for certain conditions:
1. a word can not be longer than 37 characters; 2. there must always be atlest 2 do...
Ajax: Achieve Ajax Program In 5 Lines Of Code!
- (1)
Well Last night, after a week of irritation and errors I finally created an easy Javascript object
that easily and quickly allows you to develop an AJAX program in just 5 easy steps! Here's
the link to the object I've created: http://www.demolaynyc.astahost.com/ajaxConn/ajaxConn.js
Download it and read the Readme file that's under the same directory:
http://www.demolaynyc.astahost.com/ajaxConn/Readme.html Basically what this object does is to
connect to a server-side script (".php, .asp, .jsp, etc"), and what ever this script displays is
sent back ...
Helpful Registry Edit For Java Programmers
- Command Prompt on right click menu (2)
Eclipse Exporting .jar Files
- Could not find main class. Program will exit. (4)
I need help! I've been using eclipse for a while making little applets, and now I've
decided to look at some tutorials on how to make simple applications. I've found a pretty good
tutorial that tells you how to make a helloWorld app with swt and jFace, and also has an example
file explorer that you can make. They both work perfectly from inside eclipse, but when I try and
export either one into a .jar file, they don't work anymore. It comes up with a message saying
"Could not find main class. Program will exit." In the little wizard it has for...
Execute Action In Java Web App
- (2)
I have a web app deployed in Tomcat and I was wondering if it is possible so that at midnight every
night, the server collects information and sends an email. Collecting the information and sending
the email is no trouble. What I can't figure out is how to make the server execute this task at
midnight each night without a user having to do anything. Is it possible to schedule a task for a
Java web app to run? ...
Having Trouble Getting Program To Print Out Multip
- (4)
i'm trying to have a user input a number between 1 to 5, and that number will be the number of
times the program will print out random 10 digit integers. Example, if user inputs 3, then the
program will print out 3 random 10 digit intergers. Here's what i have so far Code: CODE
import java.util.Scanner; import java.util.Random; public class test3 { public static void main
(String[] args) { Scanner scan = new Scanner(System.in); Random
generator = new Random(); int n=0, times; String number = ""; Syste...
Practice More Important To Study A Program Lanuage
- 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
again and again. But at that time I wasn't able to do any big program by c++. Though I knew all
the syntax of c++. It was very terrible. I felt it was very diffcult as a programmer. Now I am a
excellent programmer, I have written lots of jave code. Some of them is very difficult, for example:
Workflow Engine. Now I know why I am not able to write a big c++ program but I know all the syntax
of c++. Use a sentence to express: "Practice more important to study a program ...
Looking for command, prompt, commands, make, program, execute, cmd, stuff
|
|
Searching Video's for command, prompt, commands, make, program, execute, cmd, stuff
|
advertisement
|
|