ADF mobile- cant able to open Anroid SDK Manager

when i tried to open SDK anroid manager, but i can’t able to open.What was the cause …
path of jre is missing in anroid.bat file

Soution is –

Open up tools/android.bat in your favorite text editor
Search for this piece of code:

set java_exe=
Replace it with this:

set java_exe=”D:\Program Files\Java\jdk1.7.0_07\bin\java.exe”
where the path is the your Java exe.

Run android.bat and you will be able to open anroid sdk manager…

ADF mobile error- failed to locate the Google Cloud Messaging for Android Library file named “gcm.jar”.

Let start ADF mobile now….

Error – Following error is hit when trying to deploy an ADF Mobile application.

Failed to locate the Google Cloud Messaging for Android Library file named “gcm.jar”. (oracle.adfmf.framework.dt.deploy.android.deployers.ValidatePreferencesDeployer)

CAUSE-
1. You are not using the correct version of ADF Mobile extension that is certified with your JDeveloper version.
2. You don’t have enough android SDK jars installed on your system

There are some jar missing in my anroid sdk manager.install it.

That’s it. Install some missing jar… enjoy coding in ADF mobile…

Converting java.lang.String to oracle.jbo.domain.Date

Requirement- to convert date as a string to oracle.jbo.domain.Date.

Solutions-

/**
*Converts a String to oracle.jbo.domain.Date
* @param String
* @return oracle.jbo.domain.Date
*/
public oracle.jbo.domain.Date castToJBODate(String aDate){
          DateFormat formatter;
          java.util.Date date; 

          if(aDate!=null){

            try {

              formatter = new SimpleDateFormat("dd/MMM/yyyy");
              date = formatter.parse(aDate);
              java.sql.Date sqlDate = new java.sql.Date(date.getTime());
              oracle.jbo.domain.Date jboDate = new oracle.jbo.domain.Date(sqlDate);

                return jboDate;
               } catch (ParseException e) {

                        e.printStackTrace();
                }

         }

         return null;
}

Another scenario –Convert oracle.jbo.domain.Date to String

Use this code-

 public String convertJbodateToString(oracle.jbo.domain.Date domainDate){
        
        SimpleDateFormat formatter = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.S");  
        Date date = null;
        
        try {
            date = formatter.parse(domainDate.toString().substring(0, 21));
        } catch (ParseException e) {
        }
        
                
        SimpleDateFormat FORMATTER = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
        System.out.println("NewDate-->" + FORMATTER.format(date));
        
        return FORMATTER.format(date);
    }

Happing coding with Vinay in techartifact