![]() | |
![]() |
| | Thread Tools | Search this Thread | Display Modes |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
This is working for me. Here is how: Here is my library file "saa.java" (this is J#) package saa.test; public class test { public test() { } public void me() { System.out.println("hi"); } } This is how I compiled it: saa\test>vjc *.java /target:library /out:Test.dll Microsoft (R) Visual J# .NET Compiler version 7.10.3077.0 for Microsoft (R) .NET Framework version 1.1.4322 Copyright (C) Microsoft Corp 2000-2002. All rights reserved. saa\test In the client I add a reference to the dll file, and do the calls. Here is my client |
|
package ConsoleApplication1; public class Class1 { public Class1() { saa.test.test t = new saa.test.test(); t.me(); } /** @attribute System.STAThread() */ public static void main(String[] args) { new Class1(); } } The client output: \bin\Debug>ConsoleApplication1.exe hi Regards, Lars-Inge Tønnessen |
#3
| |||
| |||
|
|
It's working in Visual Studio .NET 2002 / .NET 1.0 too. F:\Informatikk\WebHjelp\VJSharp\saa\test>vjc *.java /target:library /out:Test2002.dll Microsoft (R) Visual J# .NET Compiler version 1.0.4205 for Microsoft (R) .NET Framework version 1.0.3705 Copyright (C) Microsoft Corp 2000-2001. All rights reserved. F:\Informatikk\WebHjelp\VJSharp\saa\test The VB.NET code (Module1.vb file) Module Module1 Sub Main() Dim test As New saa.test.test() test.me() End Sub End Module F:\Informatikk\WebHjelp\VJSharp\saa\VB2002_client\ bin>vbc *.vb /out:me.exe /target:exe /reference:Test2002.dll Microsoft (R) Visual Basic .NET Compiler version 7.00.9951 for Microsoft (R) .NET Framework version 1.00.3705.6018 Copyright (C) Microsoft Corporation 1987-2001. All rights reserved. F:\Informatikk\WebHjelp\VJSharp\saa\VB2002_client\ bin>me.exe hi F:\Informatikk\WebHjelp\VJSharp\saa\VB2002_client\ bin>dir Volume in drive F is MAXTOR Volume Serial Number is 043D-0159 Directory of F:\Informatikk\WebHjelp\VJSharp\saa\VB2002_client\ bin 28.03.2005 13:50 <DIR> . 28.03.2005 13:50 <DIR> .. 28.03.2005 13:50 3 072 me.exe 28.03.2005 13:39 121 Module1.vb 28.03.2005 13:38 20 480 Test2002.dll 3 File(s) 23 673 bytes 2 Dir(s) 198 406 107 136 bytes free F:\Informatikk\WebHjelp\VJSharp\saa\VB2002_client\ bin Regards, Lars-Inge Tønnessen |
#4
| |||
| |||
|
|
I managed to make a reference and include the .dll in an .exe using command line tools, like you. Cool. But I cannot include the .dll as reference in a VB.NET Project (an error occurs). This is usefull not just for compilation (which can be solved using command line tools) but either for IntelliSense, you know. If you already tried, using a VB.NET project it seams that it was a still unknown problem on my machine ... It's working for me in VS2002.NET 1.0 with the IntelliSense too. Command line, Visual Studio 2002/.NET 1.0 and Visual Studio 2003 / :NET 1.1 is working for me. If you don't tried yet please try to add a reference, in a VB.NET to the .dll (which was compiled only with the command line tool and has no other files but .java files in it). the DLL only has the compiled version of the "saa.java" file and it was compiled with the command line tool. What kind of VB.NET project do you use? (I'm using an exe application) What does the error say? Regards, Lars-Inge Tønnessen (Please visit the new J# forum at http://forums.microsoft.com/forums/S...spx?ForumID=28 ) |
#5
| |||
| |||
|
|
Please zip them and post them here. It should only take a few kb's. To keep the size low, don't include any binary compiled code. Or you can upload the code on the new J# forum. http://forums.microsoft.com/forums/S...spx?ForumID=28 ( Sorry I can't give you my e-mail address directly in a news forum. I get a huge number of unwanted e-mails every day. ) Regards, Lars-Inge Tønnessen (Please visit the new J# forum at http://forums.microsoft.com/forums/S...spx?ForumID=28 ) |
#6
| |||
| |||
|
|
Hi Radu, Your application is working 100% on my computer using Visual Studio 2002/.NET 1.0 I tried all combinations. Command linje compiler and Visual Studio compilations. Regards, Lars-Inge Tønnessen |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
| |