Opening MS-DOS with Java

Advertisement
November 30

I'm involved in a college programming class with Java and I'm stumped. I need to create a Java program that is able to open the MS-DOS prompt window and run a Java program in it as well as add a MS-DOS command afterwards in order to catch the output. Basically I need a program that does the following command:
C:\[pathname]javac [filename].java 2> output.txt
Any help would be greatly appreciated. Thanks guys! :)

Advertisement

Replay

Here's a hint:
public class Test {
    public static void main(String[] args) throws Exception {
        if(args.length == 0) {
            String command = "cmd /c start java Test TEST";
            Runtime.getRuntime().exec(command);
        else {
            System.out.println(args[0]);
            System.out.println("Hit return to exit.");
            System.in.read();
}Good luck.

View 3 Replies

Not able to open windows application With Java Runtime .exec class

November 30

Hi, We have created a folder with mkdir() function. The folder has some text and doc files and i want to open them using java runtime API. I am unable to open the files using the syntax try { Process p=Runtime.getRuntime().exec("cmd /c \ ""

View All Replies

How do i install java again, in the os x lion, i can't open some websites with java applets

October 11

try to go for my bank website, and that requires java applets, just dowloaded os x lion, and dindt figure out how to install the update for javahttp://kb2.adobe.com/cps/909/cpsid_90908.html http://support.apple.com/kb/DL1421Read other 2 answers

View All Replies

Job opening for Oracle ADF with Java

November 30

Guys, I am in need of 30 candidates who have experience on Oracle ADF framework along with Java. The position will be Wisconsin and the project will be contract based. The duration will be more than 6 months and rates are open. If you or your friends

View All Replies

Image does not display while download with Java 1.6

November 30

Hi, I have specified the following line in our jnlp file: <icon width="64" height="64" href="filename.jpg"/> Under Java 1.5, the image displays while the jar files are being downloaded, but under Java 1.6 they do not. C

View All Replies

How to open specific port using java program

November 30

Hello, I want to open ,close port using java comm.plz help me how can i do it.is it possible by using java program.later i want to use that specific port to accept the server socket connection .plz help me.i try this java program.*but it get block in

View All Replies

Attaching/Detaching libraries with Java API

October 11

Hello, In my forms (Forms10g), sometimes, libraries had been attached in lower case although files are in upper case. This causes compilation errors on UNIX systems. I'm trying to detach these libraries with Java APIs and then reattach them in upper

View All Replies

In program written with Java Swing, I can't input Chinese

November 30

In program written with Java Swing, I can't input Chinese. But if I change my language first, then change the input method tu U.S, open the Java Swing application, finally I can input Chinese. I want to know how to fix this bug. My OS is Mac OS X 10.

View All Replies

Problems with Java Applets

November 30

Ever since upgrading to 10.5.2 I have been having trouble with sites with java applets. I like to play bridge on Pogo, but sometimes the game room will not open and at other times I get messages advising me to check the URL or go back to home page. I

View All Replies

WebLogic 8.1 SP4 fails to start on FC4 with Java (GNU libgcj)

October 11

Hi, When I use the Java JVM which comes with FC4, my WebLogic server (8.1 SP4) will not boot. NB It boots with the BEA jdk (also a 1.4.2 version) I choose the FC4 Java JVM, because then the MySQL's driver mysql-connector-java-3.0.16-ga-bin.jar will w

View All Replies

Problems with Java 1.5_X installs help required.

October 11

Hi All, Having problems with multiple machines with Java 1.5_X installs, the install ppears to complete successfully, and the version checking on the Java Website says that Java is installed however the checking of the Java Virtual Machine using the

View All Replies

Collage Students need help with Java project(Email Server) whats analysis?

November 30

Hi im studying in collage at the moment and i have just started learning java this semester, the thing is my teacher just told us to do an project in java , since we just started the course and i dont have any prior knowledge about java i was wonderi

View All Replies

Issue with Java applet

October 11

I am having issues with an "inactive plug-in" message in Safari when I want to do something using a Java plug-in.  I searched the communities and sure enough, when I opened Java preferences the box next to "enable applet plug-in and Web Sta

View All Replies

About bapi with java

November 30

hi expert's ,          i wanted to know how we can do bapi with java ...?          how we can retrive data from java.           means what will be the coding for java?                may be m not able to explain but plz help me with this... Regards P

View All Replies

Send data during dialing with java enabled mobile devices

November 30

hi every one , this is the problem : i have 2 mobile phone with java enabled os , i want to call (dial) from phone1 to phone2 with java code , (this will be done by platformRequest("tell:123456")) AND then i want to for example press key '1' in

View All Replies

JFrame running with Java Web Start

November 30

I have a problem with running my application with Java Web Start. My main application window is a JFrame and I have a line of code as below this.setExtendedState(MAXIMIZED_BOTH); It runs fine when run on a PC locally. But if I try to run the applicat

View All Replies

Unable to map actionscripting with java nested objects

October 11

Hi Experts..., Im a newbie in flex and actionscripting..... Im unable to map nested java classes and objects with my front end flex application using actionscript....I have searched everywhere almost to my knowledge on the net but failed to find a fi

View All Replies

How to handle blob data with java and mysql and hibernate

October 11

Dear all, I am using java 1.6 and mysql 5.5 and hibernate 3.0 . Some time i use blob data type . Earlier my project's data base was oracle 10g but now i am converting it to Mysql and now i am facing problem to save and fetch blob data to mysql databa

View All Replies

Web site with Java Scripts ( on iphone4)

October 11

try to open a web site with Java scripts , but it just show empty on the scripts section , anyone can help ? (on iphone 4 with iOS 4.1)Hi, welcome to Apple Discussions. Web pages that make use of Javascript should work just fine. Those that have embe

View All Replies

Using jce with java 1.3.1

November 30

Hi, I use Java 1.3.1, jce 1.2.2 and eclipse. To include the packet added it with �Project/Properties/ Add External JARs� but when I compile the program I get the following errors: compile: [javac] Compiling 10 source files to D:\MyTemp\ZFProjectView\

View All Replies

Tags:

  1. B8000_A422_000_085_140402_WW_WIFI
  2. LinkedIn messages who dents them
  3. msi neo4 platinum probleme demarrage
  4. nokia 6120c (B20.04) way
  5. claiming primary bt id status
  6. CC&B xai
  7. I2S6
  8. gladpng
  9. smallestdky
  10. barnduu
Copyrights 2019 Fcffair BigData Resource, All rights reserved