• Welcome to Overclockers Forums! Join us to reply in threads, receive reduced ads, and to customize your site experience!

Learning Java

Overclockers is supported by our readers. When you click a link to make a purchase, we may earn a commission. Learn More.

psionic98

Member
Joined
Jun 22, 2009
I want to start learning java. I've done plenty of programming in C/C++/VB/VBA/HTML/XML/SQL/T-SQL

What I want to know is what do I need to have locally to do this w/o using those free online services etc for compiling and such. Either windows or *nix platform is fine.. I have both.

Gonna run this either as VM off current machine or off the 939 I have in parts in the basement.
 
Any plain text editor is fine for writing the program. Just get the JDK installed from Oracle (or for Linux search the repos for JDK or openJDK, either should work fine) then from the command line you can run

Code:
javac helloworld.java

then to start the program run

Code:
java helloworld

Pretty simple and works the same way on Windows or Linux.

I also just started creating random GUI's just to see how they work and how to make buttons and such manipulate other elements. If you like IDE's then Netbeans is great for this, but it takes a lot of the non logic code writing away from you, but this also means it takes a lot of repetitive code writing away, so to each their own.
 
NetBeans, Eclipse and JBuilder (not free) are the top IDEs for Java. I like Eclipse the best...
 
ill look into those as well.. i hated learning ASP/SQL back in the day when you had to notepad it and run it through the system.. i'd rather use something GUI related if possible like ms vis basic etc.
 
tried out eclipse so far.. seems pretty friendly so far.. ill check out jgrasp too
 
I was actually wanting to learn Java too and I stumbled upon Eclipse and NetBeans since 3 or 4 years of writing scripts in notepad almost killed me. I was wondering if they have any debugging features, resource tracking, etc? (like the stuff I am spoiled with in VS).
 
so far eclipse has caught any error i've made including missing semicolons/parens.. somewhat similar to what ms vb editors do
 
I am very proficient in C/C++, would learning Java be pretty easy? I've heard the two are very similar. And is there a free version of Eclipse? Perhaps like the VS Express stuff?
 
Eclipse is free. I studied Java for 3 semesters and C++ for 1 semester. The school I attended started with java and went to C++, so knowing the latter I would think learning the former should be fairly easy.
 
If you are a C/C+/C# programmer moving to another language should be fairly easy regardless of what the new one is (outside of jumping to assembly). All you'll really have to do is learn the syntax of the new language.
 
If you are a C/C+/C# programmer moving to another language should be fairly easy regardless of what the new one is (outside of jumping to assembly). All you'll really have to do is learn the syntax of the new language.

Yeah I guess you're right. I've picked up numerous languages for odd tasks in a few days before. I am only considering Java because it's used a lot in my future college courses (my instructors apparently don't know C too well).
 
Not a lot of places still use C.. oddly though the stock market (in my area) uses C for a lot of mundane tasks including security!
 
Yeah it seems like C++ is slowly becoming less and less popular as Java, Python, etc become more popular. Same old trend as always, the popular languages are always replaced by a higher-level language. There's pretty much little point in even knowing ASM (for highly optimized code) since hardware runs so fast now. C++'s biggest advantage was smaller and faster builds, but hardware is so good now that it's not really noticeable.
 
Yeah it seems like C++ is slowly becoming less and less popular as Java, Python, etc become more popular. Same old trend as always, the popular languages are always replaced by a higher-level language. There's pretty much little point in even knowing ASM (for highly optimized code) since hardware runs so fast now. C++'s biggest advantage was smaller and faster builds, but hardware is so good now that it's not really noticeable.

Tell that to the people making weather modeling/physics/economics software that takes hours/days to run after being highly optimized. While hardware is tons faster than it was years ago that does not give any programmer the excuse to slack off and make slow code.

As for C languages going away, I hate it. I just hope we don't move to everything being an interpreted language. Nothing runs as fast as it can when done in those kind of languages.
 
Tell that to the people making weather modeling/physics/economics software that takes hours/days to run after being highly optimized. While hardware is tons faster than it was years ago that does not give any programmer the excuse to slack off and make slow code.

As for C languages going away, I hate it. I just hope we don't move to everything being an interpreted language. Nothing runs as fast as it can when done in those kind of languages.

I hate it too. I never write slow code. I also can't stand when good programs are written in scripting languages; they could easily be written in a compiled language and ran much faster. Scripting languages were originally created to provide extendability to languages without having to recompile source code, not to write entire programs. I am not a big fan of Java since it's ran on a VM... but unfortunately clients want their code faster and writing an app in a higher language is sometimes easier and faster. Hopefully C-like languages will stick around a while longer.
 
I always like to check the TIOBE index when there's discussion about the relative popularity of languages:

http://www.tiobe.com/content/paperinfo/tpci/index.html

From its (admittedly one-dimensional) viewpoint, C and C++ aren't really going away, in fact C++ is slightly on the rise. At the expense of PHP.

I'm not too worried about scripting languages taking over the world, because the performance-critical parts of the software tend to talk to C code anyway. Not to mention the interpreter is written in C (I'm not aware of any exceptions here). Maybe people will move to prototyping in a scripting language and then porting the CPU bottlenecks to compiled code?

... I also can't stand when good programs are written in scripting languages; they could easily be written in a compiled language and ran much faster ...
What about the cases where the code is I/O-bound? Say my python script executes 100 times slower than comparable C code, but both it and the C code spend 99% of their time waiting on a database, what do I stand to gain from using the C code? In my day to day work I've yet to encounter CPU-bound code. We're waiting all freaking day on I/O, though...
 
Last edited:
I always like to check the TIOBE index when there's discussion about the relative popularity of languages:

http://www.tiobe.com/content/paperinfo/tpci/index.html

From its (admittedly one-dimensional) viewpoint, C and C++ aren't really going away, in fact C++ is slightly on the rise. At the expense of PHP.

I'm not too worried about scripting languages taking over the world, because the performance-critical parts of the software tend to talk to C code anyway. Not to mention the interpreter is written in C (I'm not aware of any exceptions here). Maybe people will move to prototyping in a scripting language and then porting the CPU bottlenecks to compiled code?


What about the cases where the code is I/O-bound? Say my python script executes 100 times slower than comparable C code, but both it and the C code spend 99% of their time waiting on a database, what do I stand to gain from using the C code? In my day to day work I've yet to encounter CPU-bound code. We're waiting all freaking day on I/O, though...

I never thought of it like that. The programs I write are usually high-performance algorithms and use very little I/O. It's usually read some I/O into a buffer, spend a long time calculating, and then dump it back. Something very important about scripting languages like Java that I left is portability. The JVM has been written for just about everything, and Java code will run on almost all of them (few exceptions with mobile) without changing anything. Then again... the JVM is usually written in C ;)
 
Back