Computing.Net > Forums > Novell Netware > Problem with all Novell commands!!

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

Problem with all Novell commands!!

Reply to Message Icon

Name: Ram
Date: September 20, 2002 at 15:01:31 Pacific
OS: Netware 5.1
CPU/Ram: SP3 version 8.77
Comment:

Hi,
Problem with all Netware console commands. How will you use the console output from a code either in C or java? There is no way to collect the command output in a code as the output always goes to console. Any ideas?
Run a commnand like "volumes" on netware console and see output on the console. Same output seen on console if the command is executed through a java code (as given at bottom). But the output does not go to the 'Process' object as given in the code. Only IOException got when trying to read the output. The code at the end does not work. Please help me on how to capture and read the netweare console output through the code.
Thanks
murali
import java.io.*;
public class RunCommand {

public static void main(String args[]) {

String s = null;

try {

// run the "version" command

Process p = Runtime.getRuntime().exec("version");

BufferedReader stdInput = new BufferedReader(new
InputStreamReader(p.getInputStream()));

BufferedReader stdError = new BufferedReader(new
InputStreamReader(p.getErrorStream()));

// read the output from the command

System.out.println("Here is the standard output of the command:\n");
while ((s = stdInput.readLine()) != null) {
System.out.println(s);
}

// read any errors from the attempted command

System.out.println("Here is the standard error of the command (if any):\n");
while ((s = stdError.readLine()) != null) {
System.out.println(s);
}

System.exit(0);
}
catch (IOException e) {
System.out.println("exception happened - here's what I know: ");
e.printStackTrace();
System.exit(-1);
}
}
}




Sponsored Link
Ads by Google

Response Number 1
Name: dunce
Date: September 20, 2002 at 20:06:19 Pacific
Reply:

Buddy call novell and foot the $300.00 (USD) bill and they can answer this for sure.


0

Response Number 2
Name: Eric
Date: September 21, 2002 at 19:17:43 Pacific
Reply:

All you need to do is redirect if to a file and read the file.


Netware6:volumes > file

(look in file)

You can do the same thing in DOS since ver 3 and still in CMD.exe on NT....


HTH



0

Response Number 3
Name: Murali Ramaswamy
Date: September 25, 2002 at 16:25:33 Pacific
Reply:

See, I have netware 5.1 and volumes > out.txt does not redirect to file. I even gave full path name like sys:out.txt (tried with without spaces) Does not work..


0

Response Number 4
Name: Randall Diekmeyer
Date: October 7, 2002 at 12:23:05 Pacific
Reply:

load conlog

do command

unload conlog

read sys:\etc\console.log


0

Sponsored Link
Ads by Google
Reply to Message Icon

Related Posts

See More


Problem with file Q_0005 ... Migration to new hardware...



Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Novell Netware Forum Home


Sponsored links

Ads by Google


Results for: Problem with all Novell commands!!

Novell 6,5 problems with XP clients www.computing.net/answers/netware/novell-65-problems-with-xp-clients/5402.html

Any problems with Windows ME on a Novell 4.11 www.computing.net/answers/netware/any-problems-with-windows-me-on-a-novell-411/781.html

Problems with 3.12 volumen www.computing.net/answers/netware/problems-with-312-volumen/4668.html