File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Java Petstore 2.0 Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Java Petstore 2.0" Watch "Java Petstore 2.0" New topic

Java Petstore 2.0

Derek Zeng

Joined: Aug 25, 2006
Posts: 16
I download the Java Petstore 2.0 from the
It is a jar file. Inside the jar file is a big .class file.
It should have the source codes.
How can i use it?

SCJP 5.0<br />Preparing SCWCD...
Ernest Friedman-Hill
author and iconoclast

Joined: Jul 08, 2003
Posts: 24166

Run the class file.

[Jess in Action][AskingGoodQuestions]
Derek Zeng

Joined: Aug 25, 2006
Posts: 16
Please tell me how can i run the class file.
It seems no main thread there.
Ulf Dittmer

Joined: Mar 22, 2005
Posts: 39537
What happened when you typed "java -jar JarFileNameHere.jar"?

Ping & DNS - updated with new look and Ping home screen widget
Derek Zeng

Joined: Aug 25, 2006
Posts: 16
Thanks Ulf.
It installs all the sorce codes.
[ February 18, 2007: Message edited by: Derek Zeng ]
Deepak Bala

Joined: Feb 24, 2006
Posts: 6657

This is from the link you gave us

AJAX-enabled Web 2.0 Java Pet Store Reference Application for Java EE 5, 2.0 Early Access distribution. To Install: Double-click the jar file javapetstore-2.0-ea4.5-installer.jar, or run 'java -jar javapetstore-2.0-ea4.5-installer.jar' from command-line

SCJP 6 articles - SCJP 5/6 mock exams - More SCJP Mocks
Derek Zeng

Joined: Aug 25, 2006
Posts: 16
i'm sorry John.
I just double-click the .jar file.
Derek Zeng

Joined: Aug 25, 2006
Posts: 16
When I build the project, it comes out the following error message:

D:\temp\javapetstore-2.0-ea4.5\build.xml:70: The following error occurred while executing this line:
D:\temp\javapetstore-2.0-ea4.5\setup\setup.xml:58: Error opening socket to server localhost on port 1527 with message : null

Please help me what is the problem.
I agree. Here's the link:
subject: Java Petstore 2.0
Similar Threads
Need help very urgent.
Advice and help for SCEA part -2
SCEA-2 if using framework like seam then still have to use J2EE design pattrems ?
Tips on SCDJWS - 84%
Another preparation advice