• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

"Java in Easy Steps" book?

 
Greenhorn
Posts: 18
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm up to chapter 3 already and really enjoying it. Has anyone else used this book? It's what I wish the Dummies books were like. I didn't see it in the recommended list so I thought I'd share my experience with it just in case it helps someone else.

 
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please provide more details of the book so we can find it on the publisher's website.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:Please provide more details of the book so we can find it on the publisher's website.



I was curious about it so looked it up this morning. I believe it's this one http://www.amazon.com/Java-Easy-Steps-Fully-Updated/dp/1840784431
 
Laura Tobin
Greenhorn
Posts: 18
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Jaikiran Pai wrote:

Campbell Ritchie wrote:Please provide more details of the book so we can find it on the publisher's website.



I was curious about it so looked it up this morning. I believe it's this one http://www.amazon.com/Java-Easy-Steps-Fully-Updated/dp/1840784431



That's it exactly!

 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I looked at a few pages on Amazon; the actual teaching I saw looked good, but there were errors in the installation instructions.
Please go to our book review pages and see the format we use. If you have the book review it. We usually accept reviews from staff, but try and see whether you can submit something here.
 
Laura Tobin
Greenhorn
Posts: 18
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Campbell Ritchie wrote:I looked at a few pages on Amazon; the actual teaching I saw looked good, but there were errors in the installation instructions.
Please go to our book review pages and see the format we use. If you have the book review it. We usually accept reviews from staff, but try and see whether you can submit something here.



Hmmm. I have to admit I didn't even look at that section because I already had my machine set up with Eclipse
But, looking at it now, I see that it has you run a command prompt to get javac started. I don't remember ever having to do stuff like that...

 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
That is not installation instructions. The installation instructions come earlier than that. And the book is correct telling you to use the command line. Better to leave Eclipse until you are more experienced.
 
Laura Tobin
Greenhorn
Posts: 18
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I see them now. What's wrong? I mean, besides the possibility that items online have moved and the links are outdated.

As for Eclipse, well, it's what my class was using and what I got comfortable with, and when I go back they'll expect me to use it again so I'm just keeping the continuity going. It is kind of a beast though.
 
Campbell Ritchie
Marshal
Posts: 79239
377
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should put the Java® installation folder first in your PATH. They say you get the same box appear for Linux as for Windows®.
 
Laura Tobin
Greenhorn
Posts: 18
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Well I have been messing about with the book (and with other IDEs like NetBeans) and I got to a problem that I couldn't troubleshoot for anything, so I decided now's as good a time as any to try the bare naked console.
And yep. The Path settings are incorrect in the book, and your fix worked perfectly. Thanks!

Back to Chapter 4 I go... aaaand now console says it can't load the main class of my project.
 
Bartender
Posts: 689
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
1) What did you type?

2) What directory were you in when you typed it?

3) What are the contents of your main class?
 
Laura Tobin
Greenhorn
Posts: 18
Eclipse IDE Postgres Database Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
In command prompt I followed the breadcrumbs... so from c:\ prompt I went to my Workspace folder
cd workspace, then cd bullshit(i was frustrated, so that was the package name) then cd src then "Java Options1" because was the name of the file i wanted to test.

I'm wondering if it's because my files were originally made in Eclipse so they have all that package stuff on them. Or if I screwed up during setup of the JDK.


I have read that having the files inside an IDE's package can trigger this, so I made a separate copy of the file and saved it elsewhere, on its own as Options1.java
Still no dice.
 
Mike. J. Thompson
Bartender
Posts: 689
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

In command prompt I followed the breadcrumbs... so from c:\ prompt I went to my Workspace folder

cd workspace, then cd bullshit(i was frustrated, so that was the package name) then cd src then "Java Options1" because was the name of the file i wanted to test.


I'm wondering if it's because my files were originally made in Eclipse so they have all that package stuff on them. Or if I screwed up during setup of the JDK.



I have read that having the files inside an IDE's package can trigger this, so I made a separate copy of the file and saved it elsewhere, on its own as Options1.java

Still no dice.



And this is why it's important to learn the basics outside of eclipse. It's a very useful development tool, but when you're running programs in production you won't be using eclipse.

So, your workspace folder is the eclipse workspace: the directory that it will place all your eclipse projects in.

The bulls*** directory will be the name of the project you created in eclipse, and is nothing to do with Java packages.

The src directory is the default name for the directory that eclipse will place all of your source (.java) files in. If your java classes are members of a package then there will be extra directories in here, one for each part of the package name.

The compiled java .class files will not be placed in the src directory, they will be in a directory called build. It is the .class files that java looks for when running your program.

So you either need to run from the build directory, or (the better option as you'll learn more) you need to compile the code yourself using javac. Take the copy of the .java source file and try and compile that. You should end up with a .class file.

 
I am displeased. You are no longer allowed to read this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic