Problem with a java program "the game five in a row"
http://leepoint.net/notes-java/examples/games/five/five.html
how to run this program and c the output
i.arnav wrote:
no i want it in java programming only
plz help me how to run it if thr are any errorsI'm having a difficult time understanding your posts. THR? The Hollywood Reporter? Total Hip Replacement?The High Road (firearms forum)?
Similar Messages
-
Problem with running java program
Hey again!
I missed out some information in last posting.. here is the full description
I have just installed 1.5.0_06 and have set paths and what otherwise is necessary to run the java programs. I was testing the install and run a standard HelloWorld.java program
I got the following error:
Exception in thread main java.lang.NoClassDefFoundError: HelloWorld
what is wrong...
Here is the entire HelloWorld.java
public class HelloWorld
public HelloWorld()
System.out.println("Hello World");
public static void main(String[] args)
HelloWorld hw = new HelloWorld();
I have checked that the path is correct too..
Hopefully someone can help me!
AndersYour Path is set, probably the problem is classpath.
Change the cmd/command prompt to the directory that contains your HelloWorld.class file, verifying that it exists. If it does, issue this command from that directory:
java -cp . HelloWorld
Important: include the period and surrounding spaces
If that works, you can learn about setting and using the classpath here:
http://java.sun.com/j2se/1.5.0/docs/tooldocs/index.html#general
By the way, just add a reply to your original post with the additional information, rather than creating another post. That eliminates duplication of replies. -
I have a problem with the game Farmville on facebook.
When I go to the game ,the game doesn't fit in the frame (of Adobe flasplayer) ,so I can't game properly ,because features fall outside the frame.
I don't have this problem when I game on a notebook with Linux,there ,the game fits the frame exactly,so the problem is not with Adobe flashplayer,but with Windos 7 in combination with Firefox?Reset the page zoom on pages that cause problems: <b>View > Zoom > Reset</b> (Ctrl+0 (zero); Cmd+0 on Mac)
* http://kb.mozillazine.org/Zoom_text_of_web_pages -
Problem with small java program
need some help with a small Java assignment I am doing.
When I compile the code i get 2 errors they are
invalid method declaration: return type required
public CreateRandomFile() LINE 87
^
cannot resolve symbol
new CreateRandomFile(); LINE 112
^
Any help is greatly appreciated
**********CODE BEGINS HERE ***********************
import javax.swing.*;
import java.io.*;
import BreezySwing.*;
public class RandomTest extends GBFrame
JLabel accLabel = addLabel("Account Number",1,1,1,1);
IntegerField accField = addIntegerField(0,1,2,1,1);
JLabel firstLabel = addLabel("First Name",2,1,1,1);
JTextField firstField = addTextField("",2,2,1,1);
JLabel lastLabel = addLabel("Last Name",3,1,1,1);
JTextField lastField = addTextField("",3,2,1,1);
JTextArea resultArea = addTextArea("",4,1,2,3);
JButton acceptButton = addButton("Accept",7,1,2,1);
JButton accessButton = addButton("Access",8,1,2,1);
JButton clearButton = addButton("Clear",9,1,2,1);
private RandomAccessFile file;
public void buttonClicked(JButton buttonObj)
if (buttonObj == acceptButton)
else
if (buttonObj == accessButton)
else
accField.setNumber(0);
resultArea.setText("");
firstField.setText("");
lastField.setText("");
private void openFile()
FileOutputStream foStream = new FileOutputStream ("acc.dat");
ObjectOutputStream doStream = new ObjectOutputStream (foStream);
if ("acc.dat" == null || "acc.dat".equals(""))
System.out.println("Invalid File Name");
else
try{
file = new RandomAccessFile ("acc.dat","rw");
catch (IOException e)
System.out.println("File does not exist or Invalid File Name");
private Record getRecord()
Record record = new Record();
int accountNumber;
try{
accountNumber = Integer.parseInt(accField.getText());
if (accountNumber <1 || accountNumber >100)
System.out.println("Account doesn't exist");
return null;
file.seek((accountNumber -1)*Record.size());
record.read(file);
catch (NumberFormatException nfe)
System.out.println("Account does not exist");
System.out.println("Invalid Number Format");
catch (IOException io)
System.out.println("Error reading file");
return record;
public createRandomFile() // <----- ERROR HERE
Record blank = new Record();
openFile();
try{
file = new RandomAccessFile("acc.dat", "rw");
for (int i=0;i<100;i++)
blank.write(file);
System.exit(0);
catch (IOException e )
System.out.println("File doesn't exist");
System.out.println("Invalid File Name");
System.exit(1);
public static void main(String args[])
JFrame tpo = new RandomTest();
tpo.setTitle("Assignment 1");
tpo.setSize(200,330);
tpo.setVisible(true);
new createRandomFile(); // <--- ERROR HERE
}I changed the things you suggested by have a new error of
cannot resolve symbol
symbol : method createRandomFile ()
location: class javax.swing.JFrame
tpo.createRandomFile();
^
**************new code here***************************
import javax.swing.*;
import java.io.*;
import BreezySwing.*;
public class RandomTest extends GBFrame
JLabel accLabel = addLabel("Account Number",1,1,1,1);
IntegerField accField = addIntegerField(0,1,2,1,1);
JLabel firstLabel = addLabel("First Name",2,1,1,1);
JTextField firstField = addTextField("",2,2,1,1);
JLabel lastLabel = addLabel("Last Name",3,1,1,1);
JTextField lastField = addTextField("",3,2,1,1);
JTextArea resultArea = addTextArea("",4,1,2,3);
JButton acceptButton = addButton("Accept",7,1,2,1);
JButton accessButton = addButton("Access",8,1,2,1);
JButton clearButton = addButton("Clear",9,1,2,1);
private RandomAccessFile file;
public void buttonClicked(JButton buttonObj)
if (buttonObj == acceptButton)
else
if (buttonObj == accessButton)
else
accField.setNumber(0);
resultArea.setText("");
firstField.setText("");
lastField.setText("");
private void openFile()
FileOutputStream foStream = new FileOutputStream ("acc.dat");
ObjectOutputStream doStream = new ObjectOutputStream (foStream);
if ("acc.dat" == null || "acc.dat".equals(""))
System.out.println("Invalid File Name");
else
try{
file = new RandomAccessFile ("acc.dat","rw");
catch (IOException e)
System.out.println("File does not exist or Invalid File Name");
private Record getRecord()
Record record = new Record();
int accountNumber;
try{
accountNumber = Integer.parseInt(accField.getText());
if (accountNumber <1 || accountNumber >100)
System.out.println("Account doesn't exist");
return null;
file.seek((accountNumber -1)*Record.size());
record.read(file);
catch (NumberFormatException nfe)
System.out.println("Account does not exist");
System.out.println("Invalid Number Format");
catch (IOException io)
System.out.println("Error reading file");
return record;
public void createRandomFile()
Record blank = new Record();
openFile();
try{
file = new RandomAccessFile("acc.dat", "rw");
for (int i=0;i<100;i++)
blank.write(file);
System.exit(0);
catch (IOException e )
System.out.println("File doesn't exist");
System.out.println("Invalid File Name");
System.exit(1);
public static void main(String args[])
JFrame tpo = new RandomTest();
tpo.setTitle("Assignment 1");
tpo.setSize(200,330);
tpo.setVisible(true);
tpo.createRandomFile();
} -
Big Fish Games stop working in Mavericks. What do I do? I have re-installed them and the manager app, and nothing. I have not gotten an answer from Big Fish tech staff. Thought the problem might be with Maverick. all the games worked with Snow Leopard
Any body have this kind of problem. What was done to correct it. . .I can't wait to get a new phone as well. LG Revolution owners should be comped for this phone if Verizon intends to keep them as customers.
-
I have problem with all downloaded programs all the sudden, keynote, pages and adobe reader. what could be the reason and solution?
There is no Adobe Reader for the iPad.
You're going to have to be much more specific to get help - what kind of problems are you having with the apps? -
Problem with a top down shooter game I have coded
I have created a space Invaders type of a game in JavaFX, now the game works fine from start to finish with the exception of the sound effects (I am still working on them). My problem comes when I play the game again from the splash screen. That is I do not close the application and start it over. At that point the game starts to freeze up, and move very slowly as if all the RAM had been used up on my machine. In the worse case the game just freezes all together.
I know that this would be much easier with code samples, of my work, but I have not a clue where the problem is coming form and to post the full code here would make things a mess.
I would like to know if any of you out there have had a similar problem and what caused it, and how maybe to go about fixing this problem.
My fist thought was garbage collection but that seems to be automatic with the netbeans ide.
Any suggestion would be very welcome.
Thanks in advance.try -Xmx768m to give your application more ram.
Check your ram consumptation on your ingame restart. If ram consumption always goes up you have
a "java memory leak". Means some objects are never set to null. Like some endless growing lists for example.
Cheers
suvi.org -
Problem with a wrapper program.
Hi all,
we are facing problem with a wrapper program,through which we are calling three different xml reports.
when we independently submit these xml reports thorugh front end .
All the three programs run successfully & gives the desired output.
but when we run this through wrapper program.
All ths three programs run successfully ,but don't give output,i.e. output file comes as blank.
when I 'VIEW DETAILS" on the SRS window, the only difference between the independent program & the report through wrapper program is the 'UPON COMPLETION..'part.
The 'UPON COMPLETION..'part. for the independent program shows the RTF Template Layout name ,while the program submitted through the wrapper program doesn't show the layout name.
i have registered all the three reports as XML REPORTS,while the wrapper program as "package_name.procedure_name" & 'TEXT' as an output format.
can anybody tell us , the problem??
thanks.Wow, that's a lot of work. This isn't any different than PL/SQL in the real Oracle world. Parameters are named or positional. Named input uses the assignment operator of =>. Positional takes them in order per the procedure/function signature. In SQL*Plus, do a desc on fnd_request (owned by apps) and tell us what the "default" column represents.
If you have been typing in all arguments, figure out how many times you've done that, how much time it took, multiply it by your hourly rate, and then tell your manager you owe your company that amount of money for having wasted so much time.
function submit_request (
application IN varchar2 default NULL,
program IN varchar2 default NULL,
description IN varchar2 default NULL,
start_time IN varchar2 default NULL,
sub_request IN boolean default FALSE,
argument1 IN varchar2 default CHR(0),
argument2 IN varchar2 default CHR(0),
argument3 IN varchar2 default CHR(0),
argument4 IN varchar2 default CHR(0),
argument5 IN varchar2 default CHR(0),
argument6 IN varchar2 default CHR(0),
argument7 IN varchar2 default CHR(0),
argument8 IN varchar2 default CHR(0),
argument9 IN varchar2 default CHR(0),
argument10 IN varchar2 default CHR(0),
argument11 IN varchar2 default CHR(0),
argument12 IN varchar2 default CHR(0),
argument13 IN varchar2 default CHR(0),
argument14 IN varchar2 default CHR(0),
argument15 IN varchar2 default CHR(0),
argument16 IN varchar2 default CHR(0),
argument17 IN varchar2 default CHR(0),
argument18 IN varchar2 default CHR(0),
argument19 IN varchar2 default CHR(0),
argument20 IN varchar2 default CHR(0),
argument21 IN varchar2 default CHR(0),
argument22 IN varchar2 default CHR(0),
argument23 IN varchar2 default CHR(0),
argument24 IN varchar2 default CHR(0),
argument25 IN varchar2 default CHR(0),
argument26 IN varchar2 default CHR(0),
argument27 IN varchar2 default CHR(0),
argument28 IN varchar2 default CHR(0),
argument29 IN varchar2 default CHR(0),
argument30 IN varchar2 default CHR(0),
argument31 IN varchar2 default CHR(0),
argument32 IN varchar2 default CHR(0),
argument33 IN varchar2 default CHR(0),
argument34 IN varchar2 default CHR(0),
argument35 IN varchar2 default CHR(0),
argument36 IN varchar2 default CHR(0),
argument37 IN varchar2 default CHR(0),
argument38 IN varchar2 default CHR(0),
argument39 IN varchar2 default CHR(0),
argument40 IN varchar2 default CHR(0),
argument41 IN varchar2 default CHR(0),
argument42 IN varchar2 default CHR(0),
argument43 IN varchar2 default CHR(0),
argument44 IN varchar2 default CHR(0),
argument45 IN varchar2 default CHR(0),
argument46 IN varchar2 default CHR(0),
argument47 IN varchar2 default CHR(0),
argument48 IN varchar2 default CHR(0),
argument49 IN varchar2 default CHR(0),
argument50 IN varchar2 default CHR(0),
argument51 IN varchar2 default CHR(0),
argument52 IN varchar2 default CHR(0),
argument53 IN varchar2 default CHR(0),
argument54 IN varchar2 default CHR(0),
argument55 IN varchar2 default CHR(0),
argument56 IN varchar2 default CHR(0),
argument57 IN varchar2 default CHR(0),
argument58 IN varchar2 default CHR(0),
argument59 IN varchar2 default CHR(0),
argument60 IN varchar2 default CHR(0),
argument61 IN varchar2 default CHR(0),
argument62 IN varchar2 default CHR(0),
argument63 IN varchar2 default CHR(0),
argument64 IN varchar2 default CHR(0),
argument65 IN varchar2 default CHR(0),
argument66 IN varchar2 default CHR(0),
argument67 IN varchar2 default CHR(0),
argument68 IN varchar2 default CHR(0),
argument69 IN varchar2 default CHR(0),
argument70 IN varchar2 default CHR(0),
argument71 IN varchar2 default CHR(0),
argument72 IN varchar2 default CHR(0),
argument73 IN varchar2 default CHR(0),
argument74 IN varchar2 default CHR(0),
argument75 IN varchar2 default CHR(0),
argument76 IN varchar2 default CHR(0),
argument77 IN varchar2 default CHR(0),
argument78 IN varchar2 default CHR(0),
argument79 IN varchar2 default CHR(0),
argument80 IN varchar2 default CHR(0),
argument81 IN varchar2 default CHR(0),
argument82 IN varchar2 default CHR(0),
argument83 IN varchar2 default CHR(0),
argument84 IN varchar2 default CHR(0),
argument85 IN varchar2 default CHR(0),
argument86 IN varchar2 default CHR(0),
argument87 IN varchar2 default CHR(0),
argument88 IN varchar2 default CHR(0),
argument89 IN varchar2 default CHR(0),
argument90 IN varchar2 default CHR(0),
argument91 IN varchar2 default CHR(0),
argument92 IN varchar2 default CHR(0),
argument93 IN varchar2 default CHR(0),
argument94 IN varchar2 default CHR(0),
argument95 IN varchar2 default CHR(0),
argument96 IN varchar2 default CHR(0),
argument97 IN varchar2 default CHR(0),
argument98 IN varchar2 default CHR(0),
argument99 IN varchar2 default CHR(0),
argument100 IN varchar2 default CHR(0))
return number; -
Hello i have a problem with my airport express the music sizzles? Why?
Hello i have a problem with my airport express the music sizzles? Why?
What can i do?Does the game has the same iOS requirements that your phone has? Games needing iOS7 will not install on iOS6 and earlier.
Did you try to download it to your computer and sync it to your phone after that?
If you can't connect to the iTunes Store, try these suggestions:
Can't connect to the iTunes Store -
# Question
We like to play games with Spigo. But the games do'nt come totaly on the PC. I think they are 75 %. Can you help us? [email protected]Do you mean that the game doesn't load or that you do not see the complete page?
Reset the page zoom on pages that cause problems: <b>Beeld > Zoomen > Herinitialiseren</b> (Ctrl+0 (zero))
* [[Page Zoom]]
* [[Text Zoom]] -
Problem with EasyIn.java
Well i've found EasyIn.java but when i try to compile my HelloWorld.java program the following error message occurs, can anyone explain this?
HelloWorld.java :6: cannot resolve symbol
symbol: variable EasyIn
location: class HelloWorld
EasyIn.pause ();
^
1 error
Thankyou in advance to anyone who can helpEnglish translation in bold.
Well i've found EasyIn.java but when i try to compile
my HelloWorld.java program the following error message
occurs, can anyone explain this?
HelloWorld.java :6: cannot resolve symbol
On line 6 of the file "HelloWorld.java", I found a symbol that I do not recognize.
symbol: variable EasyIn
The symbol that I could not recognize at the above location is a variable called "EasyIn".
location: class HelloWorld
The location where that variable was used is found in the class "HellowWorld"
EasyIn.pause ();
^
Here is the line I'm having trouble with. The ^ points to the start of my worries.
>
1 error
By the way, here is a count of how many errors I've found in your code.
Basically, the compiler is complaining that it could not find the EasyIn class. Make sure you've compiled this class, and your classpath included it's location. -
Problem with a compiled program
Hello,
I have a problem with a compiled program on labview 6i.
This program used a serial port (COM1 or COM2).
During the launching of the ".exe ", a fatal error occurs.
Here this error:
=> APPLICATION caused an invalid page fault in
=> module LVRT.DLL at 0167:30164426.
Can somebody help me?
Regards
CedricCedric,
This problem was fixed in the LabVIEW 6.0.2 update. You can download this update (along with the updated runtime engine) from our website.
Good luck with your application, and have a pleasant day.
Sincerely,
Darren N.
NI Applications Engineer
Darren Nattinger, CLA
LabVIEW Artisan and Nugget Penman -
Problems with "no color" in the "Fill and Stroke"
I am having problems with “no color” in the “Fill and Stroke” function of Flash CS4 Pro.
I had been using CS4 for 10 days and everything worked fine. Then I tried experimenting with various color combinations (along with “no color”) for “Fill and Stroke” for a simple button. Suddenly CS4 locked up on me while I was working with the “color panel”. A second color panel appeared in the upper left corner and the program was not responding. All I could do was to end the CS4 task.
After that, whenever I created even a simple rectangle, at first the colors would appear as indicated for “Fill and Stroke”, but when I selected the object to see its properties, either the stroke or the fill color box would have a red slash line, indicating a “no color”, and I couldn’t select the color box to change it using the ink bottle tool, although the other box worked fine.
Rebooting did not help. So I uninstalled CS4 (and didn’t keep the preferences), rebooted, then reinstalled it. The problem was still there. Logging on as another user didn’t help. I tried restoring the Windows system to before I installed CS4 and resinstalling it and that didn’t work. I have a disfunctional CS4 now and I don’t know what to do to fix it. Please help me. Thank you.Have you updated flash to 10.0.2? Have you played around with a bunch of different selections, objects, and so forth to see if this box is always incorrect? I think there's some particular selection (order of selecting things, and so on), where the color swatches in one location don't work as expected. However, it should not happen all the time and from what I recall it was fairly easy to work around (I can't even figure out what this was - so probably not it, as it seems hard to run into or perhaps now fixed).
Also make sure you have the stroke selected - if you don't have everything selected, either the fill or stroke will show no color and dim depending on the selection. -
Problem with my itunes program
i have a ipod shuffle and i have a big problem with my itunes program, he refuse to read cd so i cant put music on my ipod anymore. please help me with that cause now my ipod has become completly unusable.
Im able to download the setup but it keeps on giving this message: there is a problem with this windows installer package. a program required for this install this to complete could not be run
Perhaps let's first try updating your Apple Software Update.
Launch Apple Software Update ("Start > All Programs > Apple Software Update"). Does it launch and offer you a newer version of Apple Software Update? If so, choose to install just that update to Apple Software Update. (Deselect any other software offered at the same time.)
If the ASU update goes through okay, try another iTunes install. Does it go through without the errors this time? -
Problem with SendSysex.java
i have taken the SendSysex.java code from the www.jsresource.org but its showing the error below:
cannot find symbol
symbol : variable MidiCommon
location: class SendSysex
MidiDevice.Info info = MidiCommon.getMidiDeviceInfo(strDeviceName, true);
1 errorEnglish translation in bold.
Well i've found EasyIn.java but when i try to compile
my HelloWorld.java program the following error message
occurs, can anyone explain this?
HelloWorld.java :6: cannot resolve symbol
On line 6 of the file "HelloWorld.java", I found a symbol that I do not recognize.
symbol: variable EasyIn
The symbol that I could not recognize at the above location is a variable called "EasyIn".
location: class HelloWorld
The location where that variable was used is found in the class "HellowWorld"
EasyIn.pause ();
^
Here is the line I'm having trouble with. The ^ points to the start of my worries.
>
1 error
By the way, here is a count of how many errors I've found in your code.
Basically, the compiler is complaining that it could not find the EasyIn class. Make sure you've compiled this class, and your classpath included it's location.
Maybe you are looking for
-
TouchID no longer works after upgrading to iOS 8.1 on iPhone 6 Plus
TouchID no longer works for unlock after upgrading to iOS 8.1 I have tried removing my fingerprints on file and re-adding without any noticed improvement in performance.
-
Microsoft Windows 8 and Microsoft Windows 2012 server are now supported platforms for ColdFusion 10. The new Windows installers are available for download to all retail and licensing customers as well on the trials download page. The ColdFusion Build
-
I've seen Joe Celko and others point to ISO 11179, part 5 in particular, in support of naming tables by collective names. However, I've been poring over it and am unable to find the applicable reference! Anyone be so kind as to guide me? For the reco
-
Cannot run Photoshop CS5.1 setup; "side-by-side configuration is incorrect"
When I try to install Photoshop CS5.1 Extended, I get an error message that reads "The application has failed to start because it's side-by-side configuration is incorrect. Please see the application event log for more detail." Is there a way to fix
-
Feed approved: Not Showing Up - What did I do wrong?
Hi podcasting community! I am posting here because I am trying to make sure I didn't do anything wrong. When I search for my podcast under iTunes (I type "audiobook nerds") it says it can find the episode. My podcast was submitted and approved on 1/2