Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / Visual J# / May 2005

Tip: Looking for answers? Try searching our database.

How is java.net.* package implemented in vj#

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Babu - 03 May 2005 17:17 GMT
I am converting a vj++ project to vj#.
In my project, I have a class(named java.net.DestroyAddress.java) that calls
AddressCache field from java.net.InetAddress class. I later found out that  
AddressCache comes from a native net.dll(it's part of JVM).
Because of this, the project cannot run successfully when converted to vj#.
Will some Microsoft expert who has internal knowledge of how jdk1.1.4 class
libraries are implemented in vj# suggest a solution for me.

Furthermore, I wrote this class DestroyAddress.java to overcome a bug in
jdk's InetAddress class and net.dll(It does some invalid DNS caching). Are
all bugs from JDK's native libraries(like net.dll) imported into jsharp?

Regards
Babu
Jennifer-Ashley - 03 May 2005 18:15 GMT
> In my project, I have a class(named java.net.DestroyAddress.java) that calls
> AddressCache field from java.net.InetAddress class. I later found out that  
> AddressCache comes from a native net.dll(it's part of JVM).

There is no such thing as an AddressCache field inside the InetAddress
class. This class only contains methods.
(http://java.sun.com/j2se/1.4.2/docs/api/java/net/InetAddress.html#method_summary)
Also, the InetAddress class has been around since JVM 1.0, so there shouldn't
be too many discrepancies.

Could you please clarify which method from which class you are referring to.

Jenn
Babu - 05 May 2005 10:26 GMT

Actually AddressCache is a protected field in InetAddress class. It's loaded
via net.dll.
Here is the source code of InetAddress.java for your reference:
http://www.flex-compiler.lcs.mit.edu/Harpoon/srcdoc/java/net/InetAddress.html

You can see the line number 106 and many other lines where AddressCache is
used. I was able to compile and run my code using AddressCache in vj++ for
years. Now it doesn't work in vj#!!!

Will anyone from Microsoft clarify how java.net.InetAddress is implement in
vj#? Is it exactly same as vj++ and sun jdk1.1.4? It had many bugs like:

http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4193642

Are those bugs carried over to vj#?

Regards
Babu

> > In my project, I have a class(named java.net.DestroyAddress.java) that calls
> > AddressCache field from java.net.InetAddress class. I later found out that  
[quoted text clipped - 9 lines]
>
> Jenn
Pete Loveall - 05 May 2005 15:38 GMT
I can tell you J# is implemented completely without reference to Microsoft's
(or anyone else's) JVM.  I have reported (and have had accepted) two bug
reports on J# where they do not even support the basic API.

On the other hand, you are using a non-published (not in the API) protected
field in your code.  While it may work under certain circumstances, there
are no guarantees that your code will work across JVM's.  In fact, you can
safely assume your code won't work across JVM's if you consider clean-room
JVM's (which, essentially, is what J# is).

Pete Loveall
AME Corp.

> Actually AddressCache is a protected field in InetAddress class. It's
> loaded
>
> Will anyone from Microsoft clarify how java.net.InetAddress is implement
> in
> vj#? Is it exactly same as vj++ and sun jdk1.1.4? It had many bugs like:

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.