Hi, every body
I need help in many soloution of java
is there are a software can discover the errors of java codes?
many thanks
Welcome to the Java Programming Forums
The professional, friendly Java community. 21,500 members and growing!
The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.
>> REGISTER NOW TO START POSTING
Members have full access to the forums. Advertisements are removed for registered users.
Hi, every body
I need help in many soloution of java
is there are a software can discover the errors of java codes?
many thanks
Eclipse, Netbeans, BlueJ etc..... the list goes on.
Netbeans is the JDE designed for the beginner developers, You will find it much easier to use then the rest.
BlueJ has no support on coding, Yes it shows you an error and fix message. But the problem is coding without being able to test the line without compiling every time.
Eclipse is for more advanced programmers who simply code from scratch, Eclipse will give you every error while you are typing the line of code. With a click open to fix automatically.
Net beans is recommended for you, As it includes a programming skeleton which lets you drag and drop textbox's and objects onto the frame.
What kind of errors do you mean?
If you mean syntax error, so there is a java compiler that checks the code against Java syntax.
If you mean design flaws or bad practices, have a look at Sonar tool.
java exception
Last edited by hns1984; January 11th, 2012 at 06:55 PM.
It takes hours & hours to relies the where is the error
and most of the time I couldn’tknow the place of an errors for example:
/*
2 * Summer12
3 * S2_A: find the errors
4 */
5 import Java.Util.*;
6 public class S2_A {
7 public static void main (String[] args)
8 {
9 integer number;
10 char ch1
11 string name;
12 number = 5.0;
13 ch1 = "W";
14 name = Adam;
15 System.Out.Println("your name:" ,"/n" , nama);
16 scanner sc= new (System.in);
17 name=sc_next();
18 number=sc_int();
19 } }
Smells like homework.
This kind of thing comes from practice. There really isn't a way around it, and even if there was, you'd just be cheating yourself out of an important learning process. Take a look at the compiler errors, and fix them. Then have a look at the logic of the program. Does it make sense? What is it trying to do? Is that what it does?
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
That's just it kevin.. I don't think that he has a compiler. He was asking where to find one.
NetBeans, BlueJ or Eclipse as i said.. google them.
Hmm okay, I don't think so, but maybe you're right.
But even if you are right, those aren't compilers, they're IDEs. You'll still need to download the compiler (javac), which comes with the JDK.
Recommended reading: "Hello World!" for Microsoft Windows (The Java™ Tutorials > Getting Started > The "Hello World!" Application)
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
Indeed, But it can be quiet hard to understand the console javac debugging .. and judging by his code it looks like the format of a notepad style document.
yes he will need JDK, JRE, IDE to be able to program with java.. I think that he may be new tho judging as his not to sure about what the correct tools are.
I would like it noted that the only thing you should be using to start out is a java highlighter and a compiler. This allows for manual coding that will actually get you familiar with the naming of classes, what packages have what. (Automatic importing in Eclipse makes for programmers who don't know where to look in the Java Documentation for what they want). NetBeans/Eclipse shouldn't be used for at least a year, and I only use them when I'm using largish programs (>10 classes [Which is more often than not now :/]). My favorite IDE that has only
- A Highlighter
- A Compiler
- A so-so debugger (This could be improved)
is DrJava
hmm.. Eclipse has to be my favorite by far. What do you normally use?
I absolutely, 100% agree with Tjstretch. Eclipse is for people who are already comfortable with writing Java code and consulting the API and tutorials, who know exactly what it's doing behind the scenes, how to set up packages, classpaths, create jars, etc.
I personally use jEdit when I'm entering unknown territory. Eclipse might seem like a shortcut, but I promise you, relying too heavily on an IDE will make you into a terrible programmer.
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
hehe take me for example ill have to give jEdit a go.
Don't feel bad, it can be tough to not be tempted by what seems like a shortcut. But everybody has to start from scratch when they're learning new stuff. For example, I'm using jEdit to write prolog stuff right now, and later I'm planning on using jEdit to play around with some hobby JSP stuff I've been working on. I could switch over to something that does the setup stuff for me, but then I'd have no idea what it was doing, and it would actually take me much longer to figure things out. Starting with the basics guarantees that you have those down, because they are absolutely essential to being a good programmer.
PS- Isn't it like 7 AM where you are right now? Shouldn't you go to bed?!
Useful links: How to Ask Questions the Smart Way | Use Code Tags | Java Tutorials
Static Void Games - Play indie games, learn from game tutorials and source code, upload your own games!
**Edit**
Didn't realize you were talking to someone else
Agreed, it's important to know how to do simple tasks manually, but I personally take the philosophy of "I've done it, I could do it again, but I'd rather not."
The importance of different types of information is more important to me. I could spend my time trying to memorize the package hierarchy (or Google-ing it every time), or I could spend it learning about the class hierarchy and how to use the particular class for what I'm interested in.
To this end, Eclipse is my favorite tool. The level of automation is adjustable to your tastes, with the default being basically only auto-complete and their handy error wizard. I have it turned up fairly high for a few reasons: It saves me time, it lets me focus on what it is I want to accomplish, and it produces cleaner, more consistent code. The advanced debugging tools are also nice when you know how and when to use them correctly and efficiently, though I also often use basic command line output for the sake of simplicity.
A few of my favorite Eclipse tools (in no particular order):
1. Auto-complete (I admit, I'm kind of reliant on this)
2. Auto-format
3. Generate getters & setters
4. Automatic imports
5. Debugger
6. Suggested Fixes
7. Refactoring
8. User Libraries
9. Syntax Highlighting
I'm really starting to appreciate Eclipse's GUI designer, too. The code it generates is easy to go in and tinker with manually. This lets me get the general workings setup in the GUI editor where it's easier, while letting me go in and make the small tweaks to get the desired functionality I want. This is the major point of why I've disliked Netbeans' GUI designer, and why I like WPF over Windows Forms.
/rant
Anyways, my suggestion is that Eclipse is a perfectly acceptable IDE for a beginner to start out with (I did). Above all, know how to do something manually, and if you continue to do it manually, so be it, but there are a lot of great tools built in to help the development process, particularly for larger projects. I can be a productive and happy programmer without ever having to write another import statement again