Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Help with Java

  • 04-03-2011 7:38pm
    #1
    Registered Users, Registered Users 2 Posts: 14


    Hey everyone,

    this is my first thread here :/

    Me and a friend have to do a game for our end of year project and we came up with the idea of making a text based game in java for it.

    what I was wondering if you guys (or gals) could help with is if there is a way to make a some kind of executable file of the game when it is finished so that the teacher wouldn't need to compile it in an IDE or whatever to play it.

    Also it isn't actually a programming project, its for a game design document and the game itself is a very small part of it.

    Thanks in advance for any suggestions.

    sorry if this is a really stupid thread :(


Comments

  • Registered Users, Registered Users 2 Posts: 5,246 ✭✭✭conor.hogan.2


    Not sure that if you want an executable that you should be using Java but:

    http://www.excelsior-usa.com/articles/java-to-exe.html


  • Registered Users, Registered Users 2 Posts: 14 blahound


    I dont mean specifically an exe
    I just meant a file that doesn't require being compiled every single time it needs to run, sorry i didn't describe that very well


  • Registered Users, Registered Users 2 Posts: 5,246 ✭✭✭conor.hogan.2


    I dont know much about Java.

    But it does run through the JVM so I dont know if thats your problem? But its not compiled again each time it is run, its just slower.

    http://www.youtube.com/watch?v=hwVuK0X-0P0 - Is that what you want?


  • Subscribers Posts: 78 ✭✭minttea


    Create yourself a 'jar' file, it's basically a single compressed file that contains all your compiled files along with any additional resources, i.e. images, audio etc.

    http://en.wikipedia.org/wiki/JAR_file
    http://download.oracle.com/javase/tutorial/deployment/jar/

    You will still need the JRE (Java Runtime Environment) on your system to order to run the application.


  • Registered Users, Registered Users 2 Posts: 428 ✭✭Joneser


    As mentioned above, a jar would be your best bet. If you are using eclipse you can just right-click the project and select export, and then select "Runnable jar file" from the menu, I'm sure you can do the same in other IDEs.


  • Advertisement
  • Registered Users, Registered Users 2 Posts: 2,089 ✭✭✭henryporter


    Don't forget that in eclipse you'll have to run it once to get the right launch configuration when you export. It's easier in netbeans - just select 'build'.


Advertisement