This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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 Android Security Essentials Live Lessons this week in the Android 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: 24183

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: 41155
What happened when you typed "java -jar JarFileNameHere.jar"?

Ping & DNS - my free Android networking tools app
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: 6661

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.
Don't get me started about those stupid light bulbs.
subject: Java Petstore 2.0
Similar Threads
SCEA-2 if using framework like seam then still have to use J2EE design pattrems ?
Need help very urgent.
Tips on SCDJWS - 84%
Advice and help for SCEA part -2
Another preparation advice