Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > J2EE
Password Reminder
Register
| FAQ | Members List | Search | Today's Posts | Mark Forums Read
J2EE General J2EE (Java 2 Enterprise Edition) discussions. Questions not specific to EE will be redirected elsewhere.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the J2EE section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Reply
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old March 2nd, 2004, 08:28 PM
Registered User
 
Join Date: Mar 2004
Location: , , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default Trying to download Java 2 SDK

I just bought the book "Beginning Java 2".
All I need now is the SDK.

The sun download page:
    http://java.sun.com/j2se/1.4.2/download.html
is not responding.

Can I download the Java 2 SDK 1.4.2 (J2SE) from anywhere else?

Thank you for your kind attention :-)


Reply With Quote
  #2 (permalink)  
Old March 3rd, 2004, 06:23 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Try again as the link works fine for me.

Cheers

Martyn
Reply With Quote
  #3 (permalink)  
Old March 3rd, 2004, 09:27 AM
Registered User
 
Join Date: Mar 2004
Location: , , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You're right!

I've been trying all night to download from java.sun.com without being able to get the page up.
It does not appear to be available from any other sites - so it's java.sun.com or nothing.
An hour or so ago, it started working and I got my download.
It's called "j2eesdk-1_4-dr-windows-eval.exe".
When it's installed, it looks completely different from the book.
It is version 1.4.2 - Maybe the book's version was 1.4.0 ?
Anyway, I am trying to find the console to compile my first excercise.
It's all very confusing at the moment.


Reply With Quote
  #4 (permalink)  
Old March 3rd, 2004, 10:54 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
Default

You have the wrong version. You've downloaded JSSE and J2EE, which is not the same same as the standard edition that Ivor uses in his book.

If you want 1.4.0 rather than the latest version then visit this link: http://java.sun.com/j2se/1.4/index.jsp

Cheers

Martyn
Reply With Quote
  #5 (permalink)  
Old March 5th, 2004, 05:52 AM
Registered User
 
Join Date: Mar 2004
Location: , , United Kingdom.
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I am using Windows XP Professional.
The java.sun.com site offers a number of 1.4 versions

I downloaded {
    j2eesdk-1_4-dr-windows-eval.exe;
    j2re-1_4_0_04-windows-i586.exe;
    j2re-1_4_1_07-windows-i586.exe;
    j2sdk-1_4_1_07-windows-i586.exe;
}

I installed {
    j2eesdk-1_4-dr-windows-eval.exe
    to C:\JDK1.4}
It turn out to be an Enterprize edition with loads of directiories
and generally completely different from the book.
I consulted the forum and uninstalled it.

I installed {
    j2re-1_4_0_04-windows-i586.exe;
}

I made this file and saved it {
    C:\JSRC\test\test.java
}

Code:
// test.java
// Carefully copied the form from the book,
// "Beginning Java 2"
// "SDK 1.4 Edition"
// ISBN: 0-7645-4365-2
// page 17.

import javax.swing.JApplet;
import java.awt.Graphics

public class test extends JApplet {
    public void paint (Graphics g) {
        g.drawString(" This is just a test. ", 20, 90);
    }
}
I opened the Command Promt ...

C:\JDEV\test>
C:\JDEV\test>javac -source 1.4 test.java
'javac' is not recognised as an internal or external command,
operable program or batch file.

C:\JDEV\test>

ok, then -lets try this ...

C:\JDEV\test>javac -source 1.4 -classpath . test.java
'javac' is not recognised as an internal or external command,
operable program or batch file.

C:\JDEV\test>

There sure enough is no C:\JDK1.4\bin\javac.exe
But there are: java.exe, javaw.exe, jinstall.exe, keytool.exe, orbd.exe, policytool.exe, rmid.exe, rmiregistry.exe, servertool.exe, tnameserv.exe, beans.ocx, plugincpl140_04.cpl and 43 DLL files.

java.exe looks hopeful ...

C:\JDEV\test>java -source 1.4 test.java
Unrecognized option: -source
Could not create Java virtual machine.

C:\JDEV\test>

Lets try this, then ...

C:\JDEV\test>java -ea -cp . test.java
Exception in thread "main" java.lang.NoClassDefFoundError: test/java

C:\JDEV\test>

Does anybody know which version of Java the book was based on?


Reply With Quote
  #6 (permalink)  
Old March 5th, 2004, 07:07 AM
Friend of Wrox
 
Join Date: Jun 2003
Location: , , .
Posts: 175
Thanks: 0
Thanked 0 Times in 0 Posts
Default

As per my last email:

Ivor's books used J2SE not J2EE. If you are using the latest book then you need version 1.4. I gave the url for this in a previous post. If you are a total Java newbie and want to follow the book exactly then uninstall J2EE and install J2SE 1.4.

Once you have installed J2SE then open a command prompt (if you are using Windows) and type:

java -version

As I'm sure you can guess; this should display details about your version of Java. If it doesn't then you haven't installed it properly. If that's then case check that you haved added c:\j2sdk1.4\bin to your path and that you have also got this value in your JAVA_HOME environment variable.

Exception in thread "main" java.lang.NoClassDefFoundError means that your classpath is not set up correctly.

Cheers

Martyn
Reply With Quote
Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
java download help/tutorial prodigy Java Basics 1 March 18th, 2006 06:40 AM
i need <Beginning Java 2 SDK 1.3 Edition>code ajgf Wrox Book Feedback 2 September 1st, 2004 09:31 AM
JDK? SDK? Java Virtual Machine... hlchuah77 Java GUI 8 August 28th, 2004 05:02 AM
Beginning Java 2 SDK 1.4 Edition sfarber53 Forum and Wrox.com Feedback 0 July 14th, 2004 07:55 PM
Beginning Java 2 SDK by Ivor Horton problems deviad Java GUI 1 November 27th, 2003 07:38 AM



All times are GMT -4. The time now is 06:38 PM.


Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.