Page 1 of 3 123 LastLast
Results 1 to 10 of 21
Discuss Java on AppleTV2 (Minecraft server ;) at the AppleTV 2 (iOS based) - Hackint0sh.org; I've tried following some guides I've found online for installing a Java environment on AppleTV1 ...
  1. #1
    Rookie Array

    Join Date
    Feb 2011
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default Java on AppleTV2 (Minecraft server ;)

    I've tried following some guides I've found online for installing a Java environment on AppleTV1 but they did not work, probably because we're on iOS now. Does anyone have a clue how to get Java working? Specifically, I'm trying to run a minecraft server from my always-on appletv. Other java apps could be really handy as well. I can ssh into the ATV2, and it reports that Java 1.50 or something is installed (not 1.6). I copied minecraft over, but when I try and execute it, I get this:


    Apple-TV:~ root# /Applications/Minecraft/minecraft_server.jar
    -sh: /Applications/Minecraft/minecraft_server.jar: Permission denied
    Apple-TV:~ root# cd /Applications/Minecraft/
    Apple-TV:/Applications/Minecraft root# ls
    banned-ips.txt minecraft_server.jar server.log server.properties
    banned-players.txt ops.txt server.log.lck world/
    Apple-TV:/Applications/Minecraft root# java minecraft_server.jar
    java.lang.NoClassDefFoundError: minecraft_server/jar
    <<No stacktrace available>>
    Caused by: java.lang.ClassNotFoundException: minecraft_server.jar not found in java.lang.ClassLoader$1{urls=[file:/Applications/Minecraft/./], parent=null}
    at java.net.URLClassLoader.findClass(URLClassLoader.j ava:529)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:3 41)
    at java.lang.ClassLoader$1.loadClass(ClassLoader.java :1112)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:2 93)
    Apple-TV:/Applications/Minecraft root#


    Anyone have a suggestion?
    Thanks in advance!



  2. #2
    Super Moderator Array Olethros's Avatar

    Join Date
    Sep 2007
    Location
    Norway
    Posts
    8,360
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    439

    Default

    There is some limited java ports for iOS , but they have barely been maintained. You can find these in Cydia.
    You cannot assume any guides for ATV1 will work or can be adapted to ATV2.
    Please read the stickies & search forum before posting!
    How to report an iTunes restore/update fail in a useful manner
    -

    iPad 3G 64GB (4.3.3, Redsn0w) oldest SHSH 3.2.2
    iPhone 4 32GB (4.2.1, Redsn0w JB-monte) oldest SHSH 4.1
    iPhone 3GS 32GB (4.3.3; Pwnagetool) factory unlocked oldest SHSH 3.1
    iPhone 8GB (3.1.3; Pwnagetool) AT&T Locked - Unlocked with bootneuter

    -
    Did we solve your problem? Got a dollar or two spare ? Donate!

  3. #3
    Rookie Array

    Join Date
    Feb 2011
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by Olethros View Post
    There is some limited java ports for iOS , but they have barely been maintained. You can find these in Cydia.
    You cannot assume any guides for ATV1 will work or can be adapted to ATV2.
    I did try installing ... all of the java options, but unfortunately none of them "registered", as the output when trying to run the .jar executable was the same each time as the output I already posted. Tusen takk anyway!
    Last edited by makbryan2; 02-14-2011 at 10:16 AM. Reason: typos

  4. #4
    Newbie Array

    Join Date
    Feb 2011
    Posts
    8
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    How did you install Java. JamVM seems to be supported, see installation instruction (including compiling with jikes) here:
    Java on iOS 4 (iPhone) IT News, Tutorials, Solutions – SYSTEM HALT

    Now, I'm not a Java expert but shouldn't you include the JAR in the classpath and execut the actual path to the main Java class instead of what you are doing there?
    $ java -cp MineCraft.jar com.minecraft.xx.Main (or something similar like that...)

  5. #5
    Rookie Array

    Join Date
    Feb 2011
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    I probably do need to involve these so called "class paths" but I am a total newb to Java and have no idea exactly what that entails. Do you or anyone else happen to have any more tips? Thanks for the link Carlington


  6. #6
    Newbie Array

    Join Date
    Feb 2011
    Posts
    8
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Hi,

    from the MineCraft Wiki:
    Server startup script - Minecraft Wiki

    You will find the following line:
    java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

    Try it with modified memory requirements, the ATV2 only has 256MB
    java -Xmx128M -Xms128M -jar minecraft_server.jar nogui

  7. #7
    Rookie Array

    Join Date
    Feb 2011
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Genius, I will give this a try when i can!

  8. #8
    Rookie Array

    Join Date
    Feb 2011
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by Carlington View Post
    Hi,

    from the MineCraft Wiki:
    Server startup script - Minecraft Wiki

    You will find the following line:
    java -Xmx1024M -Xms1024M -jar minecraft_server.jar nogui

    Try it with modified memory requirements, the ATV2 only has 256MB
    java -Xmx128M -Xms128M -jar minecraft_server.jar nogui
    Damn, still no good. Bugging me about classpaths. Java -version returns version 1.5, I can't figure out how to update it, as maybe that would fix classpaths?

  9. #9
    Newbie Array

    Join Date
    Feb 2011
    Posts
    8
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    From the Minecraft Download page, it seems that you are using the Linux distribution JAR (the page says it requires the Sun JVM, nothing about version 1.5 should be fine I'd assume)
    Minecraft

    You could try the OSX version for fun? It's disributed as a ZIP, but opening it up reveals a MinecraftLauncher.jar when you open up Minecraft.app (open contents -> Contents/Resources/Java/MinecraftLauncher.jar)

    Also, jar files are basically renamed zips so you can extract the contents of the Jar with any zip-utility and find the structure, inside the jar the class net/minecraft/MinecraftLauncer.class seems to be the starting point.

  10. #10
    Rookie Array

    Join Date
    Feb 2011
    Posts
    13
    Post Thanks / Like
    Downloads
    0
    Uploads
    0
    Rep Power
    0

    Default

    Quote Originally Posted by Carlington View Post
    From the Minecraft Download page, it seems that you are using the Linux distribution JAR (the page says it requires the Sun JVM, nothing about version 1.5 should be fine I'd assume)
    Minecraft

    You could try the OSX version for fun? It's disributed as a ZIP, but opening it up reveals a MinecraftLauncher.jar when you open up Minecraft.app (open contents -> Contents/Resources/Java/MinecraftLauncher.jar)

    Also, jar files are basically renamed zips so you can extract the contents of the Jar with any zip-utility and find the structure, inside the jar the class net/minecraft/MinecraftLauncer.class seems to be the starting point.
    I'm trying to run the server, however, so it's a different file.
    I still think that I am having a newb Java problem, and that this is possible. I moved the minecraft folder on my AppleTV to a folder i knew was included in the classpath by default - /var/root/Library/Java. I did have to add that java folder though, in Library, so maybe it wasn't included in the classpaths by default? Minecraft gives the same errors when I try to run it from there. How do I add it to my java Classpaths?


 

 
Page 1 of 3 123 LastLast

Similar Threads

  1. Replies: 0
    Last Post: 07-20-2011, 07:00 PM
  2. AppleTV2 USB?
    By DocTauri in forum AppleTV 1
    Replies: 7
    Last Post: 09-29-2010, 06:15 PM
  3. New Patch iOS firmware 4.1 for AppleTV2 is out!
    By LeMarsu in forum AppleTV 1
    Replies: 0
    Last Post: 09-28-2010, 08:47 AM
  4. [JAVA] does iphone run java programs???
    By joaolucasd in forum Free Toolchain Software (Cydia App's)
    Replies: 2
    Last Post: 03-28-2008, 07:30 PM
  5. Java version of DVD Jon's Phone Activation Server
    By The Operator in forum General
    Replies: 25
    Last Post: 01-15-2008, 12:27 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Powered by vBulletin®
Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.
Search Engine Friendly URLs by vBSEO
(c) 2006-2012 Hackint0sh.org
All times are GMT +2. The time now is 05:32 PM.
twitter, follow us!