Computer Science Canada Ready to Program Java IDE and Unicode? |
Author: | FileFantasy [ Mon Nov 20, 2006 9:33 pm ] | ||
Post subject: | Ready to Program Java IDE and Unicode? | ||
Hey there, I'm trying to get unicode characters to display, but I'm pretty sure I'm missing a lot of coding. I currently don't have a comp sci course, so I don't have a teacher to ask for now... So here's my current code:
(The Console basically works as System.out.print) But when I run this code, I either get a question mark (with System.out.print), or I get a rectangular box (with c.print) So, I really need some help with this, thanks. |
Author: | wtd [ Tue Nov 21, 2006 11:46 am ] |
Post subject: | |
If you're not in a class that requires it, I would personally recommend using something other than RTP, such as the standard tools. You'll find there's a lot more support available. I will be sure to test something comparable using standard Java 1.5 the next time I have access to a decent Java setup. Or in other words, when the wife lets me reboot into Edgy. ![]() |
Author: | FileFantasy [ Wed Nov 22, 2006 10:02 pm ] |
Post subject: | |
I personally don't like RTP, but my school uses it for both Gr11 and Gr12 Comp Sci, so I'm kinda forced to use it... Bleh... |
Author: | ericfourfour [ Wed Nov 22, 2006 10:41 pm ] |
Post subject: | |
It sucks that schools use RTP. I'm trying to convince my teacher to get NetBeans. It is on "the" Java website, it is free, it can run programs with the press of one button, it is up to date (!!!!), there are various shortcuts, it has syntax highlighting, it even has error underlining, it gives you better feedback on errors, the list goes on. The only positive thing RTP has is a simple UI. The fact that it is free is a big point. If I remember correctly is costs around $1000 to put RTP on 200 computers. Let alone the ignorant students being sucked into buying it from the teacher's false advertisement (ex. saying "other Java compilers don't give feedback on errors") and saying "you get a discount if you purchase it through the school" (it only costs $40 now). It is ridiculous how the citizens pay their taxes and $1000 of that goes into a piece of garbage Java IDE instead of textbooks or *gasp* programming teachers who actually know how to teach Java (mainly not using Holt Softs library). /rant |
Author: | FileFantasy [ Sat Dec 02, 2006 1:43 pm ] |
Post subject: | |
Anyone else want to share any info? |
Author: | Aziz [ Sat Dec 02, 2006 5:11 pm ] |
Post subject: | |
I'll also advise against RTP, try JCreator or NetBeans, Eclipse, etc. Even a good text editor (notepad++) and command-line works better than RTP. You should be using the Java 5 (1.5) or even pre-release 1.6. Anyways, addressing your problem, I'm not sure of what to do, but try looking around the Java Tutorial: http://java.sun.com/docs/books/tutorial/index.html google unicode in java |
Author: | FileFantasy [ Sun Dec 03, 2006 3:36 pm ] |
Post subject: | |
See, the thing is that I'm planning for my Gr12 Comp Sci ISU right now, and it involves using East Asian countries' languages (CJK)... And because this is for school, I'm almost positive I have to do it in RTP, unless I can convince my teacher to teach the entire course in another IDE, which I doubt will happen. |
Author: | ericfourfour [ Sun Dec 03, 2006 4:58 pm ] |
Post subject: | |
There shouldn't be a problem programming in RTP as long as you stay away from that console library that holt soft made. RTP is out of date but chances are your teacher is not going to be teaching anything new. I think RTP uses Java 1.4 so I'd look into what 1.5 has that 1.4 doesn't (I know one of them is generics) so you could use your own IDE at home. |
Author: | Aziz [ Tue Dec 05, 2006 9:15 am ] |
Post subject: | |
I would recommend using a different IDE at home and using an up-to-date JDK, such as 1.6 (you can get the pre-release now). Also, check out the Java Tutorial's Internationalization trail. It might be able to help you in using different languages. |
Author: | FileFantasy [ Wed Dec 06, 2006 8:18 pm ] |
Post subject: | |
Good news. I talked to the tech teacher, and she agreed to not use RTP. She says she's looking into an IDE called JScript or something, I forgot exactly. Is that any good (if anyone knows what it is)? |
Author: | [Gandalf] [ Wed Dec 06, 2006 8:31 pm ] |
Post subject: | |
JCreator maybe? Really, it doesn't much matter what IDE you use, as long as it's not RTP, and uses an updated Sun compiler. If you want to keep it simple, all you need to make Java programs is a text editor (like TextPad and WordPad) and the Java SDK. |
Author: | Aziz [ Wed Dec 06, 2006 10:55 pm ] |
Post subject: | |
Indeed. With JCreator you can use any JDK and add documentation to it. You can get a school license, too. www.jcreator.com |
Author: | FileFantasy [ Mon Dec 11, 2006 12:24 am ] |
Post subject: | |
--Ack, why is there no edit button?! I had to delete this post and repost it because I had more to talk about-- Yes, I asked again, it's JCreator. I played around with NetBeans for a bit. I must say, I'm so used to RTP (used it for Gr. 11) that it seems quite confusing to me. But ya, still have no clue how to display CJK characters in a window. However, I can output CJK characters into an xml file, but that's not what I want. Edit: I just checked out the JCreator site and found out that there's Pro and LE, and LE is completely free. Do you think LE can be mass-used (like in a school) without any license or anything? And does it lack any features that are important when learning about the language? (More importantly, does it lack any features that RTP has other than the custom-made classes?) Because if it's suitable for school use, it's easier to get them to change IDE if they know they don't have to pay a cent... You know how schools are... |
Author: | Aziz [ Mon Dec 11, 2006 8:45 am ] |
Post subject: | |
LE is light edition. It doesn't have as many features as pro (i've got pro, it's great), but none are essential to learning. No IDE is essential to learning, though, but it does make it easy and allows the students to focus more on coding than compiling. However, unlike RTP, in better IDEs such as JCreator, you still have to compile, it's just binded to a function in the program. LE's got syntax highlighting (though you may need to replace the file with and older one because its missing a bunch of J words) and i works great. Pro's got code completion and popup, but its more of a convience issue than anything. If your school wants to be cheap (like most) just have them install LE on the machines. |
Author: | wtd [ Mon Dec 11, 2006 9:34 am ] |
Post subject: | |
Aziz wrote: If your school wants to be cheap (like most) just have them install LE on the machines.
Or Eclipse or Netbeans. |
Author: | Aziz [ Mon Dec 11, 2006 9:55 am ] |
Post subject: | |
Just not rtp, for the love of god |
Author: | FileFantasy [ Mon Dec 11, 2006 6:49 pm ] |
Post subject: | |
Haha, yea, trying to get rid of RTP, and I think I'll suggest JCreator LE to the teacher rather than NetBeans, it looks more complicated although I think it has more features than JCreator LE. Never tried Eclipse. |
Author: | Clayton [ Mon Dec 11, 2006 9:23 pm ] |
Post subject: | |
Why exactly do schools insist on using RTP? I myself have never used it, but I've heard many a horror story about it. Is it something to do with Holtsoft tightening their stranglehold on Ontario's Computer Science Curriculum? |
Author: | Aziz [ Mon Dec 11, 2006 11:14 pm ] |
Post subject: | |
First off, because Holtsoft produces Turing. So they think they're getting a wonderful product. Holtsoft also provides many books that go along with RTP. Also, it's a "learning" program. And it costs money. I think a freeware program is "not good enough" for schools, they need something "professional". |
Author: | FileFantasy [ Mon Dec 11, 2006 11:15 pm ] |
Post subject: | |
No idea. But this year's tech teacher agrees that we shouldn't use it, so it's all good. I still don't know how to get CJK characters to display though, haha... |
Author: | Aziz [ Tue Dec 12, 2006 8:41 am ] |
Post subject: | |
![]() |
Author: | FileFantasy [ Tue Dec 12, 2006 7:06 pm ] |
Post subject: | |
I did try to google it, but nothing gave me what I want, which is an explanation of why the code in my first post returns "?", and then an example of how it should be done properly (with source code). Like, I want a "hello world" example, but in CJK characters. |
Author: | gsquare567 [ Tue Dec 12, 2006 9:31 pm ] |
Post subject: | |
i say rebel against ur school. hack into the server, and change it to normal java on every computer ![]() |
Author: | ericfourfour [ Tue Dec 12, 2006 10:14 pm ] |
Post subject: | |
Well, I'd hate to break it to you gsquare567 but the Java is normal at school. It just uses an out of date compiler, and a questionable IDE. |
Author: | Aziz [ Wed Dec 13, 2006 9:36 am ] |
Post subject: | |
Did you look at the Internationalization tutorial? http://java.sun.com/docs/books/tutorial/i18n/index.html And I'm not exactly sure what CJK characters are. |
Author: | wtd [ Wed Dec 13, 2006 11:07 am ] |
Post subject: | |
If I had to guess, I'd say the acronym stands for Chinese, Japanese and Korean. |
Author: | FileFantasy [ Wed Dec 13, 2006 4:59 pm ] |
Post subject: | |
Aziz, I have, but it's so confusing that I have no idea which page to go to in order to find a simple "hello world" example of what I want, if there even is one. --------------------------- wtd, It indeed does. Like, what I'm trying to do is display, for example, the unicode 4e00 on-screen, right? That character should look like a dash ("-"), except a bit longer. However, when I do System.out.print ("\u4e00"), a question mark ("?") is displayed instead. This go for any unicode that is in the 4E00-9FA5 range. (These are Unicode CJK Unified Ideographs) |
Author: | OneOffDriveByPoster [ Fri Dec 15, 2006 10:51 am ] |
Post subject: | |
FileFantasy wrote: However, when I do System.out.print ("\u4e00"), a question mark ("?") is displayed instead. This go for any unicode that is in the 4E00-9FA5 range. (These are Unicode CJK Unified Ideographs) The question is, what font are you using? |
Author: | FileFantasy [ Fri Dec 15, 2006 10:23 pm ] |
Post subject: | |
Um, I don't specify. I just did what posted code on the first page, so I guess it's using default font, whatever that is. |
Author: | FileFantasy [ Sat Dec 16, 2006 7:33 pm ] |
Post subject: | |
Ah, ok, I decided to look into the font issue, and I found out that if I use swing, and set font of a jtextfield to Simsun or PMingLiU, and then set text to "\u4e00", it displays it properly! Issue solved, for now. Thanks everyone! ![]() ------------------ Ugh, now I have a new question... Is it possible to make user input the hex, then display the unicode for that hex? Ex. input: 4e00 output: (the chinese character for "1") The trouble I have is when I type this in my source code: Code: output.setText ("\u"+input.getText()); It says that I have an "invalid unicode escape character". |
Author: | FileFantasy [ Sat Dec 16, 2006 7:43 pm ] |
Post subject: | |
... and I just realized that for String uni = "\u4e00"; uni.length() returns 1... |
Author: | OneOffDriveByPoster [ Sat Dec 16, 2006 8:38 pm ] |
Post subject: | |
FileFantasy wrote: output.setText ("\u"+input.getText());
Might need some Integer.parseInt() action. |