Does server can be created only with java?
Yes, no problem. Minecraft for example does exactly this and it works just fine.
If the answer to the first question is "yes", then what I need to put my server 24/7 available?
Well, you "could" host it from your home-machine and get yourself a dyndns account (dyndns.com), although that probably isn't the solution you're looking for. Like Varkas said you can rent a dedicated server or vServer (linux or windows). Judging by the question I'd say you should look at a windows machine (which are a bit more expensive) but you can easily remote-desktop them.
How should I run my server?
Just start it on the remote machine, console or double click
Does the game logic should be in the server?
It should be, usually. For "mini basketball" I wouldn't even bother tho, yet. If you have players who love the game and there are a ton of cheaters about, you can always update the game later to support server-side-game-logic
For a first start I'd just go with whatever works