Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > Java > Java and JDK > BOOK: Java Programming 24-Hour Trainer by Yakov Fain
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
BOOK: Java Programming 24-Hour Trainer by Yakov Fain
This is the forum to discuss the Wrox book Java Programming 24-Hour Trainer by Yakov Fain; ISBN: 978-0-470-88964-0
Welcome to the p2p.wrox.com Forums.

You are currently viewing the BOOK: Java Programming 24-Hour Trainer by Yakov Fain 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 January 3rd, 2012, 01:58 PM
Registered User
Points: 5, Level: 1
Points: 5, Level: 1 Points: 5, Level: 1 Points: 5, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Dec 2011
Posts: 1
Thanks: 0
Thanked 1 Time in 1 Post
Question Lesson 12 - Ping Pong Game won't run threads

I am having trouble with getting lesson 12 - Ping Pong Game to run properly. For whatever reason the run() thread will not run unless I set a break-point in the run() function within the Eclipse IDE.

I have tried to run PingPongGreenTable.class from the command line with the same results...

Is there something I need to enable in order to get the threads to run properly?

Thanks in advance!
Reply With Quote
The Following User Says Thank You to Scott.Ballenger For This Useful Post:
Cristina (February 23rd, 2012)
  #2 (permalink)  
Old February 23rd, 2012, 05:35 AM
Authorized User
Points: 159, Level: 3
Points: 159, Level: 3 Points: 159, Level: 3 Points: 159, Level: 3
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Feb 2012
Location: Romania
Posts: 30
Thanks: 5
Thanked 4 Times in 4 Posts
Default

Hello,

Thanks for posting this question!

I learned a lot from getting the Ping Pong Game to run using the command line.

This is how I finally succeeded:

C:\Eclipse\Cristina\workspace\Lesson12\src\com\pra cticaljava\lesson12>javac
GameConstants.java

C:\Eclipse\Cristina\workspace\Lesson12\src\com\pra cticaljava\lesson12>javac -classpath C:\Eclipse\Cristina\workspace\Lesson12\src PingPongGreenTable.java

C:\Eclipse\Cristina\workspace\Lesson12\src\com\pra cticaljava\lesson12>javac -classpath C:\Eclipse\Cristina\workspace\Lesson12\src PingPongGameEngine.java


C:\Eclipse\Cristina\workspace\Lesson12\src\com\pra cticaljava\lesson12>java -classpath
C:\Eclipse\Cristina\workspace\Lesson12\src com.practicaljava.lesson12.PingPongGreenTable

It took me a while to understand that I needed to use the name of the class together with the name of the package when I execute PingPongGreenTable (com.practicaljava.lesson12.PingPongGreenTable in the last command), although PingPongGreenTable.class is located in the same directory where I execute the JVM.
Reply With Quote
  #3 (permalink)  
Old April 27th, 2013, 10:21 PM
Registered User
Points: 3, Level: 1
Points: 3, Level: 1 Points: 3, Level: 1 Points: 3, Level: 1
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Apr 2013
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Multithreading issue

Hi guys I was trying to run the Chapter 12 example on a MAc Book Pro. The game was not working. I fixed the issue making the ballServed variable in the
PingPongGameEngine class volatile.
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
Example 11 chapter 12 doesn't run baofu_gao BOOK: Beginning JavaScript 4th Edition 1 January 24th, 2011 10:35 AM
I can't get the postback in chapter 12 to run. rhoisy BOOK: Beginning ASP.NET 3.5 : in C# and VB BOOK ISBN: 978-0-470-18759-3 2 August 22nd, 2008 07:36 AM
Xbox 360 Game (2.0) - Pong darktatami BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 1 January 18th, 2008 05:26 AM
Pong Game Help -XM- BOOK: Professional XNA Game Programming: For Xbox 360 and Windows ISBN: 978-0-470-12677-6 4 June 20th, 2007 02:23 PM
Problems with threads. Threads disappearing? DriesNeyrinck VB.NET 0 June 10th, 2003 08:26 AM



All times are GMT -4. The time now is 03:15 PM.


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