Announcement

Collapse
No announcement yet.

[SOLVED] Minecraft and Java

Collapse
This topic is closed.
X
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    [SOLVED] Minecraft and Java

    Hi all. First off I'd like to thank everyone who helped me get my netbook working a few weeks ago.
    Okay, so I play this cool game called Minecraft. It uses Java, and I can play the game in my internet browser, but not on my computer.
    Am I being too vague?
    Do you guys play Minecraft?
    Oh yeah, how can I play the file on my computer?
    Thanks.

    #2
    Re: Minecraft and Java

    Could be helpful: Minecraft for Linux - Black Screen Fix
    Using Kubuntu Linux since March 23, 2007
    "It is a capital mistake to theorize before one has data." - Sherlock Holmes

    Comment


      #3
      Re: Minecraft and Java

      Ok. I tried what he said but I didn't get anything working.
      Having said that, it was like it was written in a different language to me.
      Thanks

      Comment


        #4
        Re: Minecraft and Java

        You're being a bit vague. Did you read the instructions under the Linux download on this page? It's a pretty simple (and fun) java game so just follow those directions and report back if you have errors.

        EDIT:
        sun-java6-jre is the package that you might not have. Install it in your package manager and in console
        Code:
        java minecraft.jar
        Home: Kubuntu 12.04-amd64; Intel i7-860 on Intel DH55PJ; Nvidia 9500GT; 6GB RAM
        Network Slave: Xubuntu 11.10-x86; Intel P4-Prescott on MSI; 2GB RAM; Nvidia FX5200
        Portable: Xubuntu 11.10-amd64; Asus EeePC 1015PEM

        Comment


          #5
          Re: Minecraft and Java

          Originally posted by rfakhrai
          You're being a bit vague. Did you read the instructions under the Linux download on this page? It's a pretty simple (and fun) java game so just follow those directions and report back if you have errors.

          EDIT:
          sun-java6-jre is the package that you might not have. Install it in your package manager and in console
          Code:
          java minecraft.jar
          Yes, that works here (I get a pop-up asking for login info)

          I had to use the more verbose syntax suggested in that page:
          Code:
          java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame

          Comment


            #6
            Re: Minecraft and Java

            ok cool. enjoy.
            Home: Kubuntu 12.04-amd64; Intel i7-860 on Intel DH55PJ; Nvidia 9500GT; 6GB RAM
            Network Slave: Xubuntu 11.10-x86; Intel P4-Prescott on MSI; 2GB RAM; Nvidia FX5200
            Portable: Xubuntu 11.10-amd64; Asus EeePC 1015PEM

            Comment


              #7
              Re: Minecraft and Java

              Thanks, I actually don't play games, I just tested for Harry 8)

              Comment


                #8
                Re: Minecraft and Java

                Haha! Thanks man.
                I'm sure I've installed java becuase I can play it in my browser.

                harry@Harry-Netbook:~$ java minecraft.jar
                Exception in thread "main" java.lang.NoClassDefFoundError: minecraft/jar
                Caused by: java.lang.ClassNotFoundException: minecraft.jar
                at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:3 21)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:2 66)
                Could not find the main class: minecraft.jar. Program will exit.
                harry@Harry-Netbook:~$ java -Xmx1024M -Xms512M -cp minecraft.jar net.minecraft.LauncherFrame
                Exception in thread "main" java.lang.NoClassDefFoundError: net/minecraft/LauncherFrame
                Caused by: java.lang.ClassNotFoundException: net.minecraft.LauncherFrame
                at java.net.URLClassLoader$1.run(URLClassLoader.java: 217)
                at java.security.AccessController.doPrivileged(Native Method)
                at java.net.URLClassLoader.findClass(URLClassLoader.j ava:205)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:3 21)
                at sun.misc.Launcher$AppClassLoader.loadClass(Launche r.java:294)
                at java.lang.ClassLoader.loadClass(ClassLoader.java:2 66)
                Could not find the main class: net.minecraft.LauncherFrame. Program will exit.
                harry@Harry-Netbook:~$

                I really have no idea what I'm doing...

                Comment


                  #9
                  Re: Minecraft and Java

                  try
                  Code:
                  java -jar minecraft.jar

                  Comment


                    #10
                    Re: Minecraft and Java

                    Maybe the wrong java executable is being called? What if you replace "java" by "/usr/lib/jvm/java-6-openjdk/jre/bin/java"

                    This is what I have in my system:

                    Code:
                    lmilano@grisell:~$ whereis java
                    java: /usr/bin/java /usr/share/java /usr/share/man/man1/java.1.gz
                    lmilano@grisell:~$ ls -l /usr/bin/java
                    lrwxrwxrwx 1 root root 22 2010-09-11 15:29 /usr/bin/java -> /etc/alternatives/java*
                    lmilano@grisell:~$ ls -l /etc/alternatives/java
                    lrwxrwxrwx 1 root root 40 2010-09-11 15:29 /etc/alternatives/java -> /usr/lib/jvm/java-6-openjdk/jre/bin/java*
                    I think it is worth checking that you have the java version indicated by rfakhrai

                    Comment


                      #11
                      Re: Minecraft and Java

                      When I try it says "unable to access jar file minecraft.jar"

                      harry@Harry-Netbook:~$ /usr/lib/jvm/java-6-openjdk/jre/bin/java -version
                      java version "1.6.0_20"
                      OpenJDK Runtime Environment (IcedTea6 1.9.5) (6b20-1.9.5-0ubuntu1)
                      OpenJDK Server VM (build 19.0-b09, mixed mode)

                      I don't think I have the right version...

                      Comment


                        #12
                        Re: Minecraft and Java

                        no it looks like you have the right java. the trick is to
                        Code:
                        cd
                        into the directory that minecraft.jar is in before you issue the java command. Alternately you can use provide the full path to minecraft.jar when you issue the command.
                        Home: Kubuntu 12.04-amd64; Intel i7-860 on Intel DH55PJ; Nvidia 9500GT; 6GB RAM
                        Network Slave: Xubuntu 11.10-x86; Intel P4-Prescott on MSI; 2GB RAM; Nvidia FX5200
                        Portable: Xubuntu 11.10-amd64; Asus EeePC 1015PEM

                        Comment


                          #13
                          Re: Minecraft and Java

                          I don't think he does. Look closely, and you'll see that he has the JDK package of java installed, not the JRE. Not certain that that would make a difference, but the JDK is the Java Development Toolkit and the JRE is the Java Runtime environment, an implementation of the Java Virtual Machine which actually executes Java programs. JDK does include JRE (What is the difference between JRE and the Java SE platform?), according to the link, but...

                          If it were me, and instructions told me that I needed JRE, that's what I would install.
                          Using Kubuntu Linux since March 23, 2007
                          "It is a capital mistake to theorize before one has data." - Sherlock Holmes

                          Comment


                            #14
                            Re: Minecraft and Java

                            Thanks for pointing out the specifics Snowhog. harry617 never did report back if he had the JRE package. He assumed that he did.

                            harry617: I think this could simply be solved by opening your package manager and searching for java to see what you have installed.
                            sun-java6-jre is what you need. Do you have it? IF you have that package, what is the result of
                            Code:
                            java -jar /path/to/minecraft.jar
                            ?
                            Home: Kubuntu 12.04-amd64; Intel i7-860 on Intel DH55PJ; Nvidia 9500GT; 6GB RAM
                            Network Slave: Xubuntu 11.10-x86; Intel P4-Prescott on MSI; 2GB RAM; Nvidia FX5200
                            Portable: Xubuntu 11.10-amd64; Asus EeePC 1015PEM

                            Comment


                              #15
                              Re: Minecraft and Java

                              I HAVE JUST TESTED THIS ON MY MACHINE AND IT WORKS
                              I don't know why I'm obsessed with solving this problem but here is the method:
                              1.
                              Code:
                              sudo apt-get install sun-java6-jre
                              (which also installs sun-java6-bin and jdk)
                              2.
                              Code:
                              cd <directory where minecraft.jar is>
                              3.
                              Code:
                              java -jar minecraft.jar
                              If you have problems with this method, please post the error output. Admittedly I've only played this game online but it is addicting and I'd like to see you get it working
                              Home: Kubuntu 12.04-amd64; Intel i7-860 on Intel DH55PJ; Nvidia 9500GT; 6GB RAM
                              Network Slave: Xubuntu 11.10-x86; Intel P4-Prescott on MSI; 2GB RAM; Nvidia FX5200
                              Portable: Xubuntu 11.10-amd64; Asus EeePC 1015PEM

                              Comment

                              Working...
                              X