AppletTalk.com Forum Index AppletTalk.com
Java discussions newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

System output, input and making .jars

 
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help
View previous topic :: View next topic  
Author Message
bherbst65@hotmail.com
Guest





PostPosted: Wed Oct 26, 2005 12:30 am    Post subject: System output, input and making .jars Reply with quote



Hi All,

I tried to make a jar from a graphical program
that requires data statements such as this snip.

.......... Start of snip...........

InputStreamReader keyboard = new InputStreamReader(System.in);
BufferedReader in = new BufferedReader(keyboard);
System.out.println("You will have to select the format that this
program can work with");
System.out.println("1. f(x) = a*sin(x) + b");
.........


try
{
System.out.println(" ");
System.out.println("Please select the problem format (1 to 4 :");
format = in.readLine();
formatnum = Integer.parseInt(format);

System.out.println(" ");
System.out.println("Please enter the value for variable 'a' (-2
to +4) :");
va = in.readLine();



.......... End of snip...........

After making the jar and wanting an do input, the graphical is shown
but no place to make the input.


Advice is desired.

Bob

Back to top
klynn47@comcast.net
Guest





PostPosted: Wed Oct 26, 2005 1:20 am    Post subject: Re: System output, input and making .jars Reply with quote



Well it appears from your program, that you will just be inputting at
the command line.

Back to top
Roedy Green
Guest





PostPosted: Wed Oct 26, 2005 1:23 am    Post subject: Re: System output, input and making .jars Reply with quote



On 25 Oct 2005 17:30:54 -0700, [email]bherbst65 (AT) hotmail (DOT) com[/email] wrote, quoted or
indirectly quoted someone who said :

Quote:
After making the jar and wanting an do input, the graphical is shown
but no place to make the input.

You probably have an association set up so that *.jar files are given
to javaw.exe rather than java.exe. Javaw suppresses the console.

Either change the association or use an explicit launch like this:

java.exe -jar myjar.jar

see
http://mindprod.com/jgloss/associations.html
http://mindprod.com/jgloss/javawexe.html
http://mindprod.com/jgloss/console.html
http://mindprod.com/jgloss/javaexe.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.

Back to top
bherbst65@hotmail.com
Guest





PostPosted: Wed Oct 26, 2005 2:08 am    Post subject: Re: System output, input and making .jars Reply with quote

Hi Roedy,

This does work :java.exe -jar myjar.jar

Added this to my file of "do this and that" to make and use .jars

Thanks for your help,

Bob

Back to top
Display posts from previous:   
Post new topic   Reply to topic    AppletTalk.com Forum Index -> Java Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.