Java Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 



Go Back   Dev Articles Community ForumsProgrammingJava Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
  #1  
Old January 28th, 2006, 10:28 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 14
Send a message via AIM to Geo.Garnett
Beginner Info!!!

Hello I am not even a beginner yet but I have a few questions about Java. I would like to know what purposes does Java serve.

Example: what is it used for, web based applications, software or both?

I would also like to know if its a compiled language or can you use a text editor. If it is a compiled languages then is there any free ware compilers.

Everything else I think I can handle as far as researching the language itself.

Thanks for any info.
__________________
---Official Member Of The Itsacon Fan Club---
Give a man a fish and he will eat for a day. Teach a man to fish and he will sit in a boat all day drinking beer.

Reply With Quote
  #2  
Old January 29th, 2006, 03:15 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m 17 sec
Reputation Power: 15
about Java, its history and its purposes

You should take a look at java.com. This website is dedicated to the consumers of Java. You can download the JRE or Java Runtime Environment for free. You will need this if you want to run a java application on your PC.
Furthermore, if you're interested in the history of Java, you can take a look at the "inside story".
And there is a link to "java everywhere", which will show you where Java is used.

A very nice book is "hello world(s) - from code to culture" which gives you an overview of the 10 years of Java. You can take a look at it at Sun.com

Java comes in 3 different flavors : JSE, JEE and JME or Java Standard Edition, Java Enterprise Edition and Java Mobile Edition.
JSE will let you make web applications or desktop software on your PC.
As soon as you have big transaction applications, like financial software, you should take a look at JEE.
JME is made for all the mobile devices, like mobile phones, PDA's.
And Java can even be on a small chip like the one you find on a smart card. This Java smart card is used to make the eID in Belgium, my homeland.
So, you can see that you will find Java almost everywhere on this planet.
And beyond : Java gave the mars rover its eyes. Java has already left earth.

Reply With Quote
  #3  
Old January 29th, 2006, 03:21 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m 17 sec
Reputation Power: 15
about the Java Virtual Machine

The purpose of Java in one sentence is "write once, run anywhere". To give you an idea what this means : I made a Java web application under Windows. After that, I transferred the classes to a Linux server without recompiling it. And it worked the same way as my local version under windows. Without having to rewrite or recompile it.

How does this work ? Imagine, there was only one computer with one operating system and one kind of processor.
It's about the big dream of Microsoft, I guess, but that's not the reality. Anyway, the people of Sun made a Java Virtual Machine that makes any kind of Java program run on whatever computer is underneath. This Java Virtual Machine is an abstraction of the collection of computers you'll find. So, there is a JVM for every combination of OS and processor : Windows, Linux 32 bits, Linux 64 bits, OS/400...

When you download the JRE or Java Runtime Environment which contains the JVM, you must choose the JRE for your operating system.

Reply With Quote
  #4  
Old January 29th, 2006, 03:23 AM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Sep 2005
Posts: 1,021 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Weeks 8 h 12 m 36 sec
Reputation Power: 14
My 2 cents:
Java is a compiled language, although not to machine code of a specific processor but to the bytecode of teh virtual machine, that's why it is 'platform independent'. You can still use a text editor to edit the source offcourse At java.sun.com you can get the JDK (Java Development Kit), i.e., the compilers, for all versions for free. The JDK's contain command line compilers. There are many IDE's out there already, I recommend the excellent _free_ ide called eclipse (eclipse.org).

Reply With Quote
  #5  
Old January 29th, 2006, 03:30 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m 17 sec
Reputation Power: 15
About the Java compiler, IDE's and stuff

If you want to develop Java programs, you should go to http://java.sun.com/ There you can download the JSDK or Java Software Development Kit. This is bigger than the JRE since it contains the javac command : javac stands for java compiler. And it's free to download the JSDK.

How do you write Java programs ? Well, all you really need is a free text editor which comes with most of the operating systems : notepad for Windows, vi for Linux.
And if you've downloaded JSDK, you have your java compiler "javac". That's all you really need.

But you can make life easier by downloading an IDE or Integrated Development Environment. This IDE will show you the errors, will let you debug.
There are a number of free IDE's for Java like Eclipse, Jcreator, JBuilder, Gel and I'm pretty sure I forget a lot of other free IDE's. Since you're not a beginner yet, I won't go into details here.

If you want do develop java web applications, you'll need a servlet container. And there is one free to download available : Tomcat.
In need of a database ? There are free versions also, like MySQL.

So you see, if you want to start to develop java applications, it won't have to cost you a lot on licenses. You can do your study work without having to give any money to the software providers. Which leaves you with a budget big enough to buy some books.
And even there, you can find ebooks and tutorials for free on the Internet. "Thinking in Java" from Bruce Eckel is a very famous book, that is free to download.
Comments on this post
Geo.Garnett agrees: Thx gertcuppens for all you info I appreciate that

Reply With Quote
  #6  
Old January 29th, 2006, 03:36 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m 17 sec
Reputation Power: 15
about MHP

You can find Java even where you would not expect it at first. For example, MHP stands for Multimedia Home Platform. This is a subset of Java made especially for the iDTV or interactive Digital Television.
What is the purpose of iDTV ? It will allow people to ask for a program or a movie on their screen when they want it. Not when the TV company broadcasts it.

Reply With Quote
  #7  
Old January 29th, 2006, 10:29 AM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 14
Send a message via AIM to Geo.Garnett
Man gertcuppens, you definately did a lot more than I would have thought. I appreciate all that information. This was exactly what I was looking for. Thx for the tips too Icon. Both you guys were a big help. I think I am going to go get a book now and get started. Im sure you will be hearing from me in a little while lol.

Reply With Quote
  #8  
Old January 30th, 2006, 12:51 AM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Sep 2005
Posts: 1,021 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Weeks 8 h 12 m 36 sec
Reputation Power: 14
Another useful place for java information is http://www.javaranch.com/ (the Big Moose saloon), they also have a lot of information on certification, sun recommends this site themselves.

Gertcuppens, have you done a lot with the Swing classes?

Reply With Quote
  #9  
Old January 30th, 2006, 02:32 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 14
Send a message via AIM to Geo.Garnett
Thx man but now I am having another small problem. I have downloaded the developer kit and sdk for java, You know the j2se 5.0. First off is that the right one for developing java applications and applets? If so - is there an easier way to compile each program. I changed the directory in the comand prompt to the location of the program. I have the exact source code from a book, but it errors unless I put the file in with the folder that the .exe is in. Is that normal or have I got something screwed up. Also I cannot use java <program name> to run my program. Is this normal, I cannot find the right .exe to use to run them. I have only a .java file so far no html or nothing else. Keep in mind this is after it has been compiled and when i try to run it, I get an error that says ERROR in "main" class something something not defined.(sorry for the fudge on the error code, IM at work).
Some help would be nice that is if Im at all understandable. So in short I guess I just need help configuring this compiler that is if I even got the right one....

Reply With Quote
  #10  
Old January 31st, 2006, 12:20 AM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Sep 2005
Posts: 1,021 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Weeks 8 h 12 m 36 sec
Reputation Power: 14
I'm at work too so I don't have much time to explain things very elaborately. First off: you haven't screwed up. For issues with where your files are when compiling you should read up about the classpath. This is either a compiler flag or an environment variable which tells the java compiler (javac) and java itself where your files are.
Now when you compile java source you produce .class files. Java programs run on a java virtual machine (JVM) and therefore Java does not produce executables. This might seem strange at first. You always need a VM to run java programs, in your case you start it with 'Java <classname>' (classname = without .class or .java), in the case of an applet or server page your browser/server will have a JVM.

As to your error, you should check your classpath, I'm almost sure that's where the problem is. Sometimes it's enough to just run 'java -classpath . MyClassName'.

If you have more trouble just ask, from all the languages I know I really like Java the most.

Good luck!

Last edited by Icon : January 31st, 2006 at 12:22 AM.

Reply With Quote
  #11  
Old January 31st, 2006, 12:15 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 14
Send a message via AIM to Geo.Garnett
Thanks Icon I appreciate the help man. I have found a way to do this for now. But I am definately going to try what you are saying because the way I am doing it for now is a little crappy. I just pull the file over the javac.exe and it compiles it. and places the .class in the folder of the .java file i just pulled over it. =). The mac way.. Is java just like. The only problem now and Im sure its just like C++ but when i do java then <program name> it runs then it comes up and goes right away. Do you have to put a system("PAUSE"); in there some were lol. or does java support anything like that. Thx for the help man, as always.

Reply With Quote
  #12  
Old January 31st, 2006, 01:41 PM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Sep 2005
Posts: 1,021 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Weeks 8 h 12 m 36 sec
Reputation Power: 14
You could go for Runtime and exec() and stuff but an easier way might be to:
System.in.read();
or something.. I never need this, I work from a terminal, the linux way
Hint: read() throws a checked exception.

By the way, you probably knew this, but here:
http://java.sun.com/j2se/1.5.0/docs/api/index.html
you can find the API for Java.
Comments on this post
Geo.Garnett agrees: Thanks for the eclipse

Reply With Quote
  #13  
Old January 31st, 2006, 05:17 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 14
Send a message via AIM to Geo.Garnett
Thx for the tips Icon... I will try that.

No I didn't find that yet. THX. I have only started like three days ago, well actually at the start of this thread. So, I have really just been researching the uses for the language and not really the syntax. But let me see if I got this correct, and I know you know C++ too but are those basically the same as includes just for java? I'm only on Chapter three of my book and we are just now at inputting data. Its kinda boring and hard to follow because its a lot like C++ and I think I'm too smart to read it cause I think I know whats coming next lol. But I'm force feeding myself its the only way, because I know I definitely don't know it all ..

Reply With Quote
  #14  
Old January 31st, 2006, 05:51 PM
Geo.Garnett's Avatar
Geo.Garnett Geo.Garnett is offline
Registered Loser
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jul 2005
Location: Retardation Nation...
Posts: 347 Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level)Geo.Garnett User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 4 Days 3 h 13 m 45 sec
Reputation Power: 14
Send a message via AIM to Geo.Garnett
Aww Man That eclipse compiler is awsome. Its kinda like Dev in a way, and brings the functionality of a regular compiler to java instead of just using a text editor. I like it, thx for that one ICON if my rep points link wasn't broken I would give ya some.

Well I guess they fixed it

Reply With Quote
  #15  
Old February 1st, 2006, 12:33 AM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Sep 2005
Posts: 1,021 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Weeks 8 h 12 m 36 sec
Reputation Power: 14
Well for starting with Java eclipse might not be the best, some subtleties will be lost on you, but after the first tutorial and a few couple of times of command-line compiling (check out how to do packages from command-line) then you should leave the command line far behind imho.

Eclipse rocks, the code completion, refactoring tools and cvs support really improve my productivity. It's a tad slow though, even though some parts are native code (the graphics widgets, SWT). I have to use Delphi for my work currently and where 5 years ago I love the Delphi IDE, I know really long for something like eclipse.

As to includes in C++, in Java you have import, but there is a big difference with how both of them work! I mean in C (and C++ I guess), include is _just_ a precompile thing where code gets thrown together, with all the naming clashes that can bring (hence namespaces in C++), in Java the package structure should take care of that and it's not just throwing code together.

Another thing I've noticed is that most people are edging on, but not really crossing, the border between procedural (i.e., C) and object oriented programming when doing C++. For JAva I really recommend you to learn to think fully in OO, maybe even look at smalltalk to see how extreme it can get (although extreme is never good).

Reply With Quote
  #16  
Old February 1st, 2006, 07:58 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,886 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 19 m 35 sec
Reputation Power: 18
I definately encourage learning/practicing object-oriented design. I was about half way through learning Java before it finally clicked... now I can't program any other way.
__________________
Daryl's Homepage | My Blogroll | My Profile | Firefox supporter!
DevArticles Forum Moderator

"The net is a waste of time, and that's exactly what's right about it." -- William Gibson

Reply With Quote
  #17  
Old February 1st, 2006, 08:17 AM
Icon's Avatar
Icon Icon is offline
Command Line Warrior
Dev Articles Beginner (1000 - 1499 posts)
 
Join Date: Sep 2005
Posts: 1,021 Icon User rank is Private First Class (20 - 50 Reputation Level)Icon User rank is Private First Class (20 - 50 Reputation Level) 
Time spent in forums: 2 Weeks 8 h 12 m 36 sec
Reputation Power: 14
I agree, after I learned Java I started doing procedural (and other more exotic) languages. Coming back to JAva after that made another click. And I must say that I feel that now after like 6 years of experience (didnt use java all the time though) there has been another click. A click which builds on top of OO and has to do with stuff ranging from importance of using design patterns, performance, maintability to the connection between source code/teamwork/software dev methodology/test-acceptance testing and all that stuff.

Reply With Quote
  #18  
Old February 4th, 2006, 02:41 AM
gertcuppens's Avatar
gertcuppens gertcuppens is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: May 2004
Posts: 118 gertcuppens User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 17 h 28 m 17 sec
Reputation Power: 15
about Swing

Sorry, Icon, for answering you so late. I didn't check my email box nor this forum for the last days. At work, I can't check my personal email box so it's left for my free hours. And the past week, I had some other things to do.

Anyway, about Swing : I must admit I've never worked with it. The reason why I'm doing java web applications with servlets and JSP's is that I wanted to make a java application without having to learn the Swing classes.
And I still haven't found the time to do something with it.

But if you want to take a look at the possibilities of Swing, you should google around looking for Romain Guy + Java.
Romain Guy is a french student who has done a lot of work in the States with Swing. He has been at Javapolis in Antwerp, Belgium in December last year and he showed the possibilities of Swing.

On his blog Romain Guy noted on the 3rd of February that the guys of Javapolis added the audio tracks together with the slides. If you're interested, you can take a look at Javapolis 2005

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJava Development > Beginner Info!!!


Developer Shed Advertisers and Affiliates


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump

Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 


Powered by: vBulletin Version 3.0.5
Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.

© 2003-2018 by Developer Shed. All rights reserved. DS Cluster - Follow our Sitemap