Generally people transfer data from a BS2 into some kind of "host" computer by using a serial port on the "host". Have a look at the sections of the PBasic manual on the SERIN/SEROUT statements. You will need to be able to open a serial port in Java and read strings of information sent by the BS2 using SEROUT statements in whatever format you decide/require. The BS2 is pretty flexible in converting information into text strings. You will probably need to send information back to the BS2 the same way using a SERIN statement (mostly to let the BS2 know the previous information was received properly).
Not to discourage you in any way, but Java is not the easiest language for beginners to create a desktop application with.
If you absolutely need (or want) to use Java, check out the Netbeans IDE. As for serial ports, any version of Java that you can use with Netbeans should support the required classes for serial port access. You'll need to do some digging, however, to figure out what & how to use those classes.
If you don't absolutely need to use Java, my suggestion is to use one of the Microsoft Visual Studio Express languages, such as Visual Basic. You can download it for free, and it is much easier to build an application than with similar Java tools. There are some code samples floating around on these forums, too.
Comments
If you absolutely need (or want) to use Java, check out the Netbeans IDE. As for serial ports, any version of Java that you can use with Netbeans should support the required classes for serial port access. You'll need to do some digging, however, to figure out what & how to use those classes.
If you don't absolutely need to use Java, my suggestion is to use one of the Microsoft Visual Studio Express languages, such as Visual Basic. You can download it for free, and it is much easier to build an application than with similar Java tools. There are some code samples floating around on these forums, too.
Here are some links to check out:
www.netbeans.org
msdn.microsoft.com/vstudio/express