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: 160

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


Bookmark and Share

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

 Issue No: 160                                             April 10 2003
12320 subscribers    

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

In this issue:
  • 1. I try to call the Runtime.exec() command by passing it an array of strings.
  • 2. I write a batch file dynamically.
  • 3. Latest posts on our message board
  • 4. Link to Java FAQ

  • Hello dear friends!

    Tip 1

    Question: I try to call the Runtime.exec() command by passing it an array of strings.

    The problem is that I need to use "&" in my command. It runs perfectly on shell prompt but not by Runtime.exec(). Java cuts all everything away after that sign, so my command is incomplete.

    Answer: No clear explanation to such behavior. Use workaround:
    write your command into file (shell script) and then run this script. It will work Smile

    GetRight is a Download Manager program to help you download files from the Internet.

    Most people have already experienced the problem...you are downloading a file, and your modem gets disconnected, or call waiting interrupts, or your computer crashes, or any number of other problems. Then you have to restart the download from the very beginning, losing all the time you had already spent.

    GetRight solves this problem by allowing you to resume a download. If you got part of the file before the problem, GetRight will restart the download in the middle so it only gets the rest of the file, without having to restart from the beginning. This makes downloading your files much easier and faster.

    GetRight has many other more advanced features to help you download the files--from re-dialing the modem automatically to turning off the computer when it is done getting the files (so you can just leave it alone to do the work!) You can even set a time when it should dial the modem to get the files...so it can do all the work in the middle of the night while you sleep.
    There are too many other features to list here. If you have ever thought "I wish when downloading I could do ______", there's a good chance GetRight already does it!

     

     


    Tip 2

    Question: I write a batch file dynamically.
    First, I collect all data into String value and then write " " as an end of line. But I can not execute this batch file because of this EOL.

    Answer: Use system defined line separator,

    String lineSeparator = System.getProperty("line.separator");


    Latest posts on our message board

    java http Proxy server

    in http proxy server i am communicate with the webservers using URL and URLConnection. it is work fine. but i didn't know how to access the mails through this.
    this thread is here...


    Cannot go on to the next file...

    hi all... i haf this problem... when i add these codes to my program, it cannot read the next text files...
    can help me solve it?


    this thread is here...


    What happens with JMenuItem?

    Hi!

    I've created an application with several frames. The main frame has a Menu
    Bar with all the function that you can use, and each window has a Popup Menu
    with the most useful functions. I thought (not enought, obviously) that you
    can create a JMenuItem and use it in several Menus. For example, Create a
    'Copy' JMenuItem and use it in the Menu Bar and the JPopupMenu ... but it
    doesn't work! When I add a JMenuItem, which was previously added to the Menu
    Bar, to a JPopupMenu ... it disappear from de Menu Bar! Why?


    public class MainFrame extends JFrame{
    this thread is here...


    Applet-Servlet

    I have an Applet and a Servlet changing java objects derilized multiple times. After a few seconds the applet is started it stops. The applet is very easy, it has a thread that send and object and recieve another one and the servlet just the opposite. Anyone can help me?
    this thread is here...


    Meta_mask?

    I have a question when I use InputEvent in AWT. Several constants are defined in InputEvent, such as CTRL_MASK, SHIFT_MASK and META_MASK. Would you tell me what the META_MASK means? Thanks!
    this thread is here...


    use a dll (written in C) in java programm!

    Hi, I have a Frame_Grabber.dll written in C.
    How can I use this DLL in my java application?

    I know how to use java native interface, and to create my own dll, but what if the dll already exists? Should I create my own DLL in any case? Or I can use this FRAME_GRABBER.DLL directly and how pls??

    Does someone know it?
    this thread is here...


    Components are getting resized in gridbag layout.

    Hi,
    I am arranging components in gridbag layout. My parent container is JTabbedpane. But JTextFields (and others too) are getting resized depending on there contents. Can anyone help me in solving this problem.
    Thanks in advance, Shailesh
    this thread is 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