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
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
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: 437
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
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: 3,318
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
  #6   (View Single Post)  
Old 19th October 2015
zrzut zrzut is offline
New User
 
Join Date: Oct 2015
Posts: 2
Default

I faced same on OpenBSD 5.7. I installed NetBeans 6.9.1 from OpenBSD's packages repo but ended up with same issue. After short search in google I found the thread that Ocicat mentioned earlier. Based on it I installed 'lohit-fonts' package from the repo. The only result is that instead of boxes I can see empty lines.

Do you know any other solution for the problem ?
Reply With Quote
  #7   (View Single Post)  
Old 19th October 2015
jggimi's Avatar
jggimi jggimi is offline
More noise than signal
 
Join Date: May 2008
Location: USA
Posts: 7,975
Default

I don't use netbeans. But a quick look at the port showed me that this is discussed in the OpenBSD-specific readme file, which should be installed in your /usr/local/share/doc/pkg-readmes/ directory.
Quote:
Font issues in the output window
================================

After hitting the Clean & Build or the Run buttons from
within the IDE, the output window will show square boxes
instead of fonts.

Bug 145696 was filed but marked as WONTFIX by NetBeans developers:
https://netbeans.org/bugzilla/show_bug.cgi?id=145696
Reply With Quote
  #8   (View Single Post)  
Old 2nd November 2015
zrzut zrzut is offline
New User
 
Join Date: Oct 2015
Posts: 2
Default

Little update. I have installed additional fonts that has been listed in the thread:

http://archives.neohapsis.com/archiv...9-06/0795.html

Thse are in fonts/lohit-fonts package. Firstly even after X restart the result was only no output at all (empty output).

Now I gave it the last chance and for unknown reason it started to work - I can see all output. Tested on Netbeans 6.9.1 from ports and on 8.0.2 downloaded as OS independent .zip file from Netbeans web page.
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 07:46 AM.


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