NetBeans Forums

 FAQFAQ   SearchSearch   MemberlistMemberlist   RegisterRegister   ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
  

System.out.println do not work

 
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users
View previous topic :: View next topic  
Author Message
francy77



Joined: 13 Aug 2012
Posts: 9

PostPosted: Mon Aug 13, 2012 9:25 pm    Post subject: System.out.println do not work Reply with quote

Hi all,
i'm getting crazy, i'm new to java and to neatbeans, I've just written a very simple application
Code:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package helloworldapp;

/**
 *
 * @author francesco
 */
public class HelloWorldApp {

    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        // TODO code application logic here
          System.out.println("Hello World!");
         
    }

}



I cannot see the string Hello World on the output window, cuold someone tell me why this happens, i've googled for long time whitout finding anything.
Back to top
Javier Ortiz
Posted via mailing list.





PostPosted: Mon Aug 13, 2012 9:34 pm    Post subject: System.out.println do not work Reply with quote

How are you running the above code in order to see the output?



Senior Software Quality Engineer
ArthroCare Corporation
7000 William Cannon Drive
Austin, TX 78735
Phone: 512-358-5996
email: address-removed


-----Original Message-----
From: francy77 [mailto:address-removed]
Sent: Monday, August 13, 2012 4:25 PM
To: address-removed
Subject: [nbusers] System.out.println do not work

Hi all,
i'm getting crazy, i'm new to java and to neatbeans, I've just written a very simple application

Code:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package helloworldapp;

/**
*
* @author francesco
*/
public class HelloWorldApp {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Hello World!");

}

}





I cannot see the string Hello World on the output window, cuold someone tell me why this happens, i've googled for long time whitout finding anything.




**********

The information contained in this e-mail message, together with any
attachments thereto, is intended only for the personal and confidential
use of the addressee named above. The message and the attachments
are or may be privileged or protected communication. If you are not the
intended recipient of this message, or authorized to receive it for the
intended recipient, you have received this message in error, and you
are not to review, use, disseminate, distribute or copy this message,
any attachments thereto, or their contents. If you have received this
message in error, please immediately notify us by return e-mail
message, and delete the original message.

Pursuant to Circular 230 issued by the United States Treasury
Department and relating to practice before the Internal Revenue
Services, any comment or opinion in this communication relating to a
federal tax issue is not intended to be used, and cannot be used, by a
taxpayer for the purpose of avoiding tax-related penalties that may be
imposed on the taxpayer.
Back to top
Chuck Davis
Posted via mailing list.





PostPosted: Tue Aug 14, 2012 2:55 pm    Post subject: System.out.println do not work Reply with quote

If you run your project from the IDE your output will be in the output
window of Netbeans.

If you are running your project outside the IDE you have to use an
InputOutput object to write to the output window.

HTH.

On Mon, Aug 13, 2012 at 2:25 PM, francy77 <address-removed> wrote:
Quote:
Hi all,
i'm getting crazy, i'm new to java and to neatbeans, I've just written a very simple application

Code:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package helloworldapp;

/**
*
* @author francesco
*/
public class HelloWorldApp {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Hello World!");

}

}





I cannot see the string Hello World on the output window, cuold someone tell me why this happens, i've googled for long time whitout finding anything.



Back to top
francy77



Joined: 13 Aug 2012
Posts: 9

PostPosted: Sun Sep 02, 2012 8:53 pm    Post subject: Re: System.out.println do not work Reply with quote

just click on the button "Run main project" on the netbeans. Everything goes well but in the output windows i see only BUILD SUCCESSFUL (total time: 0 seconds)

Javier Ortiz wrote:
How are you running the above code in order to see the output?


Senior Software Quality Engineer
ArthroCare Corporation
7000 William Cannon Drive
Austin, TX 78735
Phone: 512-358-5996
email: address-removed


-----Original Message-----
From: francy77 [mailto:address-removed]
Sent: Monday, August 13, 2012 4:25 PM
To: address-removed
Subject: [nbusers] System.out.println do not work

Hi all,
i'm getting crazy, i'm new to java and to neatbeans, I've just written a very simple application

Code:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package helloworldapp;

/**
*
* @author francesco
*/
public class HelloWorldApp {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Hello World!");

}

}





I cannot see the string Hello World on the output window, cuold someone tell me why this happens, i've googled for long time whitout finding anything.




**********

The information contained in this e-mail message, together with any
attachments thereto, is intended only for the personal and confidential
use of the addressee named above. The message and the attachments
are or may be privileged or protected communication. If you are not the
intended recipient of this message, or authorized to receive it for the
intended recipient, you have received this message in error, and you
are not to review, use, disseminate, distribute or copy this message,
any attachments thereto, or their contents. If you have received this
message in error, please immediately notify us by return e-mail
message, and delete the original message.

Pursuant to Circular 230 issued by the United States Treasury
Department and relating to practice before the Internal Revenue
Services, any comment or opinion in this communication relating to a
federal tax issue is not intended to be used, and cannot be used, by a
taxpayer for the purpose of avoiding tax-related penalties that may be
imposed on the taxpayer.
Back to top
francy77



Joined: 13 Aug 2012
Posts: 9

PostPosted: Sun Sep 02, 2012 9:03 pm    Post subject: Re: System.out.println do not work Reply with quote

No i run the project from the IDE, I have also tried with another version of netBeans and works.
My be i have to configure something, but what?

Chuck Davis wrote:
If you run your project from the IDE your output will be in the output
window of Netbeans.

If you are running your project outside the IDE you have to use an
InputOutput object to write to the output window.

HTH.

On Mon, Aug 13, 2012 at 2:25 PM, francy77 <address-removed> wrote:
Quote:
Hi all,
i'm getting crazy, i'm new to java and to neatbeans, I've just written a very simple application

Code:

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/

package helloworldapp;

/**
*
* @author francesco
*/
public class HelloWorldApp {

/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
System.out.println("Hello World!");

}

}





I cannot see the string Hello World on the output window, cuold someone tell me why this happens, i've googled for long time whitout finding anything.



Back to top
ShelLuser



Joined: 31 Aug 2012
Posts: 26

PostPosted: Mon Sep 03, 2012 12:09 am    Post subject: Reply with quote

This could be caused by a lot of things.

What kind of project type did you use? If you used anything else than 'Java application' then there could be a possible cause.

Another option; did you tell the IDE to create a main class and did you use that particular class for the hello world code?

Also: is it possible that you changed your NB colour scheme yourself in any way?

Finally; NB7.2 doesn't know the concept of 'main project' anymore. If you have a file open from a particular project and then select 'run project' then the associated project will be run. I know you said you were new so I doubt this applies, but since you mentioned using an older version too...

Hope this can help!
Back to top
babypip



Joined: 03 Sep 2012
Posts: 1

PostPosted: Mon Sep 03, 2012 11:00 pm    Post subject: trying Reply with quote

treeItem.setCls("noicon jstree-clicked");





treeItem.setCls("noicon jstree-clicked");




function onLoad() {

parent.menuFrame.refreshJSTree_context();
$("#tree-menu .jstree-leaf a").each(function(){
if($(this).hasClass('jstree-clicked'))
{
$(this).removeClass('jstree-clicked');
}
});

}


$("#tree-menu ul .jstree-leaf a")








$("div#tree-menu-context").tree(
{ui : {theme_name : "andesa", dots: false, "initially_select" : [ "enrollTracking" ]},
callback : {




function onLoad() {
// Refresh the context tree since we might have a new client
parent.menuFrame.refreshJSTree_context();
$("#tree-menu .jstree-leaf a").each(function(){
if($(this).hasClass('jstree-clicked'))
{
$(this).removeClass('jstree-clicked');
}
});

} //onLoad
Back to top
francy77



Joined: 13 Aug 2012
Posts: 9

PostPosted: Tue Sep 04, 2012 8:53 am    Post subject: System.out.println do not work Reply with quote

I've follow the step in the following page:
http://netbeans.org/kb/docs/java/quickstart.html

no I haven't changed the colour, as you can see (if the color was white there should be some space, or a line).

if i run it on 7.2 it works, but if i run it on 6.7.1 do not works (this netbeans as attached glassfish):

Product Version: NetBeans IDE 6.7.1 (Build 200912141238)
Java: 1.6.0_25; Java HotSpot(TM) Client VM 20.0-b11
System: Windows XP version 5.1 running on x86; Cp1252; it_IT (nb)
Userdir: C:\GlassFishESBv22\.netbeans\glassfishesb

ShelLuser wrote:
This could be caused by a lot of things.

What kind of project type did you use? If you used anything else than 'Java application' then there could be a possible cause.

Another option; did you tell the IDE to create a main class and did you use that particular class for the hello world code?

Also: is it possible that you changed your NB colour scheme yourself in any way?

Finally; NB7.2 doesn't know the concept of 'main project' anymore. If you have a file open from a particular project and then select 'run project' then the associated project will be run. I know you said you were new so I doubt this applies, but since you mentioned using an older version too...

Hope this can help!
Back to top
francy77



Joined: 13 Aug 2012
Posts: 9

PostPosted: Tue Sep 04, 2012 12:14 pm    Post subject: Re: trying Reply with quote

what do you mean?

babypip wrote:
treeItem.setCls("noicon jstree-clicked");





treeItem.setCls("noicon jstree-clicked");




function onLoad() {

parent.menuFrame.refreshJSTree_context();
$("#tree-menu .jstree-leaf a").each(function(){
if($(this).hasClass('jstree-clicked'))
{
$(this).removeClass('jstree-clicked');
}
});

}


$("#tree-menu ul .jstree-leaf a")








$("div#tree-menu-context").tree(
{ui : {theme_name : "andesa", dots: false, "initially_select" : [ "enrollTracking" ]},
callback : {




function onLoad() {
// Refresh the context tree since we might have a new client
parent.menuFrame.refreshJSTree_context();
$("#tree-menu .jstree-leaf a").each(function(){
if($(this).hasClass('jstree-clicked'))
{
$(this).removeClass('jstree-clicked');
}
});

} //onLoad
Back to top
Display posts from previous:   
Post new topic   Reply to topic    NetBeans Forums -> NetBeans Users 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
You can attach files in this forum
You can download files in this forum


Powered by phpBB
By use of this website, you agree to the NetBeans Policies and Terms of Use. © 2012, Oracle Corporation and/or its affiliates. Sponsored by Oracle logo