Search:

Type: Posts; User: cafeteria84

Page 1 of 2 1 2

Search: Search took 0.16 seconds.

  1. Re: How to Rename a file with Java

    bad practice, you should check the return value of the renameTo() method.

    Spring 3
  2. Replies
    2
    Views
    6,194

    Re: How to Make a directory with Java

    a common mistake here is that you don't check the boolean value return from the mkdir() method. It returns true if the operation succeeded, false if the user doesn't have permission or anything else...
  3. Replies
    1
    Views
    14,264

    Re: How to Download a file via FTP

    Good example. Suggest to use Apache's Common FTP library.
  4. Replies
    2
    Views
    57,032

    Re: JButton with "Enter Key" keyboard action

    Thanks for the useful tip.

    Spring 3
  5. Re: How to Populate all array values using the java.util.Arrays class

    Please check the format of the code.

    Spring 3
  6. Re: How to Sort an Array using the java.util.Arrays class

    Thanks for the useful post.

    Spring 3
  7. Re: How to Validate an email address using Regular Expressions

    The following code strictly validates an email address agants the RFC822 syntax :



    try {
    InternetAddress addr = new InternetAddress(email, true);
    // valid email
    } catch...
  8. Re: How to Validate an email address using Regular Expressions

    Thanks for the post. I have not tested the code yet, but using InternetAddress is much more simple.

    Spring 3
  9. Re: How to Send emails from Google Mail using JavaMail API

    The old way still works. There is no need to use MultiPart if the email is plain text and does not contain attachments or inlines.

    Spring 3
  10. Re: How to use an ArrayList - java.util.ArrayList

    It works since Java 5 via autoboxing/unboxing feature. This understand is old and should be replaced.

    Spring 3
  11. Re: Starting and Stopping Tomcat7 Server from Java Program

    Tomcat provides some useful startup/shutdown scripts located at its installation folder, so you can call those scripts from a Java program using the Runtime.exec() command.

    Spring 3
  12. Re: How to call a java programme from an applet?

    By default, reading or writing files are not allowed for a normal applet, so you have to give appropriate permission to the applet by either using .java.policy file or sign the applet with a security...
  13. Re: Java Tip Jul 29, 2010 - Swing Console Component

    A great tutorial, thanks a bunch!

    Spring 3
  14. Replies
    3
    Views
    3,441

    Re: Address Book program in Java

    Hi Dave,

    Are you still interested in developing the project? I am a freelance Java developer who can help you completing the job.

    Spring 3
  15. Re: How can I poll a remote server, to see if it is still available?

    Generally you can send a "ping" command to the server.
    If you want to check if the server listens on a specific port, you need to initiates a socket connection at the specified port. Google "Java...
  16. Replies
    3
    Views
    2,166

    Re: Java.security.AccessControlException

    The default permissions for applet is very limited, so you should either have a .java.policy file or sign the applet using a certificate to give it the required permission.

    Spring 3
  17. Replies
    5
    Views
    2,394

    Re: connect to mysql database

    Make sure that you have mysql-connector-java-xxx.jar present in the classpath.

    Spring 3
  18. Re: Connecting to Server Database From Applet

    Performance, Security and Maintainability.
  19. Re: problem of creating matrix with JButton or Panel

    You are trying to access an array element at the index which is greater than the array's size. Change i <= 5 to i < 5 it should work.

    Spring 3
  20. Re: Connecting to Server Database From Applet

    Making a database connection to a remote server from an applet is a very bad practice. Should be avoided.

    Spring 3
  21. Replies
    2
    Views
    2,849

    Re: GridBagLayout problems with align

    Use GridBagConstraints.anchor property.



    component.setMinimumSize(), component.setMaximumSize()


    component.setFont(), component.setBackground(), component.setForeground()

    Spring 3
  22. Replies
    3
    Views
    1,335

    Re: please help.

    Well, the solution is pretty simple, I suggest this algorithm for the highest odd number:

    int highestOdd = Integer.MIN_VALUE;
    if (number is odd and number > highestOdd) {
    highestOdd =...
  23. Re: What is Abstraction?The Confusing Concept Simplified

    It looks like involving Encapsulation, not Abstraction. Abstraction refers to the usage of interfaces and abstract classes.

    Spring 3
  24. Replies
    4
    Views
    1,491

    Re: trying to save data onto a file

    You need to use the append() method on the PrintWriter object, instead of the println() method you have tried.

    Spring 3
  25. Re: Struts application - slow request processing

    I think you should examine the server log file to see what have been happened in details.

    Spring 3
Results 1 to 25 of 39
Page 1 of 2 1 2