Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie

JavaC

Options
  • 16-05-2005 8:00pm
    #1
    Closed Accounts Posts: 873 ✭✭✭


    Hey im studying java with tony mullins keyboard and screen classes, we use notepad for writing the code and then we use javac nameofprogram.java in the dos window to compile and run the program, now i cant seem to get the compiler for my computer to download, anyone that could help me id really appreciate it. I understand you need to go onto either java.com or sun.com but i cant find the relevative download, j2se and different versions and all and net beans are ver confusing, if anyone can point me to the right download id be greatful, i have a pc running windows XP and i have a celeron processor.

    Thanks


«1

Comments

  • Registered Users Posts: 307 ✭✭Thordon


    The compiler is included in the JDK (also known as J2SDK), you may as well get the newest version (1.5). Dont get the JRE, thats just the runtime, and doesnt come with compiler etc.

    http://java.sun.com/j2se/1.5.0/download.jsp

    I think its the one marked: JDK 5.0 Update 3

    NetBeans is a Java IDE that Sun offer, I havent used it so cant comment, Im more of a notepad guy myself :)


  • Closed Accounts Posts: 873 ✭✭✭neon_glows


    Thanks a million, you really saved me, getting a little practice in before exam tomorrow.


  • Technology & Internet Moderators Posts: 28,804 Mod ✭✭✭✭oscarBravo


    Notepad as a Java editor seems like bloody-minded masochism. Not as much as it would be for Python, say, but painful nonetheless. Is there an overwhelming reason not to use a decent code editor?


  • Registered Users Posts: 307 ✭✭Thordon


    I actually use TextPad, but just for the syntax highlighting really, Ive also used VS.NET when coding in C#. Im not against IDE's, Im just not fond of any of the Java ones, too clunky.

    I like things like syntax highlighting, auto completion etc, but I dont like auto-gui builders and things like that, I prefer to be in control of my code as much as possible.


  • Closed Accounts Posts: 873 ✭✭✭neon_glows


    when i said notepad im actually using notepad++, very helpfull, now im stuck again, everything is installed, when i load the dos screen i type path to c:\program files\java\jdk\bin and then try to compile a program but i get the error javac is not a recognised......

    any ideas?

    iv also tried pointing to the javac file


  • Advertisement
  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    Heya,

    Is the {JDK}/bin folder in your %PATH% environment variable?
    What do you mean you've tried pointing to the javac file?

    Can you copy and paste what you've typed and the errors you're getting?

    Hmm, sometimes you have to stop and restart the DOS prompt to get changes to take effect, try that too.

    Let us know how you get on.


  • Registered Users Posts: 304 ✭✭PhantomBeaker


    Just to add onto what enygma said - Just in case you're unsure about how to set your path.

    If you're using windows 2000 or XP, your %path% variable is changed by right-clicking on "My computer" and selecting properties... on the last tab (I think) and second section down (from what I can remember, I'm on linux at the moment so Ican't check) and there should be a button either saying "Environment variables" or "Environment settings" - that's where you put in c:\program files\yada\yada\yada (yada\yada\yada not being literal :P )

    If you're using windows 95 or 98, you need to tack the directory onto the end of a statement saying "PATH=" in your C:\AUTOEXEC.BAT file.

    It should work then.

    And, man, I remember our lecturer getting us to use notepad for writing Java in 1st year CS last year. I decided to use gvim, then a nice guy showed me Eclipse, but anyone still using notepad was screwed this year in CS - mainly because we had to write much bigger projects, and most people didn't know what an IDE was, let alone how to use one! But that's aside from everything.

    P.B.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott



    And, man, I remember our lecturer getting us to use notepad for writing Java in 1st year CS last year. I decided to use gvim, then a nice guy showed me Eclipse, but anyone still using notepad was screwed this year in CS - mainly because we had to write much bigger projects, and most people didn't know what an IDE was, let alone how to use one! But that's aside from everything.

    P.B.

    College lecturers get people to use NOTEPAD? Are they MAD? No wonder you see. erm .eccentric indentation styles...


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    They do this so as not to distract the student from learning the language and the concepts of programming in that particular language.
    They don't just want to teach people how to use an IDE, unless of course you're learning Visual Whatever.


  • Moderators, Politics Moderators Posts: 39,769 Mod ✭✭✭✭Seth Brundle


    Just to add onto what enygma said - Just in case you're unsure about how to set your path.

    If you're using windows 2000 or XP,

    <snip>

    It should work then.
    Remember to restart the pc also!


  • Advertisement
  • Closed Accounts Posts: 873 ✭✭✭neon_glows


    If you're using windows 2000 or XP, your %path% variable is changed by right-clicking on "My computer" and selecting properties... on the last tab (I think) and second section down (from what I can remember, I'm on linux at the moment so Ican't check) and there should be a button either saying "Environment variables" or "Environment settings" - that's where you put in c:\program files\yada\yada\yada (yada\yada\yada not being literal :P )

    tried to do that but it wouldnt work, basically i went and i added an enviroment variable and called it javac and then added the path as "c:\program files\java\jdk\bin" in both user variables for user and for system. i then rebooted dos and tried to compile and the same error, i then tried typing the path to and then retrying but that didnt help.

    Maybe someone with broadband and msn might do a remote assistance


  • Moderators, Politics Moderators Posts: 39,769 Mod ✭✭✭✭Seth Brundle


    Remove user variables
    Edit the system variable "Path" as to
    (C:\yada;C:\yada\yada;C:\yada;c:\program files\java\jdk\bin)
    then restart


  • Closed Accounts Posts: 17,208 ✭✭✭✭aidan_walsh


    kbannon wrote:
    Remove user variables
    Edit the system variable "Path" as to
    (C:\yada;C:\yada\yada;C:\yada;c:\program files\java\jdk\bin)
    then restart
    CLASSPATH, surely?

    EDIT: My bad, you're right... :o


  • Closed Accounts Posts: 873 ✭✭✭neon_glows


    Thanks guys im up and running again, once more a great experience using the programming forum. The problem was that i wasnt calling the variable "path".


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Enygma wrote:
    They do this so as not to distract the student from learning the language and the concepts of programming in that particular language.
    They don't just want to teach people how to use an IDE, unless of course you're learning Visual Whatever.

    They could let them use a REAL EDITOR, tho.


  • Closed Accounts Posts: 1,651 ✭✭✭Enygma


    That'd make sense though


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    rsynnott wrote:
    They could let them use a REAL EDITOR, tho.

    IDEs of today tend to do a lot of hand holding. Eclipse is a brillant IDE, but takes a lot out of coding you should really know.

    Text Editor is horrible way to learn, but forces you to learn good syntax earlier on instead of letting the IDE handle it for you.


  • Registered Users Posts: 304 ✭✭PhantomBeaker


    Hobbes wrote:
    IDEs of today tend to do a lot of hand holding. Eclipse is a brillant IDE, but takes a lot out of coding you should really know.

    Text Editor is horrible way to learn, but forces you to learn good syntax earlier on instead of letting the IDE handle it for you.

    I remember my first introduction to Java... it was with a program called JavaIDE - very little more than a glorified notepad, that helped with indentation. There was nothing like syntax highlighting or anything. Just a window for coding and buttons for compiling and running the program. If it was good enough for me.... Arrrrr!

    But seriously, something like that would be ideal - because it means that students don't get lazy with their indentation, which is something I consider Holy - Do Not Mess With Indentation! Trying to read other people's code when they don't indent, or even worse, indent in an inconsistant manner, is insane!

    Notepad just makes people lazy because they have to think about how deep they've gone. They shouldn't have to worry about that, at least. As for the other stuff that IDEs automate for you, I do agree that you need to understand it before you let an IDE do it for you. It's a lifesaver, but if you don't understand what the IDE is doing, then you're gonna have Fun (in the capitalised and sarcastic sense) figuring out what went wrong.

    If I ruled the world, I'd just sit every student down with a console open and vimtutor running. They'd learn... or else they'd get the hose! :D

    But that's just me,
    Phantom Beaker.


  • Registered Users Posts: 21,264 ✭✭✭✭Hobbes


    To give a real world example.

    A friend of mine doing a java course recently couldn't figure out why he couldn't get a program to run. Turns out there were no imports in the file. He was using a text editor at home, but in school whatever IDE he was using was automatically putting the imports in for him.


  • Registered Users Posts: 8,219 ✭✭✭Calina


    We got started with EditPlus. Still like it although Eclipse would be my IDE of choice now.


  • Advertisement
  • Moderators, Education Moderators Posts: 2,432 Mod ✭✭✭✭Peteee


    I use JCreator LEfor Java and DevC++ for c++ (at least in windows, emacs in linux tbh!)

    Both nice and simple editors that have compile buttons etc and do nice sysntax highlighting, indentation etc etc


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Hobbes wrote:
    IDEs of today tend to do a lot of hand holding. Eclipse is a brillant IDE, but takes a lot out of coding you should really know.

    Text Editor is horrible way to learn, but forces you to learn good syntax earlier on instead of letting the IDE handle it for you.

    Possibly a text editor that handled UNIX line endings, tabs and such mightn't hurt, tho? And didn't require you to make a big deal of forcing it to save extensions other than "txt"?


  • Registered Users Posts: 304 ✭✭PhantomBeaker


    rsynnott wrote:
    Possibly a text editor that handled UNIX line endings, tabs and such mightn't hurt, tho? And didn't require you to make a big deal of forcing it to save extensions other than "txt"?

    Like vim? http://www.vim.org/download.php - gvim for windows does pretty much that. And I know you can get emacs for windows (it's available on our network in college) if that's your choice.

    Otherwise, you could probably get some first-year students to put their knowledge to the test and get them to write an editor themselves. I mean it would involve nothing more than your basic first-year skills - GUI bits (for the frontend and menus), exception handling, file IO and events. That said, the lecturer in UCD for first year cs didn't get as far as exception handling or IO, he did cover some limited GUI and events though. (I'm so glad I'm not a first year, and last year I had that same lecturer, but was taught by another guy before that - joy of repeats (not cs, but evil subject)) But most first-year students in a CS course should handle it.

    So, they could write an inhouse project for the next year to use and improve. :D


  • Closed Accounts Posts: 1,502 ✭✭✭MrPinK


    Like vim?
    That's the most saddistic suggestion I've ever heard. Vim should only be a punishment for murderers and kiddie fiddlers :D

    I started with Notepad along with everyone else that did Computer Applications in DCU. It's something that pretty much everyone is familiar with, so you can get on with learning to program from day 1 rather than getting to grips with some new editor/IDE that you've never heard of before. That said, you're perfectly free, and later encouraged, to move on to something better like EditPlus. Then most of us discovered the bliss of Eclipse, and our lives were complete.


  • Registered Users Posts: 2,758 ✭✭✭Peace


    I took java with Tony Mullins and IIRC tere is no problem using stuff like JCreator and the free stuff. Hell i think J# might be installed on the pc's as it comes with the student version of Visual Studio i think.

    Sure if the exam is tommorow you dead anyway ;)


  • Registered Users Posts: 26,928 ✭✭✭✭rainbow kirby


    That said, the lecturer in UCD for first year cs didn't get as far as exception handling or IO, he did cover some limited GUI and events though.
    WTF? I was in first year the year before you, and we did exception handling and IO...
    And to reply to the topic... JCreator LE. Syntax highlighting rocks.


  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    Ah, in 1st year programming (BA CS TCD), we just had a lot of random stuff with a guy who insisted we use his own personal madeup interface classes instead of System.in/out (this was in Java). I didn't go. This year, it was a bit more sensible, tho VERY abstract. If students want to write anything functional and useful, they are expected to learn themselves :rolleyes:


  • Registered Users Posts: 304 ✭✭PhantomBeaker


    WTF? I was in first year the year before you, and we did exception handling and IO...
    And to reply to the topic... JCreator LE. Syntax highlighting rocks.

    Actually, no. I was in the year before AND after you (repeating ROCKS)! :D

    The first one, we did lots of cool stuff like IO and exceptions and GUIs. The second time we had a new lecturer who spent about 3 weeks on for loops alone (That took us to about November - by roughly october we were onto objects with the first guy). The new guy then managed to cover GUIs in a lesson, same with exceptions, same with IO. This time, he didn't cover some of those, and inheritence issues went as far as telling people what "extends" means in "public class blahdiblah extents blah".

    Those guys are so screwed next year.

    I've never tried JCreator LE. There again, on the apps server in ucd there's only JBuilder 2 and 3 (or is it 3 and 4? That sounds a bit advanced). At least they have version 8 on the compsci computers on windows, and linux has v11 living there last time I checked.

    Still prefer eclipse when I can get my hands on it.


  • Registered Users Posts: 26,928 ✭✭✭✭rainbow kirby


    Those guys are so screwed next year.
    Go exams on a curve. I'm going to be in a class with them in September. :)


  • Advertisement
  • Registered Users Posts: 4,003 ✭✭✭rsynnott


    MrPinK wrote:
    That's the most saddistic suggestion I've ever heard. Vim should only be a punishment for murderers and kiddie fiddlers :D

    I started with Notepad along with everyone else that did Computer Applications in DCU. It's something that pretty much everyone is familiar with, so you can get on with learning to program from day 1 rather than getting to grips with some new editor/IDE that you've never heard of before. That said, you're perfectly free, and later encouraged, to move on to something better like EditPlus. Then most of us discovered the bliss of Eclipse, and our lives were complete.

    Nothing wrong with VIM ;) If you want a real nasty editor, try TECO. But really, Notepad is the worst screen editor in use on any mainstream operating system. It's competely feature-free. Something that could handle indentation properly (the amount of <insert your favourite curly-brackets-language here> code you see from beginners with either NO INDENTATION AT ALL or completely schizophrenic indentation is scary), and that doesn't try to force you to save everying with a ".txt" extention, and that can handle UNIX line endings without getting upset.. (note that most of Sun's example Java code in their tutorials has UNIX line endings).

    JEdit would be ideal, and is available on all platforms. I know not of this EditPlus thing of which you speak, (I avoid Windows where possible) but I'm guessing it's along the same lines.


Advertisement