Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old June 16th, 2004, 08:15 AM
ujwala ujwala is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jun 2004
Location: alexandria, egypt
Posts: 1 ujwala User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 0
help with - illegal character: \160

I'm an absolute absolute newbie both to programming and java. I'm trying to learn to program in java on an iMac 400Mhz 320mb ram using mac os x 10.3.4

i was trying a simple program called NineSquares, i've put the code and the error message of illegal character: /160 below. any help would be highly appreciated.

thank you,
Ujwala

package NineSquares;

import javax.swing.JFrame;

public class NineSquares {
* public static void main( String args[]) {
** JFrame = myFrame = new JFrame("Nine Squares");
** myFrame.setVisible(true);
** myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_CL OSE);
*}
}

and the error message i keep getting is
-bash-2.05b$ javac firstone/NineSquares.java
firstone/NineSquares.java:7: illegal character: \160
?public static void main( String args[])
^
firstone/NineSquares.java:9: illegal character: \160
??JFrame = myFrame = new JFrame("Nine Squares");
^
firstone/NineSquares.java:9: illegal character: \160
??JFrame = myFrame = new JFrame("Nine Squares");
^
firstone/NineSquares.java:10: illegal character: \160
??myFrame.setVisible(true);
^
firstone/NineSquares.java:10: illegal character: \160
??myFrame.setVisible(true);
^
firstone/NineSquares.java:11: illegal character: \160
??myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_ CLOSE);
^
firstone/NineSquares.java:11: illegal character: \160
??myFrame.setDefaultCloseOperation(JFrame.EXIT_ON_ CLOSE);
^
firstone/NineSquares.java:12: illegal character: \160
?}
^
firstone/NineSquares.java:13: <identifier> expected
}
^
9 errors
-bash-2.05b$

Reply With Quote
  #2  
Old June 16th, 2004, 03:46 PM
dhouston's Avatar
dhouston dhouston is offline
Contributing User
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: May 2003
Location: Tennessee
Posts: 1,355 dhouston User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: < 1 sec
Reputation Power: 7
Send a message via ICQ to dhouston
Should your main() function be inside your class? That's typically outside a class, isn't it? An error like that (assuming it is an error) is the sort of thing that could cascade down and cause a whole bunch of errors like what you've got here.
__________________
Please don't PM me asking for solutions outside the scope of a thread.
Keeping all responses in a thread stands to help others who come along later,
which is after all what this forum's all about.

Reply With Quote
  #3  
Old June 18th, 2004, 04:46 AM
fizker fizker is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Apr 2004
Location: denmark
Posts: 42 fizker User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 4 h 18 m 18 sec
Reputation Power: 5
Send a message via MSN to fizker
actually, the main-method must be within a class.
but on to the various things i see: the '*' shouldn't be there. and 'JFrame = myFrame = new JFrame("Nine Squares");' should be 'JFrame myFrame = new JFrame("Nine Squares");'

There should be no '=' at that point. other than that, i see no errors.
__________________
Benjamin Horsleben
horsleben.com/benjamin
Don't blame malice for what stupidity can explain

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > help with - illegal character: \160


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 3 hosted by Hostway
Stay green...Green IT