• Post Reply Bookmark Topic Watch Topic
  • New Topic

Download very basic programs  RSS feed

 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are there any good resources to download some really basic programs that a beginner could have a look at / pull apart etc?
 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sure. Here's a link to The Java™ Tutorials. That covers large areas of the Java language and API starting from the very beginning, and most of the pages in it include some kind of sample code which you can download and hack away at. I strongly recommend the idea of mucking about with tutorial code, by the way, I've learned a lot about Java myself by doing exactly that.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Cheers Paul! Yeah I'm following some tutorials over at Udemy but I just fancied messing about with something for a bit and seeing what happened
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
One question though - these are all for Java 7, and when Java 8 come's out will these be deleted ?


You can obtain the names of the formal parameters of any method or constructor in JDK 8 with the... etc


There's a few thing's in the what's new section referring to Java 8 - is this something that's likely to trip me up a bit or should I just keep swimming?
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
their tutorial downloads are basically a load of bookmarks !



Ha, I thought they'd have made them into a pdf or something... I don't really see the point in them letting this be downloaded, is there a program to run these with that I'm missing?
 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There is a download link on the right of the first page.

Download Tutorials
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surendra Kumar wrote:There is a download link on the right of the first page.

Download Tutorials


Yeah that's where I downloaded it from :



and this is what I have :



If all there's meant to be is hyperlink's then I've got it, but It might be a bit different.
 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I see some examples inside the zip file.
examples.png
[Thumbnail for examples.png]
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the examples folder it looks like :



which look like a load of classes / project files all dumped into one folder... I've no idea what I'm mean to do with them, do I have to download intellij?
 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You can open .java files with a Notepad++.
You can have a look, compile, and run from a command window.

Hope that is what you're looking for.

You can also download Eclipse IDE (www.eclipse.org/downloads) so you can check the program and run from the IDE.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I should have said that I have Eclipse -

I'm still not sure what I'm meant to do with the files though... I've created a folder in a Workspace directory that I have lots of other Eclipse projects in (I've been writing out stuff as I follow along some tutorial videos...)

But when I start eclipse it isn't in there..
 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You may have Eclipse, but your screenshot shows that somebody who had your computer before you has installed IntelliJ IDEA. So now you have two IDE's on your computer. Which one of them should you use? Neither of them. Your goal at this point is to start learning Java, not learning how to operate a complex IDE. So, download those files into a folder of your choice (preferably a new folder created just for that purpose) and start working with them using a simple editor and command-line commands.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:You may have Eclipse, but your screenshot shows that somebody who had your computer before you has installed IntelliJ IDEA. So now you have two IDE's on your computer. Which one of them should you use? Neither of them. Your goal at this point is to start learning Java, not learning how to operate a complex IDE. So, download those files into a folder of your choice (preferably a new folder created just for that purpose) and start working with them using a simple editor and command-line commands.


Thank's Paul but I would like to use Eclipse for this and not Notepad++ or what not...

I had actually downloaded Intellij a few week's back and forgotten about it, I've deleted it now though.

I still don't know how I'm meant to organise these files an use them with Eclipse... Any help appreciated.
 
Paweł Baczyński
Bartender
Posts: 2087
44
Firefox Browser IntelliJ IDE Java Linux Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well... If you don't know how to organize those files I strongly recommend that you learn how java (command), javac, packages, directories and classpaths work before you try to learn an IDE.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Pawel Pawlowicz wrote:Well... If you don't know how to organize those files I strongly recommend that you learn how java (command), javac, packages, directories and classpaths work before you try to learn an IDE.


Well I have my Eclipse with lots of projects in it that I've made following along some video tutorials :



What I'm not sure about is how I'm mean to use these Oracle tutorials which are a mix of HTML documents and project files. If I look at the Eclipse files In Window's GUI they also have the Intellij extension so that's not really a problem :



I simply don't know what I'm meant to do with these Oracle tutorials, where all the HTML docs are meant to go / If they're meant to go any where... I've copied the whole folder into a folder that Eclipse reads from but it's not showing up in Eclipse GUI. I'm not sure if these tutorials count as 'Existing Projects' or not when I'm trying to import them, I don't know if having all the HTML files would confuse Eclipse or not

 
Surendra Kumar
Ranch Hand
Posts: 236
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Not a good idea to import everything that may confuse you.
HTML files explain about each program. So use that to understand a program.

Then, when you're ready to run and see the output, create a new project in Eclipse, copy the sample code from your download.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Surendra Kumar wrote:Not a good idea to import everything that may confuse you.
HTML files explain about each program. So use that to understand a program.

Then, when you're ready to run and see the output, create a new project in Eclipse, copy the sample code from your download.


So as I understand it from this - To view the tutorials I have to look at them in my browser, these HTML files are bunch a bunch of book marks really... And if I ever want to follow along with a tutorial / pick apart the source code I have to manually set up the project in Eclipse and then copy paste the code into it? Is that the best way to do it?
 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, I use Eclipse and I haven't ever had to go through all that song and dance to download demo code. But looking back at the thread, I haven't ever seen that "Download Tutorials" page which Surendra Kumar linked to. So fortunately I haven't had to wade through that tar pit.

What I have always done is this: I look at a particular tutorial. When I see a link to sample code which I would like to look at, I download that code. It's always a file with .java extension so you don't have to deal with counter-intuitive stuff like downloading HTML files. Then I create a new class in Eclipse (with the right name) and copy the data from the downloaded file into that class. That's much easier.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Paul Clapham wrote:Well, I use Eclipse and I haven't ever had to go through all that song and dance to download demo code. But looking back at the thread, I haven't ever seen that "Download Tutorials" page which Surendra Kumar linked to. So fortunately I haven't had to wade through that tar pit.

What I have always done is this: I look at a particular tutorial. When I see a link to sample code which I would like to look at, I download that code. It's always a file with .java extension so you don't have to deal with counter-intuitive stuff like downloading HTML files. Then I create a new class in Eclipse (with the right name) and copy the data from the downloaded file into that class. That's much easier.


I think perhaps I was expecting a bit more from the tutorials than perhaps there is - what they seem to be (to me) is just a bunch of hyperlinks and some code - so there's not really much point in downloading over accessing them from the browser as far as I can see, If the net's down they're unusable either way.

As for the code I can just copy paste that as I go from the site, so it seems like these tutorial downloads are a bit useless, I assumed that there would be a bit more to them though.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike Philips wrote:And if I ever want to follow along with a tutorial / pick apart the source code I have to manually set up the project in Eclipse and then copy paste the code into it? Is that the best way to do it?

I think what people have been trying to say is that it might be a bit too early for you to be using Eclipse - or any other IDE for that matter.

The process involved in compiling and running a Java program is not simple, and the language expects many things of you like accuracy, and knowing how to spell, that an IDE hides from you.

Personally, I dislike tutorials that assume you're going to be running an IDE - mainly because I suspect it's easier for them - and would suggest that perhaps you should look for ones (like the Oracle ones) that don't.

Winston
 
Bajrang Kar
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Writing small codes yourself is better than downloading a collection of codes.
In place of using an IDE directly, we should learn the manual way first.
Thank You.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I know what you mean, but inevitably an IDE is going to be used at some point, so I don't really see the harm. And as so many tutorials use them it's nice to be able to follow along with the same interface.

I don't just download the code and expect that to somehow download into my personal knowledge, my general work flow is to write out the code as I'm following along with the tutorial, pausing / re-watching as necessary.

I have all of one tutorial code in one folder, and I'm running the Oracles in a different one, to me having them all in one place that I can access / reference at will seem's better than having lot's of disparate notepad's lying about.

I've read different post's about the problem with IDE's, do they make programmers lazy and the danger of being tied into the functionality of a particular one... And while there are some interesting points surely in some sense they're a necessity these day's? If I want getter's and setters already I'll use Eclipse to generate them, so perhaps this is something that I should be careful of. There are arguments either way and it doesn't take much time for either side to go beyond my personal understanding of the subject.

I think that I'll end up using an IDE to write code, tutorials use an IDE to write code. That's kind of my thinking at the moment.

I've just started working through the Oracle ones, they seem pretty good.

 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike Philips wrote:As for the code I can just copy paste that as I go from the site, so it seems like these tutorial downloads are a bit useless, I assumed that there would be a bit more to them though.


Yeah, I don't see the point of downloading the tutorials either. I suppose if you were going to a place where you didn't have web access and you wanted to go through the Java tutorials, you might want to do that. But that isn't me and it isn't you either.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator


This is annoying - I don't know if what I'm learning is correct or not!
 
fred rosenberger
lowercase baba
Bartender
Posts: 12565
49
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike Philips wrote:I know what you mean, but inevitably an IDE is going to be used at some point, so I don't really see the harm.

You have come here asking for advice. People with much more experience than you have told you what they think. Of course, you are free to ignore it. But remember, if you say "well, I'm going to ignore the advice i've been given so far", many people will start thinking "why should I bother giving him my advice if he's just going to ignore it.?"


Mike Philips wrote: And as so many tutorials use them it's nice to be able to follow along with the same interface.

and many more do not use them. I'd find some of those.

Mike Philips wrote:I don't just download the code and expect that to somehow download into my personal knowledge, my general work flow is to write out the code as I'm following along with the tutorial, pausing / re-watching as necessary.
Yes, but if you use an IDE, you are missing much of what is going on. The IDE hides it from you. Many IDEs will even silently fix bad code and let you run it, even though it is not valid. This does not help you at all.


Mike Philips wrote:I've read different post's about the problem with IDE's, do they make programmers lazy and the danger of being tied into the functionality of a particular one... And while there are some interesting points surely in some sense they're a necessity these day's? If I want getter's and setters already I'll use Eclipse to generate them, so perhaps this is something that I should be careful of. There are arguments either way and it doesn't take much time for either side to go beyond my personal understanding of the subject.

For anything beyond a mildly complex program, IDEs are required, yes. But if you are just learning the language, you aren't writing anything even CLOSE to a mildly complex program, so they are NOT necessary. I don't use one at all myself. I don't write java professionally, though.

Mike Philips wrote:I think that I'll end up using an IDE to write code, tutorials use an IDE to write code. That's kind of my thinking at the moment.

again, you've been given advice by people with a LOT of experience. Ignore it if you like, but i question why you would ask for advice only to say "no, i'm gonna ignore it".
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
fred rosenberger wrote:why should I bother giving him my advice if he's just going to ignore it.?


I didn't seek advice on that topic, I was just given it. I'm not rubbishing any advice, I'm obviously not In any position to do so. But at the same time how can you expect me to take your word as infallible? When there are many tutorials out there that do use IDE's (most of the ones I've seen). It's just your word against there's, and I have to (with my lack of knowledge) make a choice from which one to go with, I try to implement as much advice as possible but if one was to do so completely nothing would ever be done as there are always two sides. Are you implying that unless I do exactly every single thing I'm told I should never ask for help and shouldn't use this site?

Yes, but if you use an IDE, you are missing much of what is going on. The IDE hides it from you. Many IDEs will even silently fix bad code and let you run it, even though it is not valid. This does not help you at all.


Using Eclipse I can have the following :



Some thing's that I've been going through tonight off the Oracle site. They're all in one place, I can access them quickly. It makes sense to me.

For anything beyond a mildly complex program, IDEs are required, yes. But if you are just learning the language, you aren't writing anything even CLOSE to a mildly complex program, so they are NOT necessary. I don't use one at all myself. I don't write java professionally, though.


I don't know how you define a mildly complex program. I'm not just learning the language, I'm learning theories that go with it as well.

again, you've been given advice by people with a LOT of experience. Ignore it if you like, but i question why you would ask for advice only to say "no, i'm gonna ignore it".


Again, I didn't ask for advice with this because I've read about it and I know that it's a back and forth issue. I've not said "no, I'm gonna ignore it" and my attitude can't be reduced to such a sentence. I haven't been using this forum for long and I really think it's great, but I don't appreciate the way you've tried to reduce me into some kind of ODD forum member. I'm happy to hear any suggestions you may have.
 
Tyson Lindner
Ranch Hand
Posts: 211
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I had to shed a few bad habits here and there, but using an IDE (Eclipse) allowed me to learn java a zillion times faster.

Maybe its just a personal fault of mine, but my code is otherwise littered with random typos and other stupid obvious mistakes. I see no reason why someone should waste time trying to chase those down when they could be learning new ways to code.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Tyson Lindner wrote:I had to shed a few bad habits here and there, but using an IDE (Eclipse) allowed me to learn java a zillion times faster.

Maybe its just a personal fault of mine, but my code is otherwise littered with random typos and other stupid obvious mistakes. I see no reason why someone should waste time trying to chase those down when they could be learning new ways to code.


Yes, I imagine they're great for bad spellers in general... I can barely write English (my native language...) without the aid of a computer. My spelling (and grasp of) is atrocious.
 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike Philips wrote:Yes, I imagine they're great for bad spellers in general... I can barely write English (my native language...) without the aid of a computer. My spelling (and grasp of) is atrocious.

Sounds like a justification for laziness to me.

The fact is that computers in general - not just Java compilers - do exactly what they're told; so if you don't learn to spot mistakes early on (and spelling is a big one), you're going to land yourself in deep caca one of these days.

As to the IDE/non-IDE argument: I don't think anyone's saying that you should never use an IDE; just that right now may be a bit too soon. It also means that questions are couched in terms of the IDE you're using, rather than what you're doing; so if we don't happen to have it/use it, we're unlikely to be able to help you.

It's probably also worth mentioning that we have a forum specifically targeted at IDEs (look under "Engineering : IDEs, Version Control and other tools"), so perhaps your question would be better targeted there. If you'd like one of us to move this thread there for you, let us know and we'll be happy to do it.

Winston
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
Mike Philips wrote:Yes, I imagine they're great for bad spellers in general... I can barely write English (my native language...) without the aid of a computer. My spelling (and grasp of) is atrocious.

Sounds like a justification for laziness to me.

The fact is that computers in general - not just Java compilers - do exactly what they're told; so if you don't learn to spot mistakes early on (and spelling is big one), you're going to land yourself in deep caca one of these days.

As to the IDE/non-IDE argument: I don't think anyone's saying that you should never use an IDE; just that right now may be a bit too soon. It also means that questions are couched in terms of the IDE you're using, rather than what you're doing; so if we don't happen to have it/use it, we're unlikely to be able to help you.

It's probably also worth mentioning that we have a forum specifically targeted at IDEs (look under "Engineering : IDEs, Version Control and other tools"), so perhaps your question would be better targeted there. If you'd like one of us to move this thread there for you, let us know and we'll be happy to do it.

Winston



The thread was never about IDE's, it just got turned into one (so perhaps it is now?). I appreciate your views, but you must empathise with mine and see the reasons that I may choose to use one. There is no ultimate 'right' answer here, I agree with the points you make and I understand them, and I'm still using an IDE. Lot's of very reputable courses use IDE's, it's not a crazy concept. But I'm just meant to think 'oh well this person on the forum said don't so I can't'. That's not logical is it? I'm listening to your advice, seeing courses that use it, and considering how I personally feel happier operating things.

This doesn't mean I'm ungrateful, or that advising me on Java is a lost cause.

Implications so far have been that I'm lazy, not worth helping and I'm expecting something along the lines of stupid next.

Thanks

 
Winston Gutkowski
Bartender
Posts: 10575
66
Eclipse IDE Hibernate Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike Philips wrote:I appreciate your views, but you must empathise with mine and see the reasons that I may choose to use one. There is no ultimate 'right' answer here, I agree with the points you make and I understand them, and I'm still using an IDE. Lot's of very reputable courses use IDE's, it's not a crazy concept.

OK, but then you need to take the time to separate what your question actually is from the IDE you're using; otherwise you're asking us to do it for you and plough through a lot of irrelevancies about the IDE.

Java is Java is Java, and you're in a Java forum.

And there's no point in saying that your thread wasn't about IDEs, because as soon as you got your downloads, the next question was "how do I deal with these in Eclipse?".

Winston
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Winston Gutkowski wrote:
Mike Philips wrote:I appreciate your views, but you must empathise with mine and see the reasons that I may choose to use one. There is no ultimate 'right' answer here, I agree with the points you make and I understand them, and I'm still using an IDE. Lot's of very reputable courses use IDE's, it's not a crazy concept.

OK, but then you need to take the time to separate what your question actually is from the IDE you're using; otherwise you're asking us to do it for you and plough through a lot of irrelevancies about the IDE.

Java is Java is Java, and you're in a Java forum.

And there's no point in saying that your thread wasn't about IDEs, because as soon as you got your downloads, the next question was "how do I deal with these in Eclipse?".

Winston


Yes I was confused as to the best way to access the downloaded Tutorials, which no-one really answered. The files are like a HTML DB of the tutorials, they aren't just book marks. I didn't twig though as whenever I opened one it came up in the browser so I just thought it was bookmark (I'm guessing this was pretty obvious so people just thought I knew that bit) The question was more how to handle the tutorials.
 
Campbell Ritchie
Marshal
Posts: 56592
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Most of us simply read the Tutorials online, so we never use a downloaded version.
 
Mike Philips
Ranch Hand
Posts: 56
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Campbell Ritchie wrote:Most of us simply read the Tutorials online, so we never use a downloaded version.


Yup seems to be the case! As do I really... But I thought It'd be nice to have them in case I spill tea on the router or something
 
Campbell Ritchie
Marshal
Posts: 56592
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The real reason for having them is so you can compare them with older versions.
When they first introduced enumerated types the tutorials called enumerated types in other languages glorified integers. They must have had complaints, because it doesn't say that now
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!