Java Forum / General / April 2008
Java IDE for Beginners
JD - 02 Jan 2007 14:23 GMT hi, i m new to java, i want to know if there is a good and free Java IDE that i can use that'll help me, i dont care if its complicated , i just want it to be good, i tried netbeans which comes bundled with java sdk 6 from sun, the prob with it is that , if i use for-each loop, it says to use option -source 1.5, i used it, didnt work, so either the IDE is faulty, or somethin is wrong with my sys config. so, can anyone recommend an IDE for me?
cp - 02 Jan 2007 16:31 GMT You can try Eclipse. Its quites powerfull and you can download alot of plugins to it for free.
IchBin - 02 Jan 2007 18:16 GMT > hi, i m new to java, i want to know if there is a good and free Java IDE > that i can use that'll help me, i dont care if its complicated , i just [quoted text clipped - 3 lines] > faulty, or somethin is wrong with my sys config. so, can anyone > recommend an IDE for me? Well the other popular free IDE is Eclipse: http://www.eclipse.org
If I was just starting out with Java I would not user Netbeans nor Eclipse. You will spend a lot of time figuring out the IDE and its functionality and not the Java language.
I would start with an IDE called 'BlueJ' http://www.bluej.org It is a simpler interface and it will teach you how to program Java with an OOD\OOP approach.
They also have worked with the Netbeans development people and have just release a BlueJ-Netbeans version.
 Signature Thanks in Advance... http://ichbinquotations.awardspace.com IchBin, Pocono Lake, Pa, USA http://ichbin.9999mb.com ______________________________________________________________________ 'If there is one, Knowledge is the "Fountain of Youth"' -William E. Taylor, Regular Guy (1952-)
Lew - 02 Jan 2007 21:23 GMT >> hi, i m new to java, i want to know if there is a good and free Java IDE >> that i can use that'll help me, i dont care if its complicated , i just >> want it to be good, i tried netbeans which comes bundled with java sdk 6 >> from sun, the prob with it is that , if i use for-each loop, it says to >> use option -source 1.5, i used it, didnt work, so either the IDE is >> faulty, or somethin is wrong with my sys config. Or you made a mistake, which is by far the most likely. I use Netbeans and have not received such a message.
Why don't you post the construct that is failing? (Copy-and-paste it; do not paraphrase.)
- Lew
JD - 02 Jan 2007 23:33 GMT >>> hi, i m new to java, i want to know if there is a good and free Java IDE >>> that i can use that'll help me, i dont care if its complicated , i just [quoted text clipped - 10 lines] > > - Lew public class VariableArgumentList { for(int a,a<=10;a++);
/** Creates a new instance of VariableArgumentList */ public static void main(String[] args) { printAll(2,"two",4,"Four",4.5,"Four Point Five"); printAll(); printAll(25,"Anything Goes",4E4,false); } public static void printAll(Object ... args){ // Error Here for(Object a:args){ // Error Here System.out.println(a);
} }
} here's the class. it wants to use -source 1.5 option, i gave it, but still nothing, i already did a clean install of the setup bout 5 times now, still it persists.
JD - 02 Jan 2007 23:36 GMT Scratch Last code, this is the correct code.
public class VariableArgumentList { // Removed faulty code from here. /** Creates a new instance of VariableArgumentList */ public static void main(String[] args) { printAll(2,"two",4,"Four",4.5,"Four Point Five"); printAll(); printAll(25,"Anything Goes",4E4,false); } public static void printAll(Object ... args){ // Error Here for(Object a:args){ // Error Here System.out.println(a);
} }
}
IchBin - 03 Jan 2007 01:52 GMT > Scratch Last code, this is the correct code. > [quoted text clipped - 7 lines] > } > public static void printAll(Object ... args){ // Error Here A method can not have a parm list the way you have it defined. Could do it this way:
public static void printAll(int v1, String v2, int v3 String v4, float v5,String v6 ){
Or create an arraylist with the stuff you want to print and then pass that.
> for(Object a:args){ // Error Here > System.out.println(a); [quoted text clipped - 3 lines] > > } Your code is completely wrong.
You need to look at the Java documentation for calling and passing data to a method.
You need to be reading up on Java in of these places:
The Java Language Specification, Third Edition http://java.sun.com/docs/books/jls/third_edition/html/j3TOC.html
The Really Big Index (A list of all content pages in the The Java Tutorial) http://java.sun.com/docs/books/tutorial/reallybigindex.html
Java Platform, Standard Edition 6 API Specification http://java.sun.com/javase/6/docs/api
The Java Developers Almanac http://www.exampledepot.com
 Signature Thanks in Advance... http://ichbinquotations.awardspace.com IchBin, Pocono Lake, Pa, USA http://ichbin.9999mb.com ______________________________________________________________________ 'If there is one, Knowledge is the "Fountain of Youth"' -William E. Taylor, Regular Guy (1952-)
JD - 03 Jan 2007 03:19 GMT >> Scratch Last code, this is the correct code. >> [quoted text clipped - 41 lines] > The Java Developers Almanac > http://www.exampledepot.com i tried this exact same code on eclipse IDE (besides, netbeans is far better than eclipse, especially for beginners like me coz it gives popups with explaination of methods) and it works, i tried this exact code using javac.exe , it works, i m using the book form WROX called ivor horton's beginning java sdk 5. the for-each loop and the new parameter passing was introduced in jdk 5, i can do it another way, but i wanna try this way to learn it, i like netbeans, but it looks like that i really have no choice but to go for eclipse.
besides, does JRE has anything to do with netbeans, i have JRE 5 installed. but i have JDK 6.
Lew - 05 Jan 2007 05:30 GMT > i tried this exact same code on eclipse IDE (besides, netbeans is far > better than eclipse, especially for beginners like me coz it gives [quoted text clipped - 7 lines] > besides, does JRE has anything to do with netbeans, i have JRE 5 > installed. but i have JDK 6. I use Netbeans 5.5 with JDK 6 and it accepts these constructs just fine. But you must hook your project up to a JDK, not a JRE.
From the Netbeans menu: "Tools / Java Platform Manager".
What are the exact error messages you get?
- Lew
Frank Stallone - 06 Apr 2008 10:50 GMT I don't knowif the newest version of that book has changed but Ivor recommends Jcreator as I had earlier. ;)
The book does have errors as does any programming book. Even if you copy it word for word make sure you check the errata page for the book to see if they've made a mistake and list the correct code.
> i tried this exact same code on eclipse IDE (besides, netbeans is far > better than eclipse, especially for beginners like me coz it gives [quoted text clipped - 7 lines] > besides, does JRE has anything to do with netbeans, i have JRE 5 > installed. but i have JDK 6. spammer -> enquiries@optimaloptimization.com
IchBin - 03 Jan 2007 03:48 GMT >> Scratch Last code, this is the correct code. >> [quoted text clipped - 41 lines] > The Java Developers Almanac > http://www.exampledepot.com Very sorry.. I should have tested the code. I have never seen a method have an argument list like this.. Guess I should read those docs.
 Signature Thanks in Advance... http://ichbinquotations.awardspace.com IchBin, Pocono Lake, Pa, USA http://ichbin.9999mb.com ______________________________________________________________________ 'If there is one, Knowledge is the "Fountain of Youth"' -William E. Taylor, Regular Guy (1952-)
Lew - 05 Jan 2007 05:26 GMT > public class VariableArgumentList { > for(int a,a<=10;a++); This is not valid 'for' syntax. It is also not valid to have a 'for' statement outside of a method in this way. Isn't there a compiler error on this line?
> /** Creates a new instance of VariableArgumentList */ Not actually what main() does.
> public static void main(String[] args) { > printAll(2,"two",4,"Four",4.5,"Four Point Five"); [quoted text clipped - 9 lines] > > } What is the exact text of the error messages?
- Lew
Sean Fritz - 06 Jan 2007 08:22 GMT >>>> hi, i m new to java, i want to know if there is a good and free Java >>>> IDE that i can use that'll help me, i dont care if its complicated , i [quoted text clipped - 31 lines] > still nothing, i already did a clean install of the setup bout 5 times > now, still it persists. I'm a little rusty in Java, but the following should meet your purpose.
public class VariableArgumentList { // Creates a new instance of VariableArgumentList VariableArgumentList() { private String[] arguments = { "2", "two", "4", "Four" }; // add more args to print out if you want }
public static void main( String[] args ) { for ( i = 0; i < arguments.length(); i++ ) { System.out.println( arguments[i] + "\n" ); } } }
Lew - 06 Jan 2007 16:25 GMT > public class VariableArgumentList > { [quoted text clipped - 13 lines] > } > } This doesn't help resolve the OP's issues with getting variable argument lists to work, that is, the language construct where you declare a method as
<access-specifier> <return-type> Foo( T ... args );
Also, your example as posted won't compile. There is no declaration of the variable 'arguments' in the main method. There is no declaration of the variable 'arguments' as an instance variable. The 'private' access specifier inside the constructor won't work. The index variable i in the for() loop is not declared. Array length is found by the array instance variable 'length', not a method 'length()'.
- Lew
kn - 09 Jan 2007 09:15 GMT I perfer eclipse, but I have to use netbeans at work, so I'm familiar with both. In projects I've worked on eclipse is better (for me) - it works faster, builds faster, does refactoring better, shows warnings, offers better quick-fix solutions, has smarter code assist and I like cvs support better. However, netbeans has (except warnings) all that features too (only not as nice), and has far superior gui designer.
People new to java usally like netbeans more, for no particular reason. I would suggest eclipse to a beginner because it shows lots of useful warnings that will teach you to write nicer code.
> hi, i m new to java, i want to know if there is a good and free Java IDE > that i can use that'll help me, i dont care if its complicated , i just [quoted text clipped - 3 lines] > faulty, or somethin is wrong with my sys config. so, can anyone > recommend an IDE for me? IchBin - 09 Jan 2007 21:29 GMT > I perfer eclipse, but I have to use netbeans at work, so I'm familiar with > both. [quoted text clipped - 18 lines] >> faulty, or somethin is wrong with my sys config. so, can anyone >> recommend an IDE for me? IMHO - I disagree. For a beginner in the Java Language, IF new to programming, to use straight Java, Javac and a text editor. Using a professional IDE for Java at this point would be very confusing. They need to get the Java fundamentals down first.
If you have programming experience with other languages and IDE's then no problem with Eclipse, Netbeans or Sun's Sun Java Studio.
I guess if the OP does not care about complexity. I guess my comments maybe mute.
 Signature Thanks in Advance... http://weconsul.zendurl.com IchBin, Pocono Lake, Pa, USA http://ichbinquotations.awardspace.com ______________________________________________________________________ 'If there is one, Knowledge is the "Fountain of Youth"' -William E. Taylor, Regular Guy (1952-)
kn - 11 Jan 2007 09:44 GMT > IMHO - I disagree. For a beginner in the Java Language, IF new to > programming, to use straight Java, Javac and a text editor. Using a > professional IDE for Java at this point would be very confusing. They need > to get the Java fundamentals down first. I do agree with you. When I was a beginner my IDE was Notepad. How I hated java case sensitivity when I swithced from MS Basic back then ;)
However JD specifically asked about an IDE so I shared my experiences with IDEs I tried.
IchBin - 11 Jan 2007 20:12 GMT >> IMHO - I disagree. For a beginner in the Java Language, IF new to >> programming, to use straight Java, Javac and a text editor. Using a [quoted text clipped - 6 lines] > However JD specifically asked about an IDE so I shared my experiences with > IDEs I tried. Cool.. no problem
 Signature Thanks in Advance... http://weconsul.zendurl.com IchBin, Pocono Lake, Pa, USA http://ichbinquotations.awardspace.com ______________________________________________________________________ 'If there is one, Knowledge is the "Fountain of Youth"' -William E. Taylor, Regular Guy (1952-)
Frank Stallone - 06 Apr 2008 10:45 GMT Using an IDE can be dangerous if you don't learn a language properly.
Having said that I don't believe in the whole "use notepad to learn" theory.
I would suggest using JCreator LE http://www.jcreator.com/
It's the free version, it loads fast and it won't be as confusing as Eclipse or Netbeans to a newcomer.
I know you said you don't care if something is complicated but if you want to learn properly you can't start off worrying about all the aspects of the IDE. You need to focus on the language only.
> hi, i m new to java, i want to know if there is a good and free Java IDE > that i can use that'll help me, i dont care if its complicated , i just [quoted text clipped - 3 lines] > faulty, or somethin is wrong with my sys config. so, can anyone > recommend an IDE for me? spammer -> enquiries@optimaloptimization.com
Free MagazinesGet these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...
|
|
|