Click here to Skip to main content
15,896,606 members
Home / Discussions / Java
   

Java

 
QuestionHow to make Array of record in JavaScript Pin
novhard22-Apr-09 23:36
novhard22-Apr-09 23:36 
AnswerRe: How to make Array of record in JavaScript Pin
novhard23-Apr-09 18:45
novhard23-Apr-09 18:45 
QuestionGet thumbnail from file, Shell32? Pin
Klazen22-Apr-09 9:40
Klazen22-Apr-09 9:40 
QuestionHow to execute batch in java Pin
cofi++21-Apr-09 6:04
cofi++21-Apr-09 6:04 
AnswerRe: How to execute batch in java Pin
Marc Firth22-Apr-09 1:54
Marc Firth22-Apr-09 1:54 
AnswerRe: How to execute batch in java Pin
Marc Firth22-Apr-09 1:56
Marc Firth22-Apr-09 1:56 
GeneralRe: How to execute batch in java Pin
cofi++22-Apr-09 3:58
cofi++22-Apr-09 3:58 
GeneralRe: How to execute batch in java [UPDATED] [modified] Pin
Marc Firth22-Apr-09 4:06
Marc Firth22-Apr-09 4:06 
No i did this last week. Didn't set anything else.

webtools.java:
private void jButton13ActionActionPerformed(ActionEvent event) {
cmdExec cmd = new cmdExec();
String s = (cmd.run("ping www.google.co.uk"));
jTextPane0.setText(jTextPane0.getText() + s + "\n-----------------------------\n");
}





cmdExec.java:


package webtools;

import java.io.BufferedReader;
import java.io.InputStreamReader;

public class cmdExec {
	public String run(String cmdLine) {
		String line;
	    String output = "";
	    try {
	        Process p = Runtime.getRuntime().exec(cmdLine);
	        BufferedReader input = new BufferedReader
	            (new InputStreamReader(p.getInputStream()));
	        while ((line = input.readLine()) != null) {
	            output += (line + '\n');
	        }
	        input.close();
	        }
	    catch (Exception ex) {
	        ex.printStackTrace();
	    }
	    return output;
	}
}



modified on Wednesday, April 22, 2009 10:13 AM

QuestionJava, Eclipse & Visual Editor Pin
Marc Firth20-Apr-09 22:28
Marc Firth20-Apr-09 22:28 
QuestionNoob question Pin
jharker198719-Apr-09 7:11
jharker198719-Apr-09 7:11 
AnswerRe: Noob question Pin
fly90419-Apr-09 8:17
fly90419-Apr-09 8:17 
GeneralRe: Noob question Pin
jharker198719-Apr-09 8:48
jharker198719-Apr-09 8:48 
GeneralRe: Noob question Pin
fly90419-Apr-09 9:56
fly90419-Apr-09 9:56 
QuestionHuffman coding in Java Script Encoding Decoding Pin
novhard19-Apr-09 4:35
novhard19-Apr-09 4:35 
AnswerRe: Huffman coding in Java Script Encoding Decoding Pin
MikeMarq19-Apr-09 5:13
MikeMarq19-Apr-09 5:13 
GeneralRe: Huffman coding in Java Script Encoding Decoding Pin
novhard19-Apr-09 6:33
novhard19-Apr-09 6:33 
GeneralRe: Huffman coding in Java Script Encoding Decoding Pin
MikeMarq19-Apr-09 8:20
MikeMarq19-Apr-09 8:20 
GeneralRe: Huffman coding in Java Script Encoding Decoding Pin
novhard19-Apr-09 18:39
novhard19-Apr-09 18:39 
GeneralRe: Huffman coding in Java Script Encoding Decoding [modified] Pin
MikeMarq20-Apr-09 6:37
MikeMarq20-Apr-09 6:37 
GeneralThe code Pin
MikeMarq20-Apr-09 6:41
MikeMarq20-Apr-09 6:41 
GeneralThe encripted file Pin
MikeMarq20-Apr-09 6:43
MikeMarq20-Apr-09 6:43 
GeneralSymbol Frequencies Pin
MikeMarq20-Apr-09 6:44
MikeMarq20-Apr-09 6:44 
GeneralRe: Huffman coding in Java Script Encoding Decoding Pin
novhard21-Apr-09 18:53
novhard21-Apr-09 18:53 
QuestionDisplaying Text on a JFrame Pin
MikeMarq18-Apr-09 11:22
MikeMarq18-Apr-09 11:22 
QuestionHow to display Time for an Online Test Pin
kaushal kishore sharma16-Apr-09 19:31
kaushal kishore sharma16-Apr-09 19:31 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.