JavaScript, not Java is a good starting point, but it sounded like you have something in mind as in some platform to program on. In that case you are railed to particular way starting with a specified language. Here's the general mappings of major languages, but if you are tasked with maintaining archaic Perl/CGI code, well I say you have my sympathy.
Android programming, Java.
Windows and Windows Phone (current), .NET family most likely C#.
Old Windows/Mobile, C/C++ or C#.NET Compact Framework for WM 5 or above.
iOS or Mac, Objective-C with Apple-dictated environment of Xcode on Mac.
Web, JavaScript/CSS/HTML.
With Java being most versatile and Objective-C being an eccentric choice that might fade away as soon as iPhone is no longer "the" device.