DaemonForums  

Go Back   DaemonForums > Miscellaneous > Programming

Programming C, bash, Python, Perl, PHP, Java, you name it.

Reply
 
Thread Tools Display Modes
  #1   (View Single Post)  
Old 11th March 2009
bsdnewbie999 bsdnewbie999 is offline
Package Pilot
 
Join Date: May 2008
Posts: 145
Thanked 0 Times in 0 Posts
Default Netbeans running application problem.

i run a simple helloworld program but the output shows some square characters. what is it? why i cannot see the print message?
Reply With Quote
  #2   (View Single Post)  
Old 8th April 2009
amscotti's Avatar
amscotti amscotti is offline
Real Name: Anthony Scotti
Port Guard
 
Join Date: Nov 2008
Posts: 13
Thanked 0 Times in 0 Posts
Default

I'm really not sure if this will help you but have you tried having your main method like this?

Code:
    public static void main(String[] args) {
        System.out.println("Hello World!");
    }
Seem odd to have a square character next to the "args" in your main method.
Reply With Quote
  #3   (View Single Post)  
Old 8th April 2009
roddierod's Avatar
roddierod roddierod is offline
Real Name: Rod Person
VPN Cryptographer
 
Join Date: Apr 2008
Location: Pittsburgh, Pa
Posts: 381
Thanked 13 Times in 13 Posts
Default

Looks like a font problem, have you tried different fonts?
__________________
"The basic tool for the manipulation of reality is the manipulation of words. If you can control the meaning of words, you can control the people who must use the words." -Philip K. Dick
Reply With Quote
  #4   (View Single Post)  
Old 8th April 2009
dk_netsvil dk_netsvil is offline
Real Name: Devon
Fdisk Soldier
 
Join Date: May 2008
Location: New York
Posts: 75
Thanked 7 Times in 7 Posts
Default

I think there are a couple issues going on here:

First, when you declare this class you might want to retrieve data stored in the class from an accessor method. So you would define your class, your class-level attributes, and some methods and you would define a class to test this that would call a method to retrieve your string. Otherwise use something like this:

public class HelloWorld
{
public static void main( String[] args )
{
String s = "Hello World!";
System.out.println( s );
}
}

Second, I would agree that your font might be screwed up. I'm not sure which IDE you're using, but you should be able to change it to support your character map.

However, be aware that a class is not something that should be run standalone in most implementations - if I were you I'd define a class like this:

public class HelloWorld
{
public String getHello()
{
String s = "Hello World!";
return s;
}
}

and define a class to evaluate this class like this:

public class TestHelloWorld
{
public static void main( String[] args )
{
HelloWorld hw = new HelloWorld();
System.out.println( hw.getHello() );
}

}

That's not 100% accurate, but it should give you enough to start from. I'd also recommend checking out the Java Docs in your IDE - most IDEs have decent documentation built in.

Last edited by dk_netsvil; 8th April 2009 at 07:56 PM.
Reply With Quote
  #5   (View Single Post)  
Old 12th June 2009
ocicat ocicat is offline
Administrator
 
Join Date: Apr 2008
Posts: 2,906
Thanked 190 Times in 160 Posts
Default

Just in case anyone is (re)searching NetBeans compatibility on OpenBSD, other reports have been posted to misc@ about similar square characters being displayed in the output window:

http://marc.info/?t=124471991100002&r=1&w=2

Remember, http://marc.info/ is a wonderful resource for the Open Source community. OpenBSD users should consider this as an authoritative resource on par with the manpages. Use them both, & use them often.

...& flossing after every meal is good too.

Reply With Quote
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Problem getting php running badguy OpenBSD General 7 22nd July 2009 03:34 PM
Java SE and Netbeans on OpenBSD? SunSpyda OpenBSD Packages and Ports 7 17th May 2009 09:45 PM
Best Web Application Language JMJ_coder Programming 24 25th November 2008 12:25 PM
netbeans 6.0.1 not run cuongvt FreeBSD General 5 6th June 2008 03:13 PM
[java] netbeans 6.0.1 and applets not work Mak-Di FreeBSD General 1 12th May 2008 06:04 PM


All times are GMT. The time now is 02:00 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Content copyright © 2007-2010, the authors
Daemon image copyright ©1988, Marshall Kirk McKusick