Results 1 to 9 of 9
Like Tree1Likes
  • 1 Post By Norm

Thread: A newbie Java question

  1. #1
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default A newbie Java question

    I can make a basic java game and run it using java.exe, I can make the class files into a .jar file and run it, but I can't figure out how to run it the way I want. If you've played minecraft you know that it's launched from an exe, and all the data is read from .jar files, this is basically what I want to do. I want a simple exe window that can display whatever it is that the class files do, and anyone can run it without JDK. I've tried googling several different things but couldn't find anything really helpful, or any information on how minecraft does it. I thought that maybe the exe is written in another language, if this is the case, that's fine because I'm fairly competent with C++ and C#, but I still need to be pointed in the right direction.

    Thanks.
    Last edited by Swick; 02-17-2012 at 08:37 AM.

  2. #2
    tnrh1 is offline Senior Member
    Join Date
    Aug 2011
    Posts
    251
    Rep Power
    4

    Default Re: A newbie Java question

    So you are trying to run a jar file through an exe(written in any kind of language) am I right?

  3. #3
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: A newbie Java question

    Quote Originally Posted by tnrh1 View Post
    So you are trying to run a jar file through an exe(written in any kind of language) am I right?
    Yes, without the user needing any special requirements like JDK, if that's possible. I'm fairly sure it is possible, as far as i know minecraft doesn't require anything like that.

  4. #4
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,781
    Rep Power
    25

    Default Re: A newbie Java question

    The user should not need the JDK to execute a java program. He would need the JRE.

  5. #5
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: A newbie Java question

    Quote Originally Posted by Norm View Post
    The user should not need the JDK to execute a java program. He would need the JRE.
    Ah I see, that cleared that up, thanks.

    I still can't find anything on creating a .exe to run and display the .jar file(s).

  6. #6
    Norm's Avatar
    Norm is online now Moderator
    Join Date
    Jun 2008
    Location
    Eastern Florida
    Posts
    17,781
    Rep Power
    25

    Default Re: A newbie Java question

    .exe to run and display the .jar file
    The java.exe program will do that.
    DarrylBurke likes this.

  7. #7
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: A newbie Java question

    Quote Originally Posted by Norm View Post
    The java.exe program will do that.
    That's not what I mean, I want my own exe.

    This is how minecraft works: (I'm only using minecraft as an example because it's exactly the set up that I want)

    It has the main exe file.
    It has a folder containing the .jar files that the game uses.
    When you open the exe, the game is displayed in the exe window.

    I'm very new to java so I don't really know what to search for.

  8. #8
    DarrylBurke's Avatar
    DarrylBurke is offline Forum Police
    Join Date
    Sep 2008
    Location
    Madgaon, Goa, India
    Posts
    11,453
    Rep Power
    20

    Default Re: A newbie Java question

    When you open the exe, the game is displayed in the exe window.
    How do you know that?

    db
    If you're forever cleaning cobwebs, it's time to get rid of the spiders.

  9. #9
    Swick is offline Member
    Join Date
    Feb 2012
    Posts
    11
    Rep Power
    0

    Default Re: A newbie Java question

    Quote Originally Posted by DarrylBurke View Post
    How do you know that?

    db
    Because before that, login info and stuff needs to be entered, that's dealt with by the exe. It's the same window.

Similar Threads

  1. Replies: 7
    Last Post: 01-01-2012, 01:29 PM
  2. A newbie Java question
    By jeftphph in forum New To Java
    Replies: 17
    Last Post: 07-14-2011, 10:56 AM
  3. Java newbie question on linkedlist index search
    By Mjall in forum New To Java
    Replies: 5
    Last Post: 03-25-2011, 11:54 PM
  4. Probably a newbie question.... :P
    By gblax123 in forum New To Java
    Replies: 9
    Last Post: 02-23-2011, 11:21 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •