Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is this an applet?

 
Tewodros Getenet
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Greetings my fellow Java lovers,

I have a big project to do for college.... I have to get an open-source executable java game and insert it in netbeans and make it work (it has to be simple like 5-7 classes).

Now our professor did say one thing that they should not be an applet, rather they should be an executable

now I have got this one - http://glenn.sanson.free.fr/v2/?select=fb:play and when I downloaded the source code it had all sorts of applet stuff (i am terrible at java ) and well I couldn't get it running on netbeans but I don't know whether this is because it has an applet or because it uses this library called JIGA and i didnt import the library???

So I have two questions ... Is the source code of this website - http://glenn.sanson.free.fr/v2/?select=fb:play - an applet version??? Is there anyway to run it in netbeans?
I have attached a screen shot - Basically i downloaded the .jar file (because I was having trouble including the JIGA library inside the source code) turned it into a zip , extracted it - highlighted all the java classes added them to my project folder... but i am guessing it is not suppose to work that way....and there is no run button (it is grayed out) Help!!!

And second - where do I get another open-source java code for a game - it has to be an easy one - 5-7 classes and a NON-applet version that I can put in netbeans and run it?


Thanks!!!

Untitled.png
[Thumbnail for Untitled.png]
 
Jesper de Jong
Java Cowboy
Saloon Keeper
Posts: 15272
37
Android IntelliJ IDE Java Scala Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to JavaRanch!

The Dowload page of the website that you linked to contains some instructions to compiling the source code, including instructions on how to get the JIGA library. It also explains that the game can also be run as a stand-alone application (not just as an applet) - it says you have to create a JAR file, the command is on the page.

You can right-click on the Main class and select "Run as Java application" somewhere in the menu that appears. I see a green Run button in your screenshot (it is not grayed out). But not much will happen, because your main method is empty.

Why don't you try to get it working on the command line, using the instructions on the website, before trying to get the source code in a NetBeans project?

Please UseAMeaningfulSubjectLine instead of something like "Help !" or "Save Me" when you start a new topic.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64824
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a helpful gesture, I've adjusted the subject for you.
 
Tewodros Getenet
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank YOU SOOOOOOO MUCH!!!

Ok so now since my professor said that she needed it to work on netbeans..... I would be good to try to make it to run in netbeans...

Ok so i put in a package and when I ran it it gives me the error message that it does not have a main class..?
How do i fix this....?

Since I am desperate to lean how to do this project.... I am willing to host a supervised remote desktop connection with someone....




 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Twwodros,
I have edited your post for the email ID. For more information, please read http://www.coderanch.com/how-to/java/UseTheForumNotEmail
 
Maneesh Godbole
Saloon Keeper
Posts: 11027
12
Android Eclipse IDE Google Web Toolkit Java Mac Ubuntu
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Search the source code. Does any of the classes extend JApplet or Applet for that matter? If yes then this is an applet and applets dont have a mail class.

 
Tewodros Getenet
Greenhorn
Posts: 5
 
Darryl Burke
Bartender
Posts: 5126
11
Java Netbeans IDE Opera
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Please BeForthrightWhenCrossPostingToOtherSites
http://www.java-forums.org/new-java/41304-help.html
 
Tewodros Getenet
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sorry - Cross Posted
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic