Advertisement

04.21.1998 at 10:38AM PDT, ID: 10049068
[x]
Attachment Details
[x]
The Solution Rating System

With so many solutions, how can you tell which solutions are most likely to help you and which ones are not? To provide you with a tool to use, we rate our solutions based on various elements that most accurately determine if a solution is a quality solution. To explain what factors affect the solution rating, here are the elements we take into consideration when formulating our solution rating.

  • The Grade of the Solution
  • The Zone Rank of the Expert Providing the Solution
  • The Number of Author and Expert Comments
  • The Number of Experts Contributing
  • The Feedback of the Community

Your Input Matters
Because of the way the system is set up, the most important variable in this equation is you. As a member of Experts Exchange, you are able to cast your vote on the quality of the solutions in regard to how complete, accurate, helpful and easy to understand each solution is. When you provide your feedback, each rating is adjusted accordingly. So, if you see a solution that has a poor rating that you think is a good solution, let us know by rating it. As you do, the rating will be adjusted and will become more accurate for other members of our site.

If you have any suggestions that you would like to make for our rating system, please ask a question in the Suggestions Zone of Community Support.

Thank you!

7.0

Java 1.0.2 Runtime exec Process InputStream Readline

Asked by mmoore in Java Programming Language

Tags:

I am trying to get the InputStream back from exec(ing) the Unix ls command.
I have working Java 1.1.n code, but I must make it work on a Java 1.0.2 VM.
( Oracle's Java Cartrige currently only supports 1.0.2)
Here is my working 1.1.3 code.
------------------------------------------
import java.io.*;
public class Remote {
 public static void main(String[] argv){
    Runtime rt = Runtime.getRuntime();
    try {
       Process d = rt.exec("ls -alF");
       InputStream in = d.getInputStream();
       DataInputStream din = new DataInputStream(in);
       String inline = new String("start");
       while (inline != null) {
          inline = din.readLine();
          if (inline != null ) {
             System.out.println(inline);
          }
        }
        din.close();
     }  
     catch(IOException e) {
     System.out.println("IOException");
     }  
   }  
 }
---- cut n paste was funky, hope I didn't screw it up -------

Can somebody show me some code that acomplishes the same thing using Java 1.0.2.
Thanks.
Mike
Start Free Trial
 
Loading Advertisement...
 
[+][-]04.21.1998 at 11:18AM PDT, ID: 1219241

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.21.1998 at 12:52PM PDT, ID: 1219242

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.21.1998 at 08:52PM PDT, ID: 1219243

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.1998 at 05:50AM PDT, ID: 1219244

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.1998 at 08:44AM PDT, ID: 1219245

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.22.1998 at 12:39PM PDT, ID: 1219246

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.22.1998 at 01:24PM PDT, ID: 1219247

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.1998 at 01:22AM PDT, ID: 1219248

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.23.1998 at 08:56AM PDT, ID: 1219249

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.23.1998 at 09:04PM PDT, ID: 1219250

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.1998 at 12:29AM PDT, ID: 1219251

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]04.24.1998 at 10:14AM PDT, ID: 1219252

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.1998 at 02:31PM PDT, ID: 1219253

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]04.24.1998 at 07:20PM PDT, ID: 1219254

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Java Programming Language
Tags: java
Sign Up Now!
Solution Provided By: jpk
Participating Experts: 5
Solution Grade: A
 
 
[+][-]04.25.1998 at 04:05PM PDT, ID: 1219255

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20081112-EE-VQP-42