Groups | Blog | Home
all groups > vj# > january 2004 >

vj# : Converting Java to Visual J#


Thao
1/14/2004 5:13:29 PM
Hi, sorry if this issue has already been asked, but I've
read and read about transitioning from Java classes to
Visual J# and still am having problems doing this, any
help would be appreciated.

We run a web site for a very high profile client, the web
site is integrated with theirs which runs Java and Bea
Weblogic, etc. We received some compiled Java classes
from them that handles digital signatures and uses Sun's
java.security package amongst others. We were using MS
JVM to instantiate a Java wrapper class from ASP, which in
turn called their Java classes to handle the digital
signature processing. Now that MS JVM is going away, I am
trying to convert to Visual J#. What is the best way to
do this? I managed to decompile the .class files
into .java source code and keep encountering errors when I
try to build with the source code in VJ#. Their classes
imported other proprietary classes along with Sun's
packages. I'm sure I didn't need to have all the .java
code to every imported item since it was running under MS
JVM. I need to figure out if there is an easy way to
bring these classes over to .NET, and I don't want to use
C# since there's a deadline on this, it would be easier to
work with the classes I have and move to VJ# just for
these classes, and then be able to use it from within
ASP.Net.

So basically, there are 5 class files I received with
proprietary code. The 5 class files reference other
packages, either Sun, or other proprietary stuff. The
methods our current ASP code uses doesn't seem to need the
other proprietary stuff that we don't have on our server,
perhaps because it never goes down that code path, so I've
not seen it err. Now that I'm trying to move the code to
Visual J#, I run into errors indicating certain files
can't be found, so far, it's been the proprietary stuff
which I don't readily have access to, but I imagine once I
get pass this problem, I might run into Sun java packages
missing (I've seen the technology mapping of what's
supported and it seems like java.security and java.util is
supported, but I had an error for java.util also). Please
help if you can and assume I'm a newbie to VJ# with the
exception of having read a lot of MSDN articles and the
transition guide.

Thanks,
anonymous NO[at]SPAM discussions.microsoft.com
1/14/2004 5:24:43 PM
PS. I forgot to mention that I also tried using JBimp on
the classes but that gave me lots of errors also regarding
not being able to locate files and the file not being in
the CLASSPATH, etc.

[quoted text, click to view]
mikegreonline NO[at]SPAM microsoft.com
1/19/2004 9:52:40 PM
Thao,

J# only supports up to JDK 1.1.4 (with a few additional packages), so any
code that uses some newer JDK libraries will not convert automatically, and
may have to be reimplemented to run under .Net. In order for J# to
convert your code to J# it will need access to all source code (except
those classes defined in JDK 1.1.4, which are implemented in the J#
runtime). JBImp will only work on JDK 1.1.4 class files as well. If you try
to run JBImp on a class file that references classes you don't have access
to, you will get error messages for those classes that could not be found.

I hope this information is helpful,

Michael Green
Microsoft Developer Support

--------------------
| Content-Class: urn:content-classes:message
| From: "Thao" <tpham@genex.com>
| Sender: "Thao" <tpham@genex.com>
| Subject: Converting Java to Visual J#
| Date: Wed, 14 Jan 2004 17:13:29 -0800
| Lines: 47
| Message-ID: <06e801c3db04$c8dcc6d0$a301280a@phx.gbl>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| thread-index: AcPbBMjcpRsGdrf9Rbq+b05DXJKaTQ==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.dotnet.vjsharp
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.dotnet.vjsharp:5166
| NNTP-Posting-Host: tk2msftngxa11.phx.gbl 10.40.1.163
| X-Tomcat-NG: microsoft.public.dotnet.vjsharp
|
| Hi, sorry if this issue has already been asked, but I've
| read and read about transitioning from Java classes to
| Visual J# and still am having problems doing this, any
| help would be appreciated.
|
| We run a web site for a very high profile client, the web
| site is integrated with theirs which runs Java and Bea
| Weblogic, etc. We received some compiled Java classes
| from them that handles digital signatures and uses Sun's
| java.security package amongst others. We were using MS
| JVM to instantiate a Java wrapper class from ASP, which in
| turn called their Java classes to handle the digital
| signature processing. Now that MS JVM is going away, I am
| trying to convert to Visual J#. What is the best way to
| do this? I managed to decompile the .class files
| into .java source code and keep encountering errors when I
| try to build with the source code in VJ#. Their classes
| imported other proprietary classes along with Sun's
| packages. I'm sure I didn't need to have all the .java
| code to every imported item since it was running under MS
| JVM. I need to figure out if there is an easy way to
| bring these classes over to .NET, and I don't want to use
| C# since there's a deadline on this, it would be easier to
| work with the classes I have and move to VJ# just for
| these classes, and then be able to use it from within
| ASP.Net.
|
| So basically, there are 5 class files I received with
| proprietary code. The 5 class files reference other
| packages, either Sun, or other proprietary stuff. The
| methods our current ASP code uses doesn't seem to need the
| other proprietary stuff that we don't have on our server,
| perhaps because it never goes down that code path, so I've
| not seen it err. Now that I'm trying to move the code to
| Visual J#, I run into errors indicating certain files
| can't be found, so far, it's been the proprietary stuff
| which I don't readily have access to, but I imagine once I
| get pass this problem, I might run into Sun java packages
| missing (I've seen the technology mapping of what's
| supported and it seems like java.security and java.util is
| supported, but I had an error for java.util also). Please
| help if you can and assume I'm a newbie to VJ# with the
| exception of having read a lot of MSDN articles and the
| transition guide.
|
| Thanks,
| Thao
|
AddThis Social Bookmark Button