Easy to Learn Java: Programming Articles, Examples and Tips

Start with Java in a few days with Java Lessons or Lectures

Home

Code Examples

Java Tools

More Java Tools!

Java Forum

All Java Tips

Books

Submit News
Search the site here...
Search...
 
Search the JavaFAQ.nu
1000 Java Tips ebook

1000 Java Tips - Click here for the high resolution copy!1000 Java Tips - Click here for the high resolution copy!

Java Screensaver, take it here

Free "1000 Java Tips" eBook is here! It is huge collection of big and small Java programming articles and tips. Please take your copy here.

Take your copy of free "Java Technology Screensaver"!.

Java Newsletters Archive: 163

JavaFAQ Home » Java Newsletters Go to all tips in Java Newsletters


Bookmark and Share

 === [ The Java FAQ Daily Tips, weekly publication ] ===

 Issue No:  163                                            6 May 2003
12693 subscribers   

Foreword: Excuse me for possible mistakes. English is not native language for me.

In this issue:
  • 1. Do you know any P2P (peer to peer) projects like Napster, Morpheus based on Java?
  • 2. I tried to send Ctrl+Alt+Del key code to system from my class, but it does not work...
  • 3. I am not strong in networking... Is it possible to create two ServerSockets listening in two different ports on one IP address?
  • 4. Latest posts on our message board
  • 5. Link to Java FAQ

  • Hello dear friends!

    Tip 1

    Question: Do you know any P2P (peer to peer) projects like Napster, Morpheus based on Java?

    Answer: Interest in peer-to-peer (P2P) technology is growing rapidly, as evidenced by the popularity of services like Napster, Gnutella, and SETI@home. Seeing the potential of P2P computing to enable access to a broader, deeper Web, Sun started a small research effort called Project JXTA.

    Until recently, however, P2P technologies have been used primarily in singlefunction applications, such as instant messaging. Taking the concept of P2P much farther, Sun Microsystems founder and chief scientist Dr. Bill Joy conceived the idea of Project JXTA as a means of integrating P2P into the very core of the network architecture.

    Project JXTA is a set of simple, open peer-to-peer protocols that enable any device on the network to communicate, collaborate, and share resources. JXTA peers create a virtual, ad hoc network on top of existing networks, hiding their underlying complexity [see Figure 1]. In the JXTA virtual network, any peer can interact with other peers, regardless of location, type of device, or operating environment - even when some peers and resources are located behind firewalls or are on different network transports. Thus, access to the resources of the network is not limited by platform incompatibilities or the constraints of a hierarchical client-server architecture.

    Project JXTA technology espouses the core technology objectives of ubiquity,
    platform independence, interoperability, and security. JXTA technology runs on any device, including cell phones, PDAs, two-way pagers, electronic sensors, desktop computers, and servers. Based on proven technologies and standards such as HTTP, TCP/IP and XML, Project JXTA is not dependent on any particular programming language, networking platform, or system platform and can work with any combination of these.
    http://www.jxta.org/project/www/white_papers.html

    Java wimps please close your ears ... For the Java programmer who
    thought he knew everything there was to know about Java, have a
    look at the most advanced Java newsletter archived on the website
    http://www.smotricz.com/kabutz Guess what, it won't even cost you
    anything! Subscribe today - you won't be disappointed.
     


    Tip 2

    Question: I tried to send Ctrl+Alt+Del key code to system from my class, but it does not work...

    Answer: The problem is that this combination is served differently from all "normal" key combinations on hardware level. When you press those three buttons an interrupt of processor occurs. When an interrupt occur processor looks at its number and executes special program in specific memory location. If you want to use this key combination you need to find proper windows library and use it through JNI. Java does not serve this special case...


    Tip 3

    Question: I am not strong in networking... Is it possible to create two ServerSockets listening in two different ports on one IP address?
    If so how can I manage them?

    Answer: Sure, you can. Just create them in different threads and call accept methods..


    Latest posts on our message board

    Setting out java gui code

    Hi. I'm kinda relatively new to creating gui's and i kinda get some of the concepts in swing. However, I'm slowly finding that I'm coding everything in one class which is pretty bad since i'm writing a relatively thick gui client.
    Are there any patterns or anything of the sort for laying out swing code?
    more read here

    Help W/ Binary File Downloading from http server!

    Hello,
    I am attempting to write a program which will download multiple zip files from specified websites. I am having problems though, when the http server requires a domain, name and password. The password also has unusual characters in it, such as #, and /. The program currently creates a listing of all the files to be downloaded and puts them into an array, but I would really like it to go one step further, and actually have it download them, which I haven't gotten to work yet. I would greatly appreciate any info on how to download binary files through http connections requiring windows style logons.
    more read here

    blinking minimised window

    I wanted to implement blinking minimised window when any new message comes to me like the ones in the messenger.
    I am working in linux
    more read here

    sockets ,force close and garbage collection

    I have developed a server application that can accept one connection at a time. One of the server options is that the client can request to chat with the server.If this is the case, the the server opens a chat window which uses another class 'chatserver' in order to wait for and accept connection. However, i found out that if the user on the server closes the ChatGui of the server (maybe because they finished chatting) and they reopen it after about 4 minutes a bind exception will be thrown. After testing i found out that the Gui is disposed but the serversocket still waits and accepts connections while another gui opens and tries to bind the same port. i have a cleanup method that closes I/O streams and closes the serversocket and socket objects as well.
    Does anyone have anyidea how to force the server socket release the specific port?
    Thank you in advance.
    more read here

    when i compile i get a grey screen?!?!?

    When I compile my program and run it I get a grey screen? It compiles okay with no errors. Any know where i could be going wrong?
    more read here

    help!

    I have a password box that will be linked to a database. Once the users enter their password they will have another panel where they can register their hobbies. It is not for the net but simply on JBuilder for the moment. I had no problem setting up the GUI for both the password and the other panel (the database link will be for later!) but as I'm a very novice programmer I don't know how to link the two so that on a user's screen there is a smooth transition between the password and the hobby panel. The password class looks like this:
    more read here

    JPopupMenu removing borders / insets

    Hi,

    I have a popup menu but, though I remove the borders, there is still space at the top and bottom of the JPopupMenu. There is also a white line at the left side and a grey line (or component?) on the right of the JPopupMenu. How can I remove this space / lines from a JPopupMenu? Is this something that can be done through methods of the Swing components or is it necessary to use L&F API to remove these insets and borders?
    more read here

    Please ask your questions and help each other at our Java Forum:
    http://javafaq.nu/forum/


    The Java FAQ Daily Tips is a newsletter that is only sent to those who have specifically subscribed to it (double opt-in).

    To subscribe/unsubscribe to "The Java FAQ Daily Tips" weekly edition newsletter visit our page here:
    http://www.javafaq.nu/plm2html/my_subscription.shtml

    If you have troubles please contact us: subscription@javafaq.nu


    Link to Java FAQ

    If you have added a link to http://javafaq.nu on your WEB-site, please let us know and you will get listed on our
    "pages linking to us" pages! If your page is a programming is programming relates you will of course get listed in the WEB-directory as well. Also, if you link to us, you have a chance to be listed in this newsletter as well.

    More information and graphics artworks can be found here
    http://javafaq.nu/other/linktous.shtml


    Advertising

    For information on advertising on the Java FAQ's Daily Tips Newsletter, send an email to: adv@javafaq.nu
    You will get the answer immediately from auto responder!


    Send your comments, questions, praise and complaints to us:  comments@javafaq.nu

    Copyright (c) 2000 - 2003 John Andersson, All rights reserved.


     Printer Friendly Page  Printer Friendly Page
     Send to a Friend  Send to a Friend

    .. Bookmark and Share

    Search here again if you need more info!
    Custom Search



    Home Code Examples Java Forum All Java Tips Books Submit News, Code... Search... Offshore Software Tech Doodling

    RSS feed Java FAQ RSS feed Java FAQ News     

        RSS feed Java Forums RSS feed Java Forums

    All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest 1999-2006 by Java FAQs Daily Tips.

    Interactive software released under GNU GPL, Code Credits, Privacy Policy