This week's book giveaways are in the Cloud and AI/ML forums.
We're giving away four copies each of Cloud Native Patterns and Natural Language Processing and have the authors on-line!
See this thread and this one for details.
Win a copy of Cloud Native PatternsE this week in the Cloud forum
or Natural Language Processing in the AI/ML forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Sheriffs:
  • Paul Clapham
  • Knute Snortum
  • Rob Spoor
Saloon Keepers:
  • Tim Moores
  • Ron McLeod
  • Piet Souris
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Tim Holloway
  • Frits Walraven
  • Ganesh Patekar

the error is with javaw.exe

 
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This is the error I received when trying to run a tic tac toe game program.
<Terminated>Cell(1) [Java Application] C:\Program Files\Java\jdk1.7.0_40\java.exe (Oct22, 2013, 2:57:30 pm)
Please help me figure this out. Thanks for your time and effort. Danny
 
lowercase baba
Posts: 12753
51
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please TellTheDetails (<---that is a link to a good FAQ article you should read). Is that the FULL message? What does your code look like? How are you running this?
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes that is the full error. I am using eclipse for a TicTacToeGUIGame program. When I use the run button that code is what comes up, no errors in the program, just <Terminated>Cell(1) [Java Application] C:\Program Files\Java\jdk1.7.0_40\java.exe (Oct22, 2013, 2:57:30 pm). That is all I get. So it sounds like the javaw.exe can not be found on my computer. That is what I see anyway. How do I correct it, or find javaw.exe. Thanks for your time Danny
 
Marshal
Posts: 65019
246
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The javaw tool should be in your installation /bin directory. Please tell us your PATH: what do you get at the command line from echo %PATH%?
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I receive the window for the game but no game. The cell class handles the paint command that is were I get that error. thanks Danny
 
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Danny Broadwater wrote:Yes that is the full error. I am using eclipse for a TicTacToeGUIGame program. When I use the run button that code is what comes up, no errors in the program, just <Terminated>Cell(1) [Java Application] C:\Program Files\Java\jdk1.7.0_40\java.exe (Oct22, 2013, 2:57:30 pm). That is all I get. So it sounds like the javaw.exe can not be found on my computer. That is what I see anyway. How do I correct it, or find javaw.exe. Thanks for your time Danny


Why do you think this message has anything to do with javaw?

The message shows that the application you ran completed fully. The problem is you never told it which class is the main class, so when you pressed the Run button Eclipse had nothing to run. In Eclipse this often happens when you don't have a specific run configuration for the app and you press the Run button when a class is selected that doesn't have a main method (I think). Somewhere under the Run menu there should be a run configuration where you can tell it which class has the main method you want to run.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When I do that I still receive the window for the game but no game was printed in the window. I have 6 classes when I press run in all of these classes except the cell class I receive the window for the game, but no game is painted in the window. The cell class is the only place I re ceive the terminated error. thanks Danny
 
fred rosenberger
lowercase baba
Posts: 12753
51
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
what do you expect to happen when you 'press the run button in the cell class"? I don't use eclipse, so I have no idea how to help you with that.

Can you run any of these from the command line? Do all your classes have a main method? Why are you trying to run all of them - shouldn't only one be the main driver?
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I looked up your last post which has the Cell class in it:

It has a main method in it which does nothing. So, the message you are getting isn't an error. It just means that the application ran exactly what you told it to run, the Cell#main(String[] args) method which didn't do anything. If you want to run the main class run a specific run configuration that defines what the main class is.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I rewrote the Cell and I still receive the same thing, a empty pop up window. A TicTacToe game is suppose to be painted there.
Also the same line ...<terminated> TicTacToeGUIGame (1) [Java Application] C;\Program Files\Java\jdk1.7.0_40\bin\javaw.exe (Oct 24, 2013, 12:13:48 AM)
 
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Danny Broadwater wrote:I rewrote the Cell and I still receive the same thing, a empty pop up window. A TicTacToe game is suppose to be painted there.
Also the same line ...<terminated> TicTacToeGUIGame (1) [Java Application] C;\Program Files\Java\jdk1.7.0_40\bin\javaw.exe (Oct 24, 2013, 12:13:48 AM)


These two are mutually exclusive.
The game not being painted has got nothing to do with the terminated message. I agree I am kind of surprised how you can have the popup window and the terminated message.
Maybe you want to show us your SSCCE code (In case you are not aware, please do take out time to find out what SSCCE really means)
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is the Main, Board And the cell. Thanks Danny

Main


Board



Cell





 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Did you even check out what SSCCE means before dumping your code?
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
short, self contained, correct example. The debugging shows no errors just the blank pop up window. Thanks Danny
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Self contained.
So what is "Mark'?
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mark is a Class Mark, do you want to see it also? Thanks Danny
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes
If you had gone through the SSCCE link, you would have got it that we need code
1) Which we can download
2) Which will compile (Your current code does not, because of the missing Mark class)
3) Which we can run
4) And see your problem in action.

I would suggest you try out all these in a different workspace/folder on your machine, follow all the steps and then share your code with us.
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How do I find and use the SSCCE link? Thanks Danny
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Danny Broadwater wrote:How do I find and use the SSCCE link? Thanks Danny


Please click on this text -> SSCCE which will take you to http://sscce.org/
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here is Mark

Mark

 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The STBC will not compile because I don't have a compiler in java. Where my java is located at there is no compiler. What should I do now? thanks Danny
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I downloaded and ran your code. It displays the GUI but I do not see any terminated message. As such your code does not demonstrate the problem
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Then it has to be my machine. I have re downloaded Java and installed it. Don't know what else to do. Did the game load for you? Thanks Danny
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Nope. Just got the window
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
ok Thanks, I guess I still have a problem somewhere, because it's not painting the game. I thank you for your time and effort. Danny
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just took a closer look at the code.
In your Board class
change

take out

It is needlessly overriding the super method and results in no children being added

In your Cell class, why do you even have the main method!!! Take it out.
Add this

Then put in your custom painting logic in that method.

There are some more problems to your code, but these changes will get your UI working and you can figure out the problems one by one
 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you for the help. Thanks for your time and effort. Danny
 
Steve Luke
Bartender
Posts: 4179
22
IntelliJ IDE Python Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Maneesh Godbole wrote:Nope. Just got the window


What happens when you close the window? That terminated message?
 
Maneesh Godbole
Bartender
Posts: 11445
18
Android Google Web Toolkit Mac Eclipse IDE Ubuntu Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes but that was expected because of

 
Danny Broadwater
Ranch Hand
Posts: 65
Eclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The terminated message goes away, and the next time you run it the terminated error comes back...
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!