I'm a high-school freshman that wont be taking a programming class until next year. I am proficient at Python, and they decided to put me in AB Programming, which is Java.
When I first started programming on a z80 TI-83+ with BASIC, I set out to make my life easier with small, functional programs. So, being a Linux buff on top of knowing z80 BASIC, I came across Python which is now my favorite language.

I can't find practical uses for Java, like I can for Python. I know the language should seem as an extension of the idea, but it's hard for me to implement Java.
Take for example, a very simple script to update software on a Debian system would be;

import os
    sudo = True
except IOError:
    sudo = False
if sudo == True: os.system("sudo apt-get update && sudo apt-get upgrade")
else: os.system("apt-get update && apt-get upgrade")

I dont have a clue as to how you could do any of this in Java (well, control structures are obvious, but still.)

I'm trying to find a Java tutorial that will make me familiar with commonly used packages and teach me step by step how to do things, but I can't really find a good one.
Is there a Java equivalent of the Python Global Module Index?
And which IDE is better for newbies, Eclipse or NetBeans?