请教Micriosoft, Google, Eclipse等大公司是如何通过构架和规范解决软件工程中Java API兼容性问题的

最近忙于写一篇关于<<Architecture patterns and rules for compatible development of Java components>>的文章。目的是考察业界针对J软件工程中Java API兼容性的研发解决过程,提出适合本公司的构架和规范. 因为这个题目的范围实在是广泛。在这里想集思广益,了解Microsoft, Google, Eclipse等软件开发商是如何利用architecture and Rules解决例如, Backward Compatibility, Forward Compatibility, Binary Compatibility and Source Compatibility等兼容性问题的。多谢大家帮忙!

多谢大家的回复。就是因为话题太大,具体内容难寻,才寻求大家的帮助的,众人拾柴,火焰高。我查看了一些个人博客,初步了解微软是采用树性架构,Eclipse则是以component来构架的。但是具体的内容就不是很清楚。另外, 我把问题简化了一下,通过下面的两个表格,可以把关于兼容性的问题做一个简单的概况。希望大家能帮忙收集一下资料。如果大家发现了什么相关的信息,请告知一下,谢谢。
     Tools     Process     Patterns     Rules
Backward Compatibilities
Forward Compatibilities
Source Compatibilities     
Binary Compatibilities     CLIRR               
     Microsoft Google     Eclipse     IBM
Backward Compatibilities Win NT, Word
Forward Compatibilities
Source Compatibilities     Windows family
Binary Compatibilities     binaries that are
compiled for
Windows 2000,
can also be run
on Windows XP
and Windows Vista.

Similar Messages

  • Is there any way to view the Java API through Eclipse or any IDE?

    I usually use Eclipse to code and sometimes, when i'm typing a method it will show a small list of the methods available for that class. Does Eclipse (or any other IDE, but Eclipse especially), have the java API available for view somewhere in the program?
    Thanks.

    In Eclipse Select Window -> Show View -> JavaDoc. If you're JRE is set up correctly, it will show you the JavaDoc of the currently selected class/method/member variable in that view.
    If it isn't, then go to Window -> Preferences -> Java -> Installed JRE and edit the JavaDoc location of the rt.jar (for Java 6 http://java.sun.com/javase/6/docs/api/ is a good value, as long as you're online).

  • Error while using LiveCycle java APIs with Http servlets:"Remote EJBObject lookup failed for ejb/Inv

    Hi all,
    When i try to run more than one servelt of the Quick Start samples that using Livecycle Java APIs and i get an error of "Remote EJBObject lookup failed for ejb/Invocation provider" from any servelt i run.
    I try some Quick samples which is not servelts (java class) and it works fine, which makes me sure that my connection properties is true.
    Environment:
    The LiveCycle is based on "Websphere v6.1", and i use "Eclipse Platform
    Version: 3.4.1".
    i install "tomcat 5.5.17" to test the servelts in developing time through Eclipse.(only for test in developing time not for deploy on )
    The Jars i added in the classpath:
    adobe-forms-client.jar
    adobe-livecycle-client.jar
    adobe-usermanager-client.jar
    adobe-utilities.jar
    ejb.jar
    j2ee.jar
    ecutlis.jar
    com.ibm.ws.admin.client_6.1.0.jar
    com.ibm.ws.webservices.thinclient_6.1.0.jar
    server.jar
    utlis.jar
    wsexception.jar
    My code is :
    Properties ConnectionProps = new Properties();
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_DEFAULT_EJB_ENDPOINT, "iiop://localhost:2809");
    ConnectionProps.setProperty ServiceClientFactoryProperties.DSC_TRANSPORT_PROTOCOL,ServiceClientFactoryProperties.DSC_ EJB_PROTOCOL);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_SERVER_TYPE,ServiceClientFa ctoryProperties.DSC_WEBSPHERE_SERVER_TYPE);
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_USERNAME, "Administrator");
    ConnectionProps.setProperty(ServiceClientFactoryProperties.DSC_CREDENTIAL_PASSWORD, "password");
    ConnectionProps.setProperty("java.naming.factory.initial", "com.ibm.ws.naming.util.WsnInitCtxFactory");
    //Create a ServiceClientFactory object
    ServiceClientFactory myFactory = ServiceClientFactory.createInstance(ConnectionProps);
    //Create a FormsServiceClient object
    FormsServiceClient formsClient = new FormsServiceClient(myFactory);
    //Get Form data to pass to the processFormSubmission method
    Document formData = new Document(req.getInputStream());
    //Set run-time options
    RenderOptionsSpec processSpec = new RenderOptionsSpec();
    processSpec.setLocale("en_US");
    //Invoke the processFormSubmission method
    FormsResult formOut = formsClient.processFormSubmission(formData,"CONTENT_TYPE=application/pdf&CONTENT_TYPE=app lication/vnd.adobe.xdp+xml&CONTENT_TYPE=text/xml", "",processSpec);
    List fileAttachments = formOut.getAttachments();
    Iterator iter = fileAttachments.iterator();
    int i = 0 ;
    while (iter.hasNext()) {
    Document file = (Document)iter.next();
    file.copyToFile(new File("C:\\Adobe\\tempFile"+i+".jp i++;
    short processState = formOut.getAction();
    ...... (To the end of the sample)
    My Error was:
    com.adobe.livecycle.formsservice.exception.ProcessFormSubmissionException: ALC-DSC-031-000: com.adobe.idp.dsc.net.DSCNamingException: Remote EJBObject lookup failed for ejb/Invocation provider
    at com.adobe.livecycle.formsservice.client.FormsServiceClient.processFormSubmission(FormsSer viceClient.java:416)
    at HandleData.doPost(HandleData.java:62)
    at HandleData.doGet(HandleData.java:31)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:689)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.j ava:252)
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
    a

    I assume here that your application is deployed on a different physical machine of where LCES is deployed and running.
    Do the following test:
    - Say that LCES is deployed on machine1 and your application is deployed on machine2. Ping machine1 from machine2 and note the ip address.
    - Ping machine1 from machine1 and note the ip address.
    The two pings should match.
    - Ping machine2 from machine1 and note the ip address.
    - Ping machine2 from machine2 and note the ip address.
    The two pings should match.
    Usually this kind of error would happen if your servers have internal and external ip addresses.

  • Java API for Adobe Flex(AIR and Browser)

    Hello Community,
    Sometime ago i started the project located at: : http://code.google.com/p/gwt4air/ , wich primary goal was to bring another approach on writing AIR application by providing a Java API for the AIR API. On top of that i added support for PDF and Excel generation using Java.
    I m glad to announce that  the project  will now add support for the Flex Framework
    I wrote a post about it on the main page.
    The Idea behind it is to give Java Developers a more simple way to write Flex Application by leaveraing a swing like API.
    I hope this project will be a good alternative to the MXML+ ActionScript approach and looking for people willing to join the project.
    Regards,
    Alain

    Good question, I'd like to know this myself. 4.5 has a huge number of changes since 4.0.

  • Link to download java api?

    Hi,
    I've needed to download the java api a couple of times in the past, and I remember the download was impossible to find on sun's website. Once again I can't figure out where it is. Can anyone help me?
    I wonder why sun doesn't put a link to where you can download the api at the top of their web page that lets you view the api online?

    You mean, like the "Downloads" link at the top of this page?No. I looked through all the downloads, and I didn't find what I was looking for
    Downloads->Java Se->Java SE 6 Documentation
    how hard was that?Not too hard if you know that what you are after is called Java SE 6 Documentation.
    Use google next time... "Java API Download"I did--and with those exact words in a different order. It wasn't helpful.
    http://java.sun.com/javase/reference/api.jspThose are links to the online docs--not downloadable docs.
    Thanks for the help, but lose the attitude--especially for something so trivial for someone who knows their way around the sun website. Sorry for putting you all out.

  • ODI Java API: NullPointerException

    Hi,
    i try to create some objects in ODI with the Java API. The Connection does work but I cant create objects like modelfolder or projects... there seems to be a problem with the transaction in my optinion.
    Thanks for Help!
    h1. Code
    PoolingAttributes poolingAttributes = new PoolingAttributes();
              //Connection for master and work
              MasterRepositoryDbInfo master = new MasterRepositoryDbInfo("jdbc:oracle:thin:@192.168.25.2:1521:db112", "oracle.jdbc.OracleDriver", "snpm1", new String("****").toCharArray(), poolingAttributes);
              WorkRepositoryDbInfo work = new WorkRepositoryDbInfo("WORKREP4",poolingAttributes);
              //create an instance configuration
              OdiInstanceConfig pConfig = new OdiInstanceConfig(master, work);
              //open the connection
              OdiInstance odiInstance = OdiInstance.createInstance(pConfig);
              //create an Entity- and TransactionManager
              IOdiEntityManager entityManager = odiInstance.getTransactionalEntityManager();
              ITransactionManager transManager = odiInstance.getTransactionManager();
              //create a new default transaction
              ITransactionStatus transaction = transManager.getTransaction(null);
              //create a folder
              OdiModelFolder folder = new OdiModelFolder("Folder");
              //make the model folder persistent
              entityManager.persist(folder);
              //Commit the open transaction
              transManager.commit(transaction);
              //Close Connection to the odiInstance
              odiInstance.close();
    h1. Exception
    17.06.2011 14:43:52 org.eclipse.persistence.default
    WARNUNG:
    java.lang.NullPointerException
         at oracle.odi.core.persistence.toplink.handlers.InsertUpdateDeleteHandler.aboutToInsert(InsertUpdateDeleteHandler.java:436)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:662)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListeners(DescriptorEventManager.java:692)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:199)
         at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:454)
         at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
         at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
         at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:287)
         at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
         at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:675)
         at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:589)
         at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:109)
         at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:86)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2898)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1225)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1207)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1167)
         at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:197)
         at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:103)
         at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3260)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1413)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:547)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1559)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:360)
         at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:696)
         at oracle.odi.core.persistence.jpa.JpaOdiEntityManager.flush(JpaOdiEntityManager.java:74)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.odi.core.OdiInstance$TransactionalOdiEntityManagerInvocationHandler.invoke(OdiInstance.java:230)
         at $Proxy4.flush(Unknown Source)
         at test.main(test.java:65)
    17.06.2011 14:43:52 org.eclipse.persistence.default
    WARNUNG:
    java.lang.NullPointerException
         at oracle.odi.core.persistence.toplink.handlers.InsertUpdateDeleteHandler.aboutToInsert(InsertUpdateDeleteHandler.java:436)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:662)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListeners(DescriptorEventManager.java:692)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:199)
         at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:454)
         at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
         at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
         at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:287)
         at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
         at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:675)
         at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:589)
         at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:109)
         at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:86)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2898)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1225)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1207)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1167)
         at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:197)
         at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:103)
         at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3260)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1413)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:547)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1559)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:360)
         at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:696)
         at oracle.odi.core.persistence.jpa.JpaOdiEntityManager.flush(JpaOdiEntityManager.java:74)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.odi.core.OdiInstance$TransactionalOdiEntityManagerInvocationHandler.invoke(OdiInstance.java:230)
         at $Proxy4.flush(Unknown Source)
         at test.main(test.java:65)
    Exception in thread "main" oracle.odi.core.persistence.jpa.JpaOdiEntityManager$OdiEntityManagerSystemException: nested exception is java.lang.NullPointerException
    Caused by: java.lang.NullPointerException
         at oracle.odi.core.persistence.toplink.handlers.InsertUpdateDeleteHandler.aboutToInsert(InsertUpdateDeleteHandler.java:436)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListener(DescriptorEventManager.java:662)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.notifyListeners(DescriptorEventManager.java:692)
         at org.eclipse.persistence.descriptors.DescriptorEventManager.executeEvent(DescriptorEventManager.java:199)
         at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.insertObjectForWrite(DatabaseQueryMechanism.java:454)
         at org.eclipse.persistence.queries.InsertObjectQuery.executeCommit(InsertObjectQuery.java:80)
         at org.eclipse.persistence.queries.InsertObjectQuery.executeCommitWithChangeSet(InsertObjectQuery.java:90)
         at org.eclipse.persistence.internal.queries.DatabaseQueryMechanism.executeWriteWithChangeSet(DatabaseQueryMechanism.java:287)
         at org.eclipse.persistence.queries.WriteObjectQuery.executeDatabaseQuery(WriteObjectQuery.java:58)
         at org.eclipse.persistence.queries.DatabaseQuery.execute(DatabaseQuery.java:675)
         at org.eclipse.persistence.queries.DatabaseQuery.executeInUnitOfWork(DatabaseQuery.java:589)
         at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWorkObjectLevelModifyQuery(ObjectLevelModifyQuery.java:109)
         at org.eclipse.persistence.queries.ObjectLevelModifyQuery.executeInUnitOfWork(ObjectLevelModifyQuery.java:86)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.internalExecuteQuery(UnitOfWorkImpl.java:2898)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1225)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1207)
         at org.eclipse.persistence.internal.sessions.AbstractSession.executeQuery(AbstractSession.java:1167)
         at org.eclipse.persistence.internal.sessions.CommitManager.commitNewObjectsForClassWithChangeSet(CommitManager.java:197)
         at org.eclipse.persistence.internal.sessions.CommitManager.commitAllObjectsWithChangeSet(CommitManager.java:103)
         at org.eclipse.persistence.internal.sessions.AbstractSession.writeAllObjectsWithChangeSet(AbstractSession.java:3260)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabase(UnitOfWorkImpl.java:1413)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.commitToDatabase(RepeatableWriteUnitOfWork.java:547)
         at org.eclipse.persistence.internal.sessions.UnitOfWorkImpl.commitToDatabaseWithPreBuiltChangeSet(UnitOfWorkImpl.java:1559)
         at org.eclipse.persistence.internal.sessions.RepeatableWriteUnitOfWork.writeChanges(RepeatableWriteUnitOfWork.java:360)
         at org.eclipse.persistence.internal.jpa.EntityManagerImpl.flush(EntityManagerImpl.java:696)
         at oracle.odi.core.persistence.jpa.JpaOdiEntityManager.flush(JpaOdiEntityManager.java:74)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
         at java.lang.reflect.Method.invoke(Unknown Source)
         at oracle.odi.core.OdiInstance$TransactionalOdiEntityManagerInvocationHandler.invoke(OdiInstance.java:230)
         at $Proxy4.flush(Unknown Source)
         at test.main(test.java:65)
    Edited by: Scheyk on Jun 17, 2011 3:10 PM

    For everyone here is the solution:
    The problem was that I wasn't authenticated.
    So before create a Entity I have to do this:
    Authentication authentication = odiInstance.getSecurityManager().createAuthentication("SUPERVISOR",new String("*****").toCharArray());
              try {
                   odiInstance.getSecurityManager().setCurrentThreadAuthentication(
                             authentication);
    //do the creation here

  • Java API to fill in a MS Word file template

    Ola,
    Please help me on the following topic:
    I need a kind of Java API which allows me to read Ms Word 2003 .doc files, replace a few strings/keywords and save the doc back.
    Ideal feature would also be to allow me in the end to convert to TXT or RTF, after the strings have been replaced.
    A first search on Google takes me to Apache POI, but the api looks really heavy for a beginner.
    Do you have any other suggestions for another API? I do not mind if not open-source.
    Thanks.

    FileInputStream fis = new FileInputStream(new File("/cory/test.doc"));
    FileOutputStream fos = new FileOutputStream(new File("/cory/my_result.pdf"));
    officetools.OfficeFile f = new officetools.OfficeFile(fis,"localhost","8100", false);
    f.replaceAll("Yahoo","Google"); // will replace all string Yahoo with string Google

  • Is there a Java API for Tree data structure?

    Hi,
    I am wondering is there any Java API to work on Tree based data structure.
    I could read in some forums / sites that teach me how to create tree based objects using collection.
    But I wanted to know is there any core java API that can be used directly for tree based operations. (like binary tree or other type of trees)
    Please comment on this doubt.

    Headed using google and other stuff not found one.
    Suggestion: Why not start building the one, its a good idea to do that, isn't it.

  • GWT meets  Flex:  Java API  for Flex

    Hello people,
    I m  somedays away to release the  version 2.1 of gwt4air. gwt4air is an open source project  based on  gwt (http://code.google.com/webtoolkit/)  and provides a Java API to different platform where Java is not the primary language.
    Version 2.0 added among other features  support for Adobe AIR, Alive PDF, Pure PDF, Aswing and other GWT based  UI libraries like  EXT-GWT
    With version 2.1  i added support for Flex(AIR and Browser). The goal of this approach is to make it easy for Java Developers to switch  to Flex be leveraging  a swing like API. But also to  present an alternative to the classical Flex developement. The overall idea behind this is described here:
    http://code.google.com/p/gwt4air/wiki/Beginn
    A demo application ca be found here: http://gwt4air.appspot.com/
    The application contains around 100 demos with source code illustrating the use of the api.
    I ve tried to keep the API similar to the AS3 api  so one could easely  switch from AS3 to Java and vice versa
    Note that this  flex applicaton is entirely written in Java using gwt4air. No AS3 no MXML.
    The application is still in alpha stage so please expect some errors.
    The project home is located at:
    http://code.google.com/p/gwt4air/
    I m looking forward to hear what you think about this idea. Any inputs (good or bad)  is really welcome
    Help me make this an even better tool.
    It s about time that  Flex rocks the GWT world
    cheers,
    Alain

    It looks like those genius @google are also thinking about a Java(GWT) API for Flash .
    http://www.youtube.com/watch?v=F_sbusEUz5w&t=1718
    Glad to see  that i m not a fool
    Or alteast not the only fool that believe  combining  Java and Flash/Flex is a potent mix.

  • How to create the groups in OID Using Java API.

    Hi,
    I need to create the group in OID Using Java API's only(i.e., javax.naming.* only).
    I need to achieve it without using any oracle specific jars.
    Is there any way to achieve it?.If there's a option to achieve it,do let me know.
    I also need to create the users in that group ,after creating it.
    If you share any useful link or ideas for the same would be great.
    Thanks
    Balaji

    bobws wrote:
    Hi,
    I want to find the installed JREs in windows using java. I couldn't fine any java API. So I am using the below code to fetch the JRE list from windows registries & parse the returned collection to know the installed JRE.Why? If you are running java you already have a JRE. So why not just use it?
    >
    String key = "HKEY_LOCAL_MACHINE\\SOFTWARE\\JavaSoft\\Java Runtime Environment";
    Runtime.getRuntime().exec(
    "reg query " + "\"" + key + "\"");
    Is it legal to retrieve the installed JREs in this way? Legal? It is OS specific, and to a certain extent dependent on vendor and what the vendor wants to do. Could also be impacted by permissions. Other than that it is ok.
    I am feeling like its a type of hacking. So I couldn't decide whether this is legal (recommended) way of using. Does anybody can answer me. I can see the similar posts in google. Somebody suggests this way & somebody suggests to use preference API which is similar to this. Appreciate your help.Preferences won't work. It doesn't allow access to the registry in general, only a part of it. There are discussions in the JNI forum about retrieving VM versions. Prior to actually using the VM though.

  • FTP using java API

    i saw the ftp upload an download codes in one of the previous forums...
    is it possible for a directory listing of the remote system i.e., the user can select the files which he has to download from the server . is it possible to do that using java api without any third party package???

    Type java ftp to google and you'll find a couple of dozen Java FTP client implementations.
    One of them comes with Sun's JDK, sun.net.ftp.FtpClient. It's in the "sun" package hierarchy, which means it's unsupported, undocumented and subject to change without notice.
    What I've done myself is grab Sun's FtpClient and copy it to one of my own packages; that way it won't suddenly change. (I did that when it had a couple of dodgy changes between using active/passive/extended passive modes.)

  • Need information about OCR Java API

    Hi,
    I am looking for Java API to read OCR. Can anyone have idea about it please tell me. It will be very useful.
    Thanks in advance.
    Thanks & Regards
    Veeraraghavan P

    Since you claim you already google, I can possibly interest you in another web page: [How To Ask Questions The Smart Way|http://www.catb.org/~esr/faqs/smart-questions.html]

  • Create User in OID using Java API

    I read the documentation, read javadoc for Java API for OID, but still am not clear "how can I create a user in OID using Java API for OID."
    It tells us how to create a java object User, but then how do we write this object to OID ?
    I searched every where, metalink, forums, google...and am still looking for answere...
    Thanks in Advance
    Cheers
    Puneet

    I did it using the Novell LDAP java api:
    import com.novell.ldap.*;
    public class LdapAdmin {
    public static final String ldap_base = "dc=your,dc=company,dc=com";
    public static final String ldap_user_base = "cn=Users," + ldap_base;
    public static final String ldap_portal_base = "cn=PORTAL_GROUPS,cn=Groups," + ldap_base;
    public static final String ldap_extended_base = "cn=Extended Properties,cn=OracleContext," + ldap_base;
    public static final String ldap_dbdomain_base = "cn=OracleDefaultDomain,cn=OracleDBSecurity,cn=Products,cn=OracleContext," + ldap_base;
    public static final String ldap_context_base = "cn=COMMON,cn=OracleDBAppContext," + ldap_dbdomain_base;
    private static final String default_ldap_host = "infrastructure.your.company.com";
    private static final int default_ldap_port = 4032;
    private static final String default_ldap_login = "cn=orcladmin," + ldap_user_base;
    private static final String default_ldap_pwd = "welcome1";
    private static final String default_user_pwd = "secret";
    private static final String[] personclass_values = { "top", "person", "organizationalPerson", "inetOrgPerson", "orcluser", "orcluserv2" };
    public static LDAPConnection getConnection (String host, int port, String user, String pwd) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(host,port);
    lc.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: "+lex.getResultCode()+"-"+lex.getLDAPErrorMessage());
         return lc;
    public static LDAPConnection getConnection (String host, int port) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(host,port);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: "+lex.getResultCode()+"-"+lex.getLDAPErrorMessage());
         return lc;
    public static LDAPConnection getConnection (String user, String pwd) {
    LDAPConnection lc = new LDAPConnection();
    try {
    lc.connect(default_ldap_host,default_ldap_port);
    lc.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in getConnection: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    lex.printStackTrace();
         return lc;
    public static LDAPConnection getConnection () {
    return getConnection(default_ldap_host,default_ldap_port);
    public static void bind (LDAPConnection conn, String user, String pwd) {
    try {
    conn.bind(user,pwd);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in bind: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    lex.printStackTrace();
    private static void bind (LDAPConnection conn) {
    bind(conn,default_ldap_login,default_user_pwd);
    public static void modifyAttribute (LDAPConnection conn, String dn, String attr, String val, int mod) {
    LDAPAttribute attribute = new LDAPAttribute(attr,val);
    LDAPModification[] modification = new LDAPModification[] { new LDAPModification(mod,attribute) };
    try {
    conn.modify(dn,modification);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in modifyAttribute: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void modifyAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.REPLACE);
    public static void addAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.ADD);
    public static void deleteAttribute (LDAPConnection conn, String dn, String attr, String val) {
    modifyAttribute(conn,dn,attr,val,LDAPModification.DELETE);
    public static void deleteEntry (LDAPConnection conn, String dn) {
    try {
    conn.delete(dn);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in deleteEntry: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static boolean isValidDn(LDAPConnection conn, String dn) {
    try {
    LDAPSearchResults res = conn.search(dn);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in deleteEntry: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    return false;
    public static void createPerson (LDAPConnection conn, String net_id, String lname, String fname, String office, String email, String id, String fullname) {
         LDAPAttributeSet attributeSet = new LDAPAttributeSet();
    attributeSet.add(new LDAPAttribute("cn", net_id));
    attributeSet.add(new LDAPAttribute("sn", lname));
    attributeSet.add(new LDAPAttribute("objectclass", personclass_values));
    attributeSet.add(new LDAPAttribute("l", office));
    attributeSet.add(new LDAPAttribute("mail", email));
    attributeSet.add(new LDAPAttribute("employeeNumber", id));
    attributeSet.add(new LDAPAttribute("givenName", fname));
    attributeSet.add(new LDAPAttribute("uid", net_id));
    // attributeSet.add(new LDAPAttribute("fullName", fullname));
    attributeSet.add(new LDAPAttribute("orclpkcs12hint", default_user_pwd));
    attributeSet.add(new LDAPAttribute("orclpassword", VerifyPassword.getHash(net_id,default_user_pwd)));
    attributeSet.add(new LDAPAttribute("userpassword", default_user_pwd));
    attributeSet.add(new LDAPAttribute("orcldefaultprofilegroup", "cn=DEFAULT,"+ldap_portal_base));
    LDAPEntry entry = new LDAPEntry("cn="+net_id+","+ldap_user_base,attributeSet);
    try {
    conn.add(entry);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in createPerson: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void updatePerson (LDAPConnection conn, String net_id, String lname, String fname, String office, String email, String id, String fullname) {
    LDAPModification[] mod = new LDAPModification[8];
    mod[0] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("cn", net_id));
    mod[1] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("sn", lname));
    mod[2] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("l", office));
    mod[3] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("mail", email));
    mod[4] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("employeeNumber", id));
    mod[5] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("givenname", fname));
    mod[6] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("fullName", fullname));
    mod[7] = new LDAPModification(LDAPModification.REPLACE,new LDAPAttribute("uid", net_id));
    try {
    conn.modify("cn="+net_id+","+ldap_user_base,mod);
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in updatePerson: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    public static void main (String[] args) {
    try {
    LDAPConnection conn = getConnection(default_ldap_login,default_ldap_pwd);
    // updatePerson(conn,"ID1","Somebody","Joe","CLE","[email protected]","1","Joe Somebody 2");
    // modifyAttribute(conn,"cn=ID1,"+ldap_user_base,"fullName","Joe Somebody",LDAPModification.REPLACE);
    // modifyAttribute(conn,"cn=ID1,"+ldap_user_base,"displayName","Joe Somebody");
    createPerson(conn,"ID1","Somebody","Joe","CLE","[email protected]","1","Joe Somebody");
    // deleteEntry(conn,"cn=ID1,"+ldap_user_base);
    conn.disconnect();
    } catch (LDAPException lex) {
    System.out.println("LDAP Error in main: ("+lex.getResultCode()+") - "+lex.getLDAPErrorMessage());
    }

  • Create group in OID using java api

    Hi all!
    I need to create group in OID using java api. Java api documentation contains examples for creating users but not for groups. I search oracle.com (and google) and didn't find any hint.
    Anybody know the way?
    thank you.

    Andrew,
    a group is created like any other entry in OID. You need to specify the dn, objectclass(es) and (mandatory) attributes.
    e.g.
    objectclass=groupOfUniqueNames
    with
    uniquemember=cn=orcladmin, cn=Users, dc=de,dc=oracle,dc=com
    as an example take a look at
    cn=iASAdmins, cn=Groups,cn=OracleContext,dc=de,dc=oracle,dc=com
    to see the schema (data) for groupofuniquenames you can either use ODM or query the directory server
    ldapsearch -p 3060 -b "cn=subschemasubentry" -s base "objectclass=*"
    regards,
    --Olaf                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Java API 1.7 Released - getSite() fix, XSD 1.1 support

    I have released a new version of the iTunesU Web Services API for Java, version 1.7. This release supports version 1.1 of the XSD, including the new UpdateGroup web service method, the ExternalFeed entity type, and the ExternalFeed, GroupType and AllowSubscription attributes for Groups.
    This release includes a fix for the getSite() method, which broke due to a change in the behavior of the URL-based ShowTree method (/API/ShowTree/). It used to return an XML document with a Site element as its root; it now returns an ITunesUResponse.
    The latest jar is available here:
    http://code.google.com/p/itunesu-api-java/downloads/detail?name=itunesu-api-java -1.7.jar
    The latest JavaDocs, including docs for the new ExternalFeed class, can be found here:
    http://itunesu-api-java.googlecode.com/svn/trunk/doc/index.html
    If you are experiencing problems with getSite(), I would like to hear if this release resolves those problems for you, or if you have further issues. I also recommend against using getSite() if you can avoid it, since it downloads the entire site tree into memory. Using getSiteMinimal() followed by getCourse(), getSection(), etc. will be much faster and use much less memory.
    Thanks,
    Dave

    I noticed there were issues with setting permissions. I read the discussion posts on that, but I didn't see any notice of the problem being solved.
    I'm getting an error when I try to set the permission for a course.
    [org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content starting with element 'Permission'. The content must match '(("":Name){0-1},("":ShortName){0-1},("":Identifier){0-1},("":Instructor){0-1}, ("":Description){0-1},("":Group){0-UNBOUNDED},("":AllowSubscription){0-1},("":Th emeHandle){0-1},("":Permission){0-1})'.]
    edu.asu.itunesu.ITunesUException: [org.xml.sax.SAXParseException: cvc-complex-type.2.4.a: Invalid content starting with element 'Permission'. The content must match '(("":Name){0-1},("":ShortName){0-1},("":Identifier){0-1},("":Instructor){0-1}, ("":Description){0-1},("":Group){0-UNBOUNDED},("":AllowSubscription){0-1},("":Th emeHandle){0-1},("":Permission){0-1})'.]
    at edu.asu.itunesu.ITunesUConnection.send(ITunesUConnection.java:1007)
    at edu.asu.itunesu.ITunesUConnection.addCourse(ITunesUConnection.java:560)
    nextCourse.setName(courseTitle);
    nextCourse.setShortName(courseTitle);
    nextCourse.setIdentifier(courseId);
    nextCourse.setPermissions(sectionPermission);
    LinkedList crsTab = new LinkedList();
    Group tab1 = new Group();
    tab1.setName("Tab 1");
    crsTab.addFirst(tab1);
    nextCourse.setGroups(crsTab);
    ITunesUResponse addCrs_resp = ituneConn.addCourse(sectionHandle, courseTemplateHandle, nextCourse);
    successful = addCrs_resp.getAddedObjectHandle();
    I never had this issue before, so I'm wondering what's causing it.
    I'm currently using the 1.7 release of the Java API.

Maybe you are looking for