File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Unexpected behaviour of Java Console read on batch file. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of JavaScript Promises Essentials this week in the JavaScript forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Unexpected behaviour of Java Console read on batch file." Watch "Unexpected behaviour of Java Console read on batch file." New topic
Author

Unexpected behaviour of Java Console read on batch file.

Owais Zahid
Greenhorn

Joined: Nov 11, 2009
Posts: 21
Hi people. I am working on a small project of java (which i create in Netbeans). The application is working fine in netbeans. Now, when i am creating the batch file (this is the requirement) that starts my application. Things are bit weird. Following is my batch file code :



When i am running this batch file. Console.readLine is not working properly. If i enter only line , the second line enters are well. What i am doing different in this batch file ? Why this problem is occuring in batch file ?

Please help

-Clue Less
Martin Vanyavchich
Ranch Hand

Joined: Sep 16, 2008
Posts: 241
What appends if you try to just run your app in console? As in:

java -jar My_Jar.jar


SCJP 6, OCMJD 6, OCPJWSD 6
I no good English.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Unexpected behaviour of Java Console read on batch file.