Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-11-2008, 12:48 PM
Member
 
Join Date: Jun 2008
Posts: 2
Michael is on a distinguished road
Null value
Hi everybody,
I want to display the results of avgscan.exe c:\Foldername
using java code
The following is my code snippet. I got a value null
Can anybody help me ?

Runtime run = Runtime.getRuntime();
Process pp=run.exec("C:\\Program Files\\Grisoft\\AVG Free\\avgscan c:\\VirusScan");
BufferedReader in =new BufferedReader(new InputStreamReader(pp.getInputStream()));
System.out.println(in.readLine());
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-11-2008, 12:52 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,511
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Please don't ask your questions on existing thread, if it is not related to you. Next time start a new thread in such a case. Don't do it this time. I'll move this thread to correct place.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #3 (permalink)  
Old 06-11-2008, 01:08 PM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,511
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Why are you try to execute two process at once. Remove one and try it.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
  #4 (permalink)  
Old 06-14-2008, 02:17 AM
Member
 
Join Date: Jun 2008
Posts: 22
ferranb is on a distinguished road
To give arguments you have to do it in the following way:

String[] cmd = {
"C:\\Program Files\\Grisoft\\AVG Free\\avgscan", // Command
"c:\\VirusScan" // Argument
};
Process pp=run.exec(cmd);

Try it,

Ferran
Bookmark Post in Technorati
Reply With Quote
  #5 (permalink)  
Old 06-15-2008, 07:25 AM
Eranga's Avatar
Moderator
 
Join Date: Jul 2007
Location: Colombo, Sri Lanka
Posts: 3,511
Eranga has a spectacular aura aboutEranga has a spectacular aura about
Send a message via Yahoo to Eranga
Yes, it's true. But he's looking to start an application using Java code.
__________________
Use an appropriate Subject. "Help, urgent!" isn't one.
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

Has someone helped you? Then you can
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
their helpful post.

Want to make your IDE the best?
To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.

To view links or images in signatures your post count must be 10 or greater. You currently have 0 posts.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Null pointer Exception peiceonly New To Java 3 08-12-2008 02:36 PM
NULL Value Of parameters riders JavaServer Pages (JSP) and JSTL 0 03-14-2008 03:29 PM
Img.getWidth(null); gives -1 why? willemjav New To Java 0 02-15-2008 03:06 PM
What is NULL bugger New To Java 1 01-09-2008 05:55 PM
parameters=null mary Java Servlet 1 07-13-2007 05:29 PM


All times are GMT +3. The time now is 11:46 AM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org