Welcome! Log In Create A New Profile

Advanced

Notepad suck

Posted by Einston 
Announcements Last Post
Announcement SoC Curricula 09/30/2017 01:08PM
Announcement Demarcation or scoping of examinations and assessment 02/13/2017 07:59AM
Announcement School of Computing Short Learning Programmes 11/24/2014 08:37AM
Announcement Unisa contact information 07/28/2011 01:28PM
Notepad suck
June 09, 2006 03:56PM
To all fellow Java sufferers...

Notepad suck so dont use it.
Rather use your Dev-C++ editor to create your .java files in the
following way:

Open Dev-C++ and click on Tools on the menu bar. Then click on Editor Options and go to the "General" tab. In the middle somewhere there is a box labeled "Use syntax highlighting". Add an extra colon and then java to the box. Something like this : c;cpp;h;hpp;java
Click OK at the bottom. (This is done only once)

All files with the java extension will then be highlighted like your C++ files used to be. Note that java has some reserved words that c++ dont have so these will not be highlited.

Now you create a new source file.
Then click on file -> save as.
At the bottom of the "Save As" box, select "All Files" in the bottom box. Now type your filename in the box above and just add .java at the end. Now you can add your code to the file and save again...
Dont use any compile features from Dev-C++. They dont compile java.
We are just using it as a clever text editor.

Remember to save the file before compiling it at the command prompt using javac. You dont have to close Dev-C++ to compile or run the files that you are working on.
You could even tell XP to always use Dev-C++ to open your java files.
I also used the coffee cup icon for all java files. At least we can have auto indenting and some color on the screen...

Einston
Re: Notepad suck
June 09, 2006 04:58PM
I'm using NetBeans editor from Sun nd is very happy with it. grinning smiley
avatar Re: Notepad suck
June 09, 2006 06:40PM
NetBeans is on the CD that was sent out to all COS students. It's slow (It is a Java app after all) but it does everything for you. You don't have to worry about setting up directories or anything like that.

That said, I don't use it myself. Call me impatient, but I hate having to wait for a programme to finish what it's doing. I don't have a fantastic computer so things start out tolerable but degenerate into a painfully slow process - especially with the autofill feature. That said, I don't use Notepad either. With the files so small, I am getting by on just a simple "copy con filename.java" at the command prompt. If I have any errors, I use "edit.exe" (an old DOS programme). I think it's good to start out on a command prompt system since it teaches you to think before typing. IDEs make you sloppy.

My first C++ compiler was a command prompt compiler and since I got an IDE, I've found I get a lot more syntax errors because I'm getting lazy. Currently, most of my java programmes are compiling error-free first time.

The only annoying thing is getting the indentation correct
Re: Notepad suck
June 12, 2006 09:02AM
There's a great free text editor which I use called SCITE.

It can be used for just about any programming language and even does some of the compiling for certain languages.

Find it here:

http://www.scintilla.org/SciTE.html
Re: Notepad suck
June 16, 2006 02:53PM
I use VIM in Linux/BSD and Windows. But that is a bit heavy for most people to get into. Try CoolEdit. Not sure if it's still free. But I used to use it in Windows. It's a pretty cool app.
avatar Re: Notepad suck
July 20, 2006 07:55AM
I use to use TextPad, but netBeans is MUCH better. (even if it's slower)
avatar Re: Notepad suck
July 20, 2006 08:15PM
Use JCreator LE. Its freeware. Type download JCreator on google and download it. Not doing this course this year but have the IDE on my PC and works really well.
avatar Re: Notepad suck
July 20, 2006 08:15PM
Use JCreator LE. Its freeware. Type download JCreator 3.5 on google and download it. Don't use V 2.5 which is on the COS2005 CD. I am not doing this course this year but have the IDE on my PC and works really well. winking smiley
Sorry, only registered users may post in this forum.

Click here to login