tl  tr
  Home | Tutorials | Articles | Videos | Products | Tools | Search
Interviews | Open Source | Tag Cloud | Follow Us | Bookmark | Contact   
 Tools and Libs > Open Symphony Core > Generate GUID

Generate GUID 

OSCore (Open Symphony Core) is a java library with lot of utilities and reusable components. This requires the libraries oscore-2.2.6.jar, mail.jar to be in classpath. The following example shows generating GUID.

File Name  :  
com/bethecoder/tutorials/oscore/GUIDTest.java 
Author  :  Sudhakar KV
Email  :  [email protected]
   
package com.bethecoder.tutorials.oscore;

import com.opensymphony.util.GUID;

public class GUIDTest {

  /**
   @param args
   */
  public static void main(String[] args) {
    String guid = GUID.generateGUID();
    System.out.println(guid);
    
    guid = GUID.generateFormattedGUID();
    System.out.println(guid);
  }

}
   

It gives the following output,
KTI6VW9L9JMGLRK7IZ7JK3DTU5RBKLVG
F4E3799U-A7OH-WK50-1S78-84BECAV7QPW4



 
  


  
bl  br