![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
In a vjsharp project, in vj# code, when I reference System.out.println, how is this resolved to "java.io.printstream.println" ? Is it possible to achieve this within VB.Net code by referencing certain assemblies (e.g. vjscor, etc.) and importing certain namespaces? I ask because I'd like to use "System.out.println" inside a vb.net program to use the (imported & referenced) vjs* assemblies. And I need to do this because I have someone who won't budge from BASIC, but who needs to learn the java libraries. Any insight appreciated. Thanks. -- Dave Boll |
#3
| |||
| |||
|
|
You just need to add a reference to vjslib.dll into your VB project, and then you should be able to use the Java APIs from VB. Bruno. "Dave Boll" <DaveBoll (AT) discussions (DOT) microsoft.com> a écrit dans le message de news: 1170B65E-A60A-40E1-A485-DC0589BAC028...soft (DOT) com... In a vjsharp project, in vj# code, when I reference System.out.println, how is this resolved to "java.io.printstream.println" ? Is it possible to achieve this within VB.Net code by referencing certain assemblies (e.g. vjscor, etc.) and importing certain namespaces? I ask because I'd like to use "System.out.println" inside a vb.net program to use the (imported & referenced) vjs* assemblies. And I need to do this because I have someone who won't budge from BASIC, but who needs to learn the java libraries. Any insight appreciated. Thanks. -- Dave Boll |
#4
| |||
| |||
|
|
Right, I did that and I can certainly reference the desired classes by the "java.io.PrintStream.*" namespace, but I cannot reference them by the "System.out.*" namespace. I was wondering how this magic happens for vj# and if I could achieve the same from within VB. Thanks for the suggestion. "Bruno Jouhier [MVP]" wrote: You just need to add a reference to vjslib.dll into your VB project, and then you should be able to use the Java APIs from VB. Bruno. "Dave Boll" <DaveBoll (AT) discussions (DOT) microsoft.com> a écrit dans le message de news: 1170B65E-A60A-40E1-A485-DC0589BAC028...soft (DOT) com... In a vjsharp project, in vj# code, when I reference System.out.println, how is this resolved to "java.io.printstream.println" ? Is it possible to achieve this within VB.Net code by referencing certain assemblies (e.g. vjscor, etc.) and importing certain namespaces? I ask because I'd like to use "System.out.println" inside a vb.net program to use the (imported & referenced) vjs* assemblies. And I need to do this because I have someone who won't budge from BASIC, but who needs to learn the java libraries. Any insight appreciated. Thanks. -- Dave Boll |
#5
| |||
| |||
|
|
Did you try "java.lang.System.out" instead of "System.out". VB is probably getting confused between "java.lang.System" and the .NET "System" namespace. So, you need to be more explicit when referring to the Java "System" (in Java, the java.lang package is always implicitly imported, but it is not in other .NET languages). Bruno. Bruno. "Dave Boll" <DaveBoll (AT) discussions (DOT) microsoft.com> a écrit dans le message de news: 9A991DD7-D265-4059-8F48-76AEE14CAE18...soft (DOT) com... Right, I did that and I can certainly reference the desired classes by the "java.io.PrintStream.*" namespace, but I cannot reference them by the "System.out.*" namespace. I was wondering how this magic happens for vj# and if I could achieve the same from within VB. Thanks for the suggestion. "Bruno Jouhier [MVP]" wrote: You just need to add a reference to vjslib.dll into your VB project, and then you should be able to use the Java APIs from VB. Bruno. "Dave Boll" <DaveBoll (AT) discussions (DOT) microsoft.com> a écrit dans le message de news: 1170B65E-A60A-40E1-A485-DC0589BAC028...soft (DOT) com... In a vjsharp project, in vj# code, when I reference System.out.println, how is this resolved to "java.io.printstream.println" ? Is it possible to achieve this within VB.Net code by referencing certain assemblies (e.g. vjscor, etc.) and importing certain namespaces? I ask because I'd like to use "System.out.println" inside a vb.net program to use the (imported & referenced) vjs* assemblies. And I need to do this because I have someone who won't budge from BASIC, but who needs to learn the java libraries. Any insight appreciated. Thanks. -- Dave Boll |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |