🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.jbuilder.java.language
4 messages
4 total messages Started by isis Fri, 07 Apr 2006 12:54
Formatting output problem
#180
Author: isis
Date: Fri, 07 Apr 2006 12:54
21 lines
1604 bytes
having problem with Jbuilder Foundation 2005, servisepack 01, java jdk 
5.0_06 installed.
new java supports formating output (so I created project with java jdk 5)>

String.format(String str, Object args)

But when I type (example from ):
         i = 2;
        r = Math.sqrt(i);

        System.out.format("The square root of %d is %f.%n", i, r);

I cannot built the file / error ocurres>
  a.. "Root.java": cannot find symbol; symbol : method 
format(java.lang.String,int,double), location: class java.io.PrintStream at 
line 33, column 20
I really need formated output and this does not wotk. Is it necessary to set 
something to made it work? or write it in other way?
Any suggestions?

Thanks for any help 
Re: Formatting output problem
#181
Author: Lori M Olson [TeamB]
Date: Fri, 07 Apr 2006 14:49
48 lines
2388 bytes
isis wrote:
> having problem with Jbuilder Foundation 2005, servisepack 01, java jdk 
> 5.0_06 installed.
> new java supports formating output (so I created project with java jdk 5)>
> 
> String.format(String str, Object args)
> 
> But when I type (example from ):
>          i = 2;
>         r = Math.sqrt(i);
> 
>         System.out.format("The square root of %d is %f.%n", i, r);
> 
> I cannot built the file / error ocurres>
>   a.. "Root.java": cannot find symbol; symbol : method 
> format(java.lang.String,int,double), location: class java.io.PrintStream at 
> line 33, column 20
> I really need formated output and this does not wotk. Is it necessary to set 
> something to made it work? or write it in other way?
> Any suggestions?
> 
> Thanks for any help 
> 
> 

Ok, if you say you chose JDK 5, I'll believe you.  But you also need to 
set your "target" JDK/JRE to JDK 5.  Because this code won't run on 
previous versions of the JDK.  Go back to your project properties and 
make sure you have also set your target JDK.

-- 

Regards,

Lori Olson [TeamB]

------------

Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.

Google Advanced Newsgroup Search
     http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
     http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
     http://www.visi.com/~gyles19/fom-serve/cache/1.html
Re: Formatting output problem
#182
Author: isis
Date: Fri, 07 Apr 2006 16:20
56 lines
2818 bytes
OK - thanks it WORKS :o))))

But it is pitty, that it must be set explicitly - I would expect when I want 
a project written in JDK  5 -and JDK5 is not back compatible -it is supposed 
for the VM JDK 5.


"Lori M Olson [TeamB]" <javadragon@techie.com> p�se v diskusn�m pr�spevku 
news:44367bfa$1@newsgroups.borland.com...
> isis wrote:
>> having problem with Jbuilder Foundation 2005, servisepack 01, java jdk 
>> 5.0_06 installed.
>> new java supports formating output (so I created project with java jdk 
>> 5)>
>>
>> String.format(String str, Object args)
>>
>> But when I type (example from ):
>>          i = 2;
>>         r = Math.sqrt(i);
>>
>>         System.out.format("The square root of %d is %f.%n", i, r);
>>
>> I cannot built the file / error ocurres>
>>   a.. "Root.java": cannot find symbol; symbol : method 
>> format(java.lang.String,int,double), location: class java.io.PrintStream 
>> at line 33, column 20
>> I really need formated output and this does not wotk. Is it necessary to 
>> set something to made it work? or write it in other way?
>> Any suggestions?
>>
>> Thanks for any help
>
> Ok, if you say you chose JDK 5, I'll believe you.  But you also need to 
> set your "target" JDK/JRE to JDK 5.  Because this code won't run on 
> previous versions of the JDK.  Go back to your project properties and make 
> sure you have also set your target JDK.
>
> -- 
>
> Regards,
>
> Lori Olson [TeamB]
>
> ------------
>
> Save yourself, and everyone else, some time and search the
> newsgroups and the FAQ-O-Matic before posting your next
> question.
>
> Google Advanced Newsgroup Search
>     http://www.google.ca/advanced_group_search
> Other Newsgroup Searches:
>     http://www.borland.com/newsgroups/ngsearch.html
> Joi Ellis's FAQ-O-Matic:
>     http://www.visi.com/~gyles19/fom-serve/cache/1.html 
Re: Formatting output problem
#185
Author: Paul Nichols (TeamB)
Date: Tue, 11 Apr 2006 03:15
11 lines
1299 bytes
isis wrote:

> OK - thanks it WORKS :o))))
> 
> But it is pitty, that it must be set explicitly - I would expect when I
> want
> a project written in JDK  5 -and JDK5 is not back compatible -it is
> supposed for the VM JDK 5.
> 
> 
And for a good reason.. Backwards compatibility.
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads