Monday, November 1, 2010

How to import source code from SVN to Netbeans 6.9

This post will establish the required steps to import the JSON ME source code from java.net, and in general from a svn repository into your NetBeans 6.9.

The code we want to import can be found at:


Requirements:
  1. Download and install NetBeans 6.9, if you don't have it yet.
  2. Create an account at Java.net, if you don't have one.
Steps:
  1. Start NetBeans 6.9 and go to the menu Team-->Subversion-->Checkout.

    To access the source code using Subversion, you must have Subversion client installed on your system. The first time you start NetBeans to access Subversion, it offers you the possibility to download and install the client automatically or manually.


    Note: With previous releases of NetBeans, the installation had to be done manually:

  2. Once the Subversion client has been installed, you can specify the SVN repository in where the source code is. For this example:

    https://svn.java.net/svn/meapplicationdevelopers~svn

    The last URL can be found at:

    http://java.net/projects/meapplicationdevelopers/sources

    Next, enter your java.net account info and if you have a proxy, you can configure it here as well.


  3. Next, you can choose the directory you want to import.



    For our example, choose:

    demobox/mobileajax/lib/json


    Also, you have to specify which revision version you want to import, press Browse to find the revision you want. For this case, the last revision was 333.



    Finally, you must select the local folder in which you want to import the selected directory and leave the box "Scan for NetBeans Projects after Checkout" checked. Thus, when the process is finished, NetBeans will automatically import the project (in case that the source code contains a NetBeans project).


  4. After importing the source code, there may be problems with the MicroEdition SDK version installed on your system and the one the source code was using. To solve the problem, you can right click on the imported project, choose properties and assign the MicroEdition SDK installed on your system to the project. To troubleshoot other resources, you should check if you have them installed in your system, if not, maybe you should get them before you can compile the source code using NetBeans.

References:

meapplicationdevelopers: Subversion Instructions. 2007. Oracle [online].
Available from Internet:
http://java.net/projects/meapplicationdevelopers/sources
[accessed on October the 27th 2010].


meapplicationdevelopers: Subversion. 2007. Oracle [online].
Available from Internet: http://java.net/projects/meapplicationdevelopers/sources/svn/show/demobox/mobileajax/lib/json
[accessed on October the 27th 2010].


CollabNet Subversion Downloads for NetBeans 6.5. CollabNet 2010 [online].
Available from Internet:
http://www.open.collab.net/downloads/netbeans/
[accessed on October the 29th 2010].

17 comments:

  1. Hello,
    seems like
    https://meapplicationdevelopers.dev.java.net/source/browse/meapplicationdevelopers/demobox/mobileajax/lib/json/

    is no longer available?
    Where can I find it?

    ReplyDelete
  2. Hi.

    You are right. The project has been migrated to a new platform. You can access the project using this link:

    http://java.net/projects/meapplicationdevelopers

    And you can find the svn repository path here:

    http://java.net/projects/meapplicationdevelopers/sources

    There you will figure out that the svn path is...:

    https://svn.java.net/svn/meapplicationdevelopers~svn

    So you just have to update the links and the rest of the post is the same. I will update the post tonight.

    thank you.

    ReplyDelete
  3. Ok, all URLs are pointing now to the new java.net platform.

    Thx for the comments.

    ReplyDelete
  4. Hi Alexis lopez,

    I couldnt checkout the json ME source code, the netbeans SVN says


    org.tigris.subversion.javahl.ClientException: RA layer request failed
    OPTIONS of 'http://java.net/projects/meapplicationdevelopers/sources': 200 OK (http://java.net)


    Thanks..

    ReplyDelete
  5. Hi Alexis lopez,

    Any idea to how to do it in eclipse

    ReplyDelete
    Replies
    1. Hi, don't know, but I suppose it is supported in eclipse as well. Regards.

      Delete
  6. Hi Alexis lopez,

    can u pls send me JSON library....

    pls send JSON library to dis mail id "rajkumar180589@gmail.com"

    ReplyDelete
  7. This comment has been removed by the author.

    ReplyDelete
    Replies
    1. Hi, I just sent it yo your email. Regards.

      Delete
  8. Hi Alexis Lopez,
    You have done great work and i am very thankful to you. Kindly send me a copy of JSON library to " silentzee@gmail.com". and if you can help to play video from url it is very helpful for me.

    Thanks.

    ReplyDelete
  9. please send me the code Alexis ,my account : "gowtham.gs@teclever.com"

    ReplyDelete
  10. i love this post on SVN to netbeans,specially the detailed parts

    ReplyDelete
  11. Really well explained by you..Good job...

    ReplyDelete