Java API getting unix file ownership(name, group..etc)

I am looking for any standard or 3rd-paty Java API that retrieves unix file ownership (name, group..etc)
Thanks.

I don't like your chances of finding a standard library to pull Unix group and user ownership. That would be violating the whole theory of Java being OS agnostic. I'm also unaware of any 3rd party library that does this.
That said, you can definitely do this. One way I can think of is making a Runtime call:
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Runtime.html
You could use this to do an ls -l on a file and parse the result.
This would of course be violating standard practice in J2EE when any access direct to the file-system is regarded as being a pretty bad idea. It would also make remove the write-once run-anywhere aspect to your code, though that may not concern you too much.
cheers,
Trevor Nielsen
londonmiddleware.org

Similar Messages

  • Call a Java API using Unix Script

    Hi SDNers,
    I want to call a Java API using Unix Script. Please suggest what will be the commands in Unix.
    Please help!!
    Thanks,
    Priti
    Edited by: Priti Rani Patnaik on Jul 7, 2010 4:17 PM

    Hi
    Try this
    String[] cmd = {"/bin/sh", "-c", "ls > hello"};
      Runtime.getRuntime().exec(cmd);
    [Other Help|/thread/5425832 [original link is broken];
    BR
    Satish Kumar

  • Lync Server 2013 : Export-CsArchivingData Can i get the files or name of files transferred between 2 users

    I am using LyncServer 2013 And my Question is :-
    Export-CsArchivingData -
    By using this Command-let Can i get  the files or name of files transferred between 2 users 
    Whether it is stored in "LcsLog" database ?
    If not weather Lync server saves the files (which users are sending to another users ) anywhere on file system, or not ?

    Doug Deitterick has a great blog posting that should answer your question: http://blogs.technet.com/b/dodeitte/archive/2013/04/24/archiving-options-in-lync-server-2013.aspx
    The actual File is not archived in Lync, but the file name is and will be have either _p2P or _conf at the end of the name to indicate how it was transferred.
    Please mark posts as answers/helpful if it answers your question.
    Blog
    Lync Validator - Used to assist in the validation and documentation of Lync Server 2013.

  • When copying one of my old cassettes to a CD how do I get the data - album name, artist, etc. to show up when the CD is inserted into a player?

    When copying one of my old cassettes to a CD how do I get the data - album name, artist, etc. to show up when the CD is inserted into a player?

    To what format file are you saving from Audacity?  Although technically AIFF format can save data tags within the file itself I have not found this to always work with all applications.  Likely the information you enter into Audacity is just being saved in the file name.  When you add this file to iTunes, if iTunes cannot find tags it recognizes it will simply add the track with the file name as the track name.  You need to add the tracks to iTunes, then enter the information using File > Get Info for a track or series of tracks,
    Some of the above information may vary slightly depending upon the file format being used.
    It helps when asking questions here to provide as much information at the onset as possible.  We didn't know until this stage that all these menus were in fact part of Audacity and not iTunes.

  • Can i generate java API from class files

    I have only class files. Is it possible to generate the java API using the javadoc.If yes, pls tell me how can i do??

    Also, Javadoc 1.4.2 will contain an unsupported option -Xclasses
    that should allow you to do this. You must pass in class names
    and use -classpath to find them. For com.package.MyClass
    at /home/classes/com/package/MyClass.class,
    you would run:
    javadoc -Xclasses -classpath /home/classes com.package.MyClass
    For mroe info, see:
    http://developer.java.sun.com/developer/bugParade/bugs/4720100.html-
    Doug Kramer
    Javadoc team

  • Oracle BPM Java API - getting informations about process activities

    Hi
    I have a problem with Oracle BPM Java API, can someone help me?
    I have a business process project deployed in Oracle SOA Suite and I need to get some informations of my process programatically via Java API.
    Basically I need to get informations about process activities and the corresponding human tasks referenced by these activities.
    I'm able to get the HumanTasks of my Business Catalog and also to get the Activities of my Process, but the relationship between them is null.
    I did some tests, below a piece of code of my test:
    IBPMServiceClient bpmServiceClient = BPMConnectionUtil.getBPMServiceClient();
    IProcessMetadataService processMetadataService = bpmServiceClient.getProcessMetadataService();
    IProcessModelService processModelService = bpmServiceClient.getProcessModelService();
    List<ProcessMetadataSummary> processMetadataSummaryList =
    processMetadataService.listProcessMetadataSummary(BPMConnectionUtil.getBPMContext(), "processNameOrId to find", "processName", "ASC");
    if (processMetadataSummaryList == null || processMetadataSummaryList.size() == 0)
    return;
    ProcessMetadataSummary processMetadataSummary = null;
    for (ProcessMetadataSummary summary: processMetadataSummaryList) {
    if (summary.isIsDefaultRevision()) {
    processMetadataSummary = summary;
    break;
    if (processMetadataSummary == null)
    processMetadataSummary = processMetadataSummaryList.get(0);
    IProcessModelPackage pack = processModelService.getProcessModel(BPMConnectionUtil.getBPMContext(), processMetadataSummary.getCompositeDN(), processMetadataSummary.getProcessName());
    oracle.bpm.project.model.processes.Process process = pack.getProcessModel();
    Sequence<UserTask> activities = process.getActivities(UserTask.class);
    for (UserTask activity: activities) {
    System.out.println("Human Task: " +activity.getHumanTask()); // <<<<<<<<<<<<<<<<<<<<---------------------------- here is the problem. the human task is null, but my activity have a task associated
    There is another way to get this information?
    Thank's

    Hi
    I have a problem with Oracle BPM Java API, can someone help me?
    I have a business process project deployed in Oracle SOA Suite and I need to get some informations of my process programatically via Java API.
    Basically I need to get informations about process activities and the corresponding human tasks referenced by these activities.
    I'm able to get the HumanTasks of my Business Catalog and also to get the Activities of my Process, but the relationship between them is null.
    I did some tests, below a piece of code of my test:
    IBPMServiceClient bpmServiceClient = BPMConnectionUtil.getBPMServiceClient();
    IProcessMetadataService processMetadataService = bpmServiceClient.getProcessMetadataService();
    IProcessModelService processModelService = bpmServiceClient.getProcessModelService();
    List<ProcessMetadataSummary> processMetadataSummaryList =
    processMetadataService.listProcessMetadataSummary(BPMConnectionUtil.getBPMContext(), "processNameOrId to find", "processName", "ASC");
    if (processMetadataSummaryList == null || processMetadataSummaryList.size() == 0)
    return;
    ProcessMetadataSummary processMetadataSummary = null;
    for (ProcessMetadataSummary summary: processMetadataSummaryList) {
    if (summary.isIsDefaultRevision()) {
    processMetadataSummary = summary;
    break;
    if (processMetadataSummary == null)
    processMetadataSummary = processMetadataSummaryList.get(0);
    IProcessModelPackage pack = processModelService.getProcessModel(BPMConnectionUtil.getBPMContext(), processMetadataSummary.getCompositeDN(), processMetadataSummary.getProcessName());
    oracle.bpm.project.model.processes.Process process = pack.getProcessModel();
    Sequence<UserTask> activities = process.getActivities(UserTask.class);
    for (UserTask activity: activities) {
    System.out.println("Human Task: " +activity.getHumanTask()); // <<<<<<<<<<<<<<<<<<<<---------------------------- here is the problem. the human task is null, but my activity have a task associated
    There is another way to get this information?
    Thank's

  • Java API for SCA File reading

    Hi all,
    I would like to read the content of SCA files with a java api.
    Is there a way to do so?
    Thanks
    Thomas

    FYI - got a response from official SUN support that Sun PKCS#11 is the only available JCA provider for SCA-6000 board.

  • How does Java API handles binary files

    I couldn't find some documentation which describes how to extend the Java API for handling binary files. (I want to upload, check in/out (and delete) such files from within a Java application.) Does anybody know where I can find an example or some related documentation?
    TIA, Olaf

    The methods on ContentObjectDefinition
    allow you to create binary or ascii document content.

  • Why won't my PHOTOS appear when move from OS( to OSX? Get Unix files!

    This is the problem with keeping photos electronically. I copied a number of jpeg photos from my G4 OS 9.2 to my G4 Dual OSX via SanDisk and they all appear in the desktop as Unix files! Are they worthless?

    Hi Studedot,
    no, they are not useless. First try to double-click one. Does it open? Does it open in the correct program?
    Click any photo and type Apple-i to get the information window. In the lowest third of the window you can see a pop-up menu called "Open with". Select the desired application and finally click "Apply to all".
    From now on the icon should be o.k. and they should open with the assigned application.
    If this answered your question please consider granting some stars: Why reward points?

  • Get renamed file new name

    Hello all. What I'm wanting to do is rename a file and then do some things with the new file name.
    1. I want to view the new file name with the full path
    2. I want to output the new file name with the full path to a text file or csv file
    Here is what I have for outputting the renamed file into a text file, but it isn't working:
    cls
    $resultsfile = "C:\results3.txt"
    clear-content $resultsfile
    foreach($item in gc C:\RENAME.txt){
    Rename-Item $item "1.txt" | out-file $resultsfile -append
    notepad $resultsfile
    Any thoughts on how to work with the newly renamed file name?

    Yes, sorry I forgot to mention that I'm trying to delete a bunch of files whose names are too long. So what I 'm trying to do is to rename the files first with "1.txt" and then I'm going to delete them. I just had a "forehead-slap" moment where I realized
    I could just pipe the "rename-item" into "remove-item" and that should accomplish my goals.
    But, as for my original question, if I rename a file, how can i view/use the renamed file name? Like if I renamed a file, how could I output the newly renamed file name to a text file? I tried this in my original code above, but it didn't work. Let's just
    assume that I have a single file that I want to rename to "1.txt"

  • Need Java api for .class file comparison....

    Hi all,
    In .net one CecilAssemblyAnalyzer api is der it analyze the two version of .net applic in offline mode (pick .exe and .dll files)
    n forms tree structure and den copares both tree n get the changed function..
    i need same type api in Java...
    Thanks in advance..
    Regards,
    Sachith

    <blockquote>quote:<br><hr><i>Originally posted by: <b>sunny_rush</b></i><BR>com_beacon_essbase_jni_EssApiJni.c:15:20: essotl.h: No such file or directory<BR><hr></blockquote><BR><BR>That package does not appear to be from Hyperion but rather from a third party. Based on the name, it may have come from Beacon Analytics which is now part of Answerthink. Did you have consulting from them in the past?<BR><BR>Tim<BR><BR><BR>

  • While creating Projects Using the API, get two errors: 'Customer name must be passed' and 'class category is invalid'

    Hi
    While trying to Create Projects using the API, I'm getting two types of errors -
    The first is : 'API failed in one stage 1 Customer Name is a mandatory Quick Entry field. Value must be passed'
    The second is : '
    'API failed in one stage 1 Project: '<Project_Number>'
    The class category is invalid.'
    Both the messages are produced by our custom program. .. however I am not able to understand why the underlying errors occur.
    The first error ( Customer Name is a mandatory quick entry field), is caused by Projects that are to be created from Project templates where it is configured with Quick Entry Customer Name required. We are passing Customer Site number ( Party Bill to site number and Party Ship to side number). The site numbers being passed are also set as 'Primary'. Yet they are failing.
    For the second Error ( The Class Category is invalid), I rechecked multiple times, the Class categories for the Projects I am trying to create, with the Config in R12 and they are fine. Can't understand the reason for these two issues. Has anyone encountered such an issue ? If so how was it resolved?
    Regards
    Vivek

    HI All
    I resolved both the issues. In case there are others facing similar issues, following was the cause and resolution of my errors
    1. Error 1: Customer Name is a Mandatory Quick Entry field. Value must be passed.
    The cause was that the data loaded into our custom staging table was not in the right fields. This was because the data file values and the CTL were not in sync.
    Resolution:
    Corrected the data file to be in Sync with the structure defined in the CTL and  this loaded it successfully
    2. Error 2: The class category is invalid.
    The cause of this error was that  in the  Projects Template (used to create the project from), the Quick Entry setup had a Class Category set as required and I was not passing a value ( a class code value) for that Class Category.
    Hope this helps somebody else
    Cheers
    Turnbill

  • Get Info file ownership

    I have noticed that when I send a file to another computer get Info lists the Read & Write priveleges as belonging to a name I do not recognise. Is this normal? Should it not give my name?

    The ownership is based on User ID, not the name. So, if your UID matches another user's UID on the other Mac, it will show up as that.

  • Reccomendations for java API -- reading pdf files?

    Hi,
    I need to write an application that will extract how many pages a particular pdf file has, and some other information about it -- size, date created and so on, but the number of pages is the most important.
    I googled and came across iText, PDF Box and a few others, and I was wondering if anyone else had used those api's for the purpose I described.
    I searched the forums, but the replies I found had to do with writing pdf's.
    thanks!
    bp

    Actually, in case anyone else runs across this, this seemed to work from PDF Box:
                   PDDocument pd = PDDocument.load(new File("pdfFiles/test.pdf"));
                   System.out.println("pd info: " + pd.getNumberOfPages());

  • How to access iPhone "Photo Library" to get image file properties?

    I want to access iPhone "Photo Library" to get image file properties(name, list etc..) without dialog.
    Is there any suitable method/class to this?

    Allan,
    Thank you for your reply!
    My purpose is access to "Photo Library" by iPhone API.
    Because, I know several iPhone application which has own image list and the list is synced to "Photo Library".
    If I take photo by iPhone native camera, the taken photo is listed up on the image list so I guess those applications can access to "Photo Library" directly.
    Or.. any other solution..?
    Gazza

Maybe you are looking for

  • How to insert a dynamic image in a report

    Hi, I want to insert the image of a student in a report toghether with all other student's data. The image's file name is in a field of the students' table and the file is stored in a directory of the web application. I am using Visual studio 2010 an

  • My iMessage is not signing in after I used the migration assistant

    I used the migration assistant to transfer my stuff from my old mac, after I deleted my trash and tried logging on to iMessage. It won't log on and just keeps spinning the wheel. How do I get my mac to work?

  • Why Internet Service can be reached without SICF element?

    Hi Experts, I create a Z Internet service in SE80 without any SICF element points to it. But when testing in web, system can sitll find it and run well. How does it work? Why no SICF service but system can still find it? Many thanks.

  • Extension Manager CC error code U44M1P34 will not install product

    Received update notice and ran the updater for the Extension Manager CC it turned with an error of U44M1P34 and contact support. Which the automated system fails to offer help for the Extension Manager. Signing out of Creative Cloud and relauching fa

  • Modify toolbar for alv using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC'

    Hi Experts, I am using CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY_LVC' inside an exit. I need to modify the tolbar with just three options :- a-  add new row b- delete rows c- save data Please guide me step by step as how to proceed as I am very new to AL