Checkin a file in TFS SDK java

Hi,
I am working on TFS SDK (java)and i want to checkin the file so that it will the latest file will be copied to TFS.
I am using pendEdit and it is not helping me to do the needfull.It is just changing the permissions but not moving the file on to TFS.
example: I have a file in my system which i have changed it and want to checkin back to the TFS. When i say view in TFS it has to be updated with the latest file.
Can some one help me out with this issue.
Regards,
Shirish Bhat.

Hi Shirish,
you can use this same method workspace.checkIn(pendingChanges, comment) and pass in the pendingChanges only the files you want to checkin. You can first query for all the pending changes then filter the ones that you need to checkin like this:
PendingSet pendingSet = workspace.getPendingChanges();
if(pendingSet !=
null)
            PendingChange[] pendingChanges = pendingSet.getPendingChanges();
            List<PendingChange>
changesToCheckin = new ArrayList<PendingChange>();
            for (PendingChange change:pendingChanges)
               if (change.getLocalItem()!=null && change.getLocalItem.equals            (FileNameToCheckin))
                         changesToCheckin.add(change);
if (changesToCheckin.size() != 0)
                workspace.checkIn(changesToCheckin.toArray(), comment);
Please let me know if this does not work for you or you have any questions about it
Thanks
Mireille

Similar Messages

  • Procedure for Creating  Packaging to deploy Sdk java Files to MDM Server

    Hi All,
    I have sdk java files which were developed using eclipse ,need to deploye in other mdm server.Can any one tell me the procedure for creating the packaging structure to deploye using cm_packaging which available with sdk software.
    Thanks In Advance
    Santosh

    Hi All,
    I have sdk java files which were developed using eclipse ,need to deploye in other mdm server.Can any one tell me the procedure for creating the packaging structure to deploye using cm_packaging which available with sdk software.
    Thanks In Advance
    Santosh

  • Forte compile error java source files must have a .java suffix

    Hello Guru's,
    I am using Forte for Java release 2.0 build 1160, and Java SDK 1.3.1.
    When I try to compile a project in Forte I get the following error :
    "fastjavac: java source files must have a .java suffix C:\Program"
    I have looked at the source files and they do hav .java suffix!
    If this is not the correct form can someone point me in the right direction. If this is a correct forum then help is very much appreciated.
    Cheers...Harki

    Hi,
    Try to compile like this:
    javac yourfile.java
    Hope this helps you.
    Cheers.....Dinesh

  • Can I redistribute TFS SDK dlls?

    I want to set up an application on a machine that does not have Visual Studio installed since it is a server.  Tthere is a service that runs periodically on that machine that I would like to have updated configuration files pulled from
    our  developer TFS source control.  I  want to write a simple exe that uses the TFS SDK 2010 and I need to know If I can distrute the files it depends on (Microsoft.TeamFoundation.VersionControl.*.dll)

    Hi Pete,
    Thanks for your post.
    And thank you for sharing your experience here. It will be very beneficial for other community members having the similar questions.
    All your participation and support are very important to build such harmonious/ pleasant / learning environment for MSDN community.
    John Qiao [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

  • BO SDK java customization

    Hi experts,
    I am novice to BO SDK java. I want to learn the Java SDK for some customization.
    Please guide me where we can get the sdk jar files and which IDE can be used to modify the jars and .also how it can be used to deploy the changed jar files again to BO server.
    any help will be highly appreciated...
    thanks in advance
    Regards
    Narendra

    At the top of this forum you will see a stickied post titled : [Read Before Posting - Where to find Business Objects Java SDK Resources|Read Before Posting - Where to find Business Objects Java SDK Resources;
    Did you read it before posting?
    The documenation and such is all listed in that post along with samples.

  • Reading contents of uploaded excel file in web dynpro java

    Hi All.
    I am aware how to provide facility to upload files in web dynpro java. But my requirement is that on uploading a particular file (for eg. an excel file having 10 columns), I need to read the contents of that file and store it in a table in R/3.Can anyone suggest a way how I can read the contents of the uploaded file?
    Thanks and Regards,
    Saurabh.

    Hi.
    I am having the following requirement : I have a FileUpload UI element where user clicks Browse button, selects a file from the local system and presses a Upload button. Upon pressing Upload, the name of the selected file and the contents of the file should be shown.
    In the View context, I have two value attributes: FileName of type String and FileResource of type binary.
    This is the code that I have in the Upload button action handler :
      public void onActionUpload(com.sap.tc.webdynpro.progmodel.api.IWDCustomEvent wdEvent )
        //@@begin onActionUpload(ServerEvent)
        IWDAttributeInfo attributeInfo = wdContext.getNodeInfo().getAttribute(
                 IPrivateReadExcelView.IContextElement.FILE_RESOURCE);
        IWDModifiableBinaryType binaryType = (IWDModifiableBinaryType)attributeInfo.
                 getModifiableSimpleType();
        IPrivateReadExcelView.IContextElement element = wdContext.createContextElement();
        String fname = binaryType.getFileName();
        wdComponentAPI.getMessageManager().reportSuccess("File selected - "+fname);  //Statement 1
         try {
              wdComponentAPI.getMessageManager().reportSuccess("Successful");    // Statement 2
              InputStream in = new FileInputStream(fname);
              HSSFWorkbook wb = new HSSFWorkbook(in);
              wdComponentAPI.getMessageManager().reportSuccess("Successful");    //Statement 3
              int sheetsNo = wb.getNumberOfSheets();
              for (int i=0;i<sheetsNo;i++) {
                   HSSFSheet sheet = wb.getSheetAt(i);
                   Iterator rowsNo = sheet.rowIterator();
                   while(rowsNo.hasNext()) {
                        HSSFRow rows = (HSSFRow)rowsNo.next();
                        Iterator colsNo = rows.cellIterator();
                        while(colsNo.hasNext()) {
                             HSSFCell cell = (HSSFCell)colsNo.next();
                             wdComponentAPI.getMessageManager().reportSuccess("File uploaded" +
                                  "successfully");
                             if(cell.getCellType()==1) {
                                  wdComponentAPI.getMessageManager().reportSuccess("00000"+
                                       cell.getStringCellValue());
                             else if(cell.getCellType()==0) {
                                  String str=""+cell.getNumericCellValue();
                                  wdComponentAPI.getMessageManager().reportSuccess("11111"+str);
         catch(Exception e) { wdComponentAPI.getMessageManager().raisePendingException();
        //@@end
    On pressing Upload button, name of selected file is being shown(Statement 1). I am also getting Statement 2 in the output. However I am not getting Statement 3 onwards.
    Where am I going wrong? Can anyone shed some light on this?

  • .class file location of a java concurrent program

    Hi frnds,
    I need to know the .class file location of a java concurrent prog. I know the filename from concurrent program executables and my concurrent program filepath is oracle.apps.xxogl.f04.cp.file. But I dont know where the exact location of the file is. pls help me.
    I searched for the same and found the following article in many places which doesnt seem to help me much.
    http://geektalkin.blogspot.com/2008/03/oracle-apps-java-concurrent-program.html
    pls help. thanks in advance.
    Lisan

    Hi Lisan,
    Which version are you using? Folder strucure differs for 11i and R12 versions.
    All the class files will be placed under the JAVA_TOP folder. From there you have to follow your package structure. Here it is oracle/apps/xxogl/f04/cp/file
    HTH,
    Syed.

  • Open a PDF file in linux using java

    Hi..
    How can I open a PDF file in linux using java.
    I am able to open PDF in windows and mac using this code
    in Windows
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);
    in mac
    Runtime.getRuntime().exec("open " + path_of_PDF);
    But nothing is working with linux.
    Please help
    Thanks

    One thread is enough:
    http://forum.java.sun.com/thread.jspa?threadID=5267458

  • Open PDF file in linux using java

    Hi..
    How can I open a PDF file in linux using java.
    I am able to open PDF in windows and mac using this code
    in Windows
    Runtime.getRuntime().exec("rundll32 url.dll,FileProtocolHandler " + path_of_PDF);
    in mac
    Runtime.getRuntime().exec("open " + path_of_PDF);
    But nothing is working with linux.
    Please help
    Thanks

    appi wrote:
    Hi.. I found the JDIC binary files. There are different binaries for all the plateform. Is there any solution which is independent of plateform.Yes, and we already told you: Use JDK6, which has those libraries built into the standard class library.
    How can I use these binaries in my existing project. does it work, If I place them at same place where other .class files are kept.Read the documentation of the JDIC project. I'm sure they answer this question in their FAQ.

  • Problem in Uploading excel file using WebDynpro for Java

    Hi  All
    I have followed for Uploading excel file using WebDynpro for Java added by  Tulasi Palnati
    I done all, but I'm getting 500 Exception please contact u r system admin meag  at run time also  Jxl/Workbook class not found msag  but i downloaded Jxl.jar file and  there is no error signals  in coding part. How can I solve the Problem.
    Thanks
    Polaka

    Please ask the people in the Web Dynpro Java forum for a solution.

  • Reading/Writing .xlsx files using Webdynpro for Java

    Dear All
    I have a requirement to read/write excel files in .xlsx format. I am good in doing it with .xls format using jxl.jar. The jxl.jar doesn't support .xlsx format. Kindly help me in understanding how do I need to proceed on reading/writing .xlsx files using Webdynpro for Java.
    Thanks and Regards
    Ramamoorthy D

    i am using jdk 1.6.22 and IBM WebSphere
    when i use poi-3.6-20091214.jar and poi-ooxml-3.6-20091214.jar  to read .xlsx file. but i am getting following errors
    The project was not built since its classpath is incomplete. Cannot find the class
    file for java.lang.Iterable. Fix the classpath then try rebuilding this project.
    This compilation unit indirectly references the missing type java.lang.Iterable
    (typically some required class file is referencing a type outside the classpath)
    how can i resolve it
    here is the code that i have used
    public class HomeAction extends DispatchAction {
         public ActionForward addpage(
                             ActionMapping mapping,
                             ActionForm form,
                             HttpServletRequest request,
                             HttpServletResponse response)
                             throws Exception {     
                             String name = "C:/Documents and Settings/bharath/Desktop/Book1.xlsx";
               FileInputStream fis = null;
               try {
                   Object workbook = null;
                    fis = new FileInputStream(name);
                    XSSFWorkbook wb = new XSSFWorkbook(fis);
                    XSSFSheet sheet = (XSSFSheet) wb.getSheetAt(0);
                    Iterator rows = sheet.rowIterator();
                    int number=sheet.getLastRowNum();
                    System.out.println(" number of rows"+ number);
                    while (rows.hasNext())
                        XSSFRow row = ((XSSFRow) rows.next());
                        Iterator cells = row.cellIterator();
                        while(cells.hasNext())
                    XSSFCell cell = (XSSFCell) cells.next();
                    String Value=cell.getStringCellValue();
                    System.out.println(Value);
               } catch (IOException e) {
                    e.printStackTrace();
               } finally {
                    if (fis != null) {
                         fis.close();
                return mapping.findForward("returnjsp");

  • How to get current file position information in JAVA ?

    Hello,
    I would like to know if someone knows how to get and set current file position information in JAVA ?
    In C I use fgetpos and fsetpos.
    Thanks

    Instead of using a standard java.io.File, use java.io.RandomAccessFile
    This is a great class - you can get the file pointer (getFilePointer()), and set it (seek(long pos) )
    that will do all you need I presume - works the same a file handle in C.
    james

  • How can i build RPMs file for my own Java Application?

    How can i build RPMs file for my own Java Application?....I have my own directory that contains all Java Source files and some files that my Application required....I want to build RPMs file like a install File to Linux System, Now my OS is Linux Fedora core 1.....How can i do this?

    I think that in order to create a RPM, you'd need to
    use some C.Nope - the RPM is all about packaging and the "magic" x.spec file. You can have anything you want in the RPM, but you have to use RPM tools to build the .rpm file. One of the features is that you can also indicate (via "install" scripts) modifications to other files or the filesystem to support the installation of whatever's in the RPM.

  • XML Schemas & XML SCHEMA COLLECTIONS: XSD.exe & the tool in C:\Program Files (x86)\Microsoft SDKs\Windows\v7..0A\Bin\x64?.

    Hi all,
    I just read Pages 346-348 of the book "Microsoft SQL Server 2012 Bible" written by A. Jorgensen, P. LeBlanc, J. Chinchilla, J. Segarra & A. Nelson (published by Wiley) regarding XML Schemas and XML SCHEMA COLLECTIONS: Step 1.  create and
    save orderxml.xml
    <Order OrderID="1">
    <Item>
    <ItemNumber>V001</ItemNumber>
    <Quantity>1</Quantity>
    <Price>299.99</Price>
    </Item>
    </Order>
    Step 2.  using the tool in the following location:
    C:\Program Files (x86)\Microsoft SDKs\Windows\v7.0A\Bin\x64
    Open a command prompt, and navigate the preceding directory. The syntax for creating schema is: Xsd.exe C:\temp\orderxml.xml /outputdirectory:c:\temp  to create the orderxml.xsd file.  
    Step 3. Copy all the contents of the orderxml.xsd file to the clipboard, and create a new query window in SQL Server Management Studio, pasting in the content of the clipboard. To create the XML Schema Collection, you need to add the CREATE XML SCHEMA COLLECTION
    statement to the beginning of the schema as shown below:
    --MSss2012bibleP348.sql for XML Schema Collection OrderInformationSchemaCollection
    -- Copied and executed by SHC (Date & Time): 24 April 2015 8:05 AM
    USE ScottChangDB
    GO
    Create XML SCHEMA COLLECTION OrderInformationCollection AS
    N'<?xml version="1.0" encoding="utf-16"?>
    <xs:schema id="NewDataSet" xmlns="" xmlns:xs="http://www.w3.org/2001/XMLSchema"
    xmlns:msdata="urn:schema-microsoft-com:xml-msdata">
    <xs:element name="Order">
    <xs:sequence>
    <xs:element name="Item" minOccurs="0" maxOccurs="unbounded".
    <xs:complexType>
    <xs:sequence>
    <xs:element name="ItemNumber" type="xs:string" minOccurs="0" />
    <xs:element name="Quantity" type="xs:string" minOccurs="0" />
    <xs:element name="price" type="xs:string" minOccurs="0" />
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    <xs:attribute name="OrderID" type="xs:string" />
    </xs:complexType>
    </xs:element>
    <xs:element name="NewDataSet" msdata" msdata:IsDataSet="true"
    msdata:UseCurrentLocale="true">
    <xs:complexType>
    <xs:choice minOccurs="0" maxOccurs="unbounded'>
    <xs:element ref="Order" />
    </xs:choice>
    </xs:complexType>
    </xs:element>
    </xs:schema>' ;
    /* Apply it to the table/columns */
    ALTER TABLE ItemInfo
    ALTER COLUMN ItemData xml (OrderInformationCollection)
    GO
    I prepared (i) the orderxml.xml file for Step 1 and Step 2, and (ii) the MSss2012bibleP348.sql file for Step 3. But I am not sure that I can do the Steps (i) and (ii) in my PC that does not have the regular version of Microsoft SQL Server 2012 and Microsoft
    Visual Studio 2012. Furthermore, I  have difficulties to do Step 2 and Step 3 in my PC that is the part of Windows 7 Lan Computer System in my office: I navigated to my C:\Program Files (x86)\Microsoft SDKs\v7.0A\Bin\, I did not see the x64
    thing in the  Bin folder, but, I saw the xsd.exe in the Bin folder. If I click the xsd.exe and I get the following in the bottom of the PC screen:   
    xsd.exe Date modified:12/122011 12:55 PM    Date created:  12/12/2011  12:55 PM
    Applicaion    Size:81.8 KB
    Also, I see my PC screen flashes (and it looks like a dialog box with black background to flash for me to type the command) quickly. I am lost completely in this step and I don't understand the whole thing in doing Step 1, Step 2, and Step 3
    I briefly summarized/described/presented above.
    I need the following help from the experts of XML Schemas and XML Schema Collections in Microsoft SQL Server 2012 Management Studio:
    Help #1: I don't understan the concept of Step 1, Step2 and Step 3 to do XML Schema, XSD.exe, and XML Schema Collection in the SQL Server 2012!!?? I just have the SQL Server 2012 Management Studio (SSMS2012) in my PC.
    Help #2: How can I execute the xsd.exe in my C:\Program Files  (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ folder?
    Help #3: I just learned the basic things of creating XML SCHEMA COLLECTIONS in my SSMS2012 directly. Is the MSss2012P348.sql (I created and presented above) right for the task? How can I use clipboard to create the XML Schema Collection in my ScottChangDB
    database?
    Please kindly help and give me the answers/comments for Help #1, Help #2 and Help #3.
    Thanks in advance,
    Scott Chang  

    Hi Scott,
    Help #1: I don't understan the concept of Step 1, Step2 and Step 3 to do XML Schema, XSD.exe, and XML Schema Collection in the SQL Server 2012!!?? I just have the SQL Server 2012 Management Studio (SSMS2012) in my PC.
    Step1 and Step2 not that related to SQL Server, you can get the XSD from a given XML with an online XSD generator.
    Google search: XSD generator
    Help #2: How can I execute the xsd.exe in my C:\Program Files  (x86)\Microsoft SDKs\Windows\v7.0A\Bin\ folder?
    Please see the link in the #1
    Help #3: I just learned the basic things of creating XML SCHEMA COLLECTIONS in my SSMS2012 directly. Is the MSss2012P348.sql (I created and presented above) right for the task? How can I use clipboard to create the XML Schema Collection in
    my ScottChangDB database?
    See the syntax and example in
    create XML schema collection
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • UTF-8 file encoding issues within Java?

    I'm working on an application that takes data from an IBM mainframe(z/OS), converts it from IBM-1047 encoding to UTF-8(via iconv utility) and binary FTP's it to a Unix box where we process the file with our Java app and return the processed file.
    Within our Java app on the Unix platform we stream the file into a byte array and then create a new String from the byte array specifying "UTF-8" as the encoding parameter.
    The problem is that Java appears to be taking certain 2 byte UTF-8 characters and converting them to a single char.
    E.g. I have a \uC3A6 char in the input file, I can view the bytes in the byte array that's read in, and it's still a \uC3A6, but as soon as I create the new String with UTF-8 encoding and view the bytes, those 2 bytes are now shown as a single byte(0xE6). The code I have that's looking for the char \uC3A6 then fails.
    Can anyone explain what's happening here?? Sorry for the long message.

    The encodings which convert the character (char)0xC3A6 to the 2-entry byte array {0xC3, 0xA6} (unsigned) are "UTF-16BE", "UnicodeBigUnmarked", and "UnicodeBig." These are essentially identical except for the use of byte-order mark. As was said above UTF-8 converts (char)0xC3A6 to the 3-entry byte array {0xEC, 0x8E, 0xA6} (unsigned).
    http://java.sun.com/j2se/1.4.1/docs/guide/intl/encoding.doc.html

Maybe you are looking for