Link to home
Start Free TrialLog in
Avatar of juststeve
juststeve

asked on

Configuring JRE & SDK

A few newbie/install/configure questions

I'm stepping through a book on OO programming that's going to use Java. The sample code is written to 1.3. The install I've just finished shows 1.4.2. Should I expect enough compatibility problems that I should uninstall and start over with 1.3? (my primary goal isn't command of Java itself so I can live with a few flakes here and there.)

Actually, after finishing the orginal JRE install my browser still didn't show the test applet and went into an auto-install routine ... in my Add Remove Programs (running under XP) I see J2 Runtime SE v.1.4.2 _and_ 1.4.2_04. Should I remove one?

I've also installed Java 2 SKD 1.4.2 with NetBeans and that seems to be working correctly. I can compile a 'HelloWorld' from there and then run that from the command line. My most immediate problem is that I can't compile from the command line. The book says to simply enter 'javac HelloWorld' but that returns 'javac: invalid flag: HelloWorld'.

I have tried various settings with classpath including moving the command line window to the same dir as HelloWorld.java  without getting anything else.

what next?
thankx
ASKER CERTIFIED SOLUTION
Avatar of CEHJ
CEHJ
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of juststeve
juststeve

ASKER

Problem was the missing .java. Thankx!

Now to follow up on the reason for NetBeans...I installed that for sake of the IDE. I don't have the NetBeans 'installed' if i don't unzip the src.zip file to the classpath, right?
> . I don't have the NetBeans 'installed' if i don't unzip the src.zip file to the classpath, right?

I don't think that is correct, src.zip is not required.
I don't know NetBeans possibly zzynx does, but i would say that you *should* definitely become familiar with working at the command line, even if you are using an IDE, otherwise you won't learn Java from first principles properly.

It's perfectly possible to use an IDE/editor and work at the command line too - i do it myself.

The src.zip file i'd guess contains the source of Netbeans and unless you're into looking at it, should probably remain zipped. There's maybe another jar file containing the class files. If it's packaged properly, you should be able to start it by

java -classpath x.jar x.y.z.NetbeansMainClass

or better

java -jar x.jar
>> I don't have the NetBeans 'installed' if i don't unzip the src.zip file to the classpath, right?
False.
>> i'd guess contains the source of Netbeans and unless you're into looking at it, should probably remain zipped.
Right.

>> but i would say that you *should* definitely become familiar with working at the command line, even if you are using
>> an IDE, otherwise you won't learn Java from first principles properly.
Might be true. I never work at the command line.
And indeed I don't know much about setting paths and that sort of stuff.
But so far I don't need it too ;)

>>And indeed I don't know much about setting paths and that sort of stuff.
But so far I don't need it too ;)

Think of all those points you're missing solving the inevitable classpath problems ;-)
LOL
:)
8-)
Thanks for accepting.
That keeps us answering questions in the future too.