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 ...
-
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!
-
-
Super Moderator
Array
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!
-
-

Originally Posted by
Olethros
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 11:16 AM.
Reason: typos
-
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...)
-
-
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
-
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
-
-
Genius, I will give this a try when i can!
-

Originally Posted by
Carlington
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?
-
-
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.
-

Originally Posted by
Carlington
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?
-
Similar Threads
-
By hackint0sh in forum Latest Headlines
Replies: 0
Last Post: 07-20-2011, 07:00 PM
-
By DocTauri in forum AppleTV 1
Replies: 7
Last Post: 09-29-2010, 06:15 PM
-
By LeMarsu in forum AppleTV 1
Replies: 0
Last Post: 09-28-2010, 08:47 AM
-
By joaolucasd in forum Free Toolchain Software
Replies: 2
Last Post: 03-28-2008, 08:30 PM
-
By The Operator in forum General
Replies: 25
Last Post: 01-15-2008, 01:27 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
-
Forum Rules
Bookmarks