How to create a directory or Folder  using java program?

Hi all,
Can any one know, how to create a directory(new folder) in java.
can any give me some idea, on creating a directory using java program dynamically.
thanx in advance

hi thanks for your answer,
sorry, actual i know this technique(its my fault i didnt mentioned it)
i am looking for some what different technique.
bye
ram

Similar Messages

  • How to extract .sit files(in MAC)  using java program

    Hi,
    please help me , i want to simple program for
    " how to extract .sit files(in MAC) using java program"
    that sit files same as zip files in windows..[                                                                                                                                                                                                                                                                                                                                   

    Thanks for reply...
    but i search in the google about this topic...there is no results will appear..
    the problem is "i have to run program in the MacOS like extract all the
    .sit(StuffIt) extension files. These sit files same as zip files in the windows... we have one tool called StuffIt Expander but it is 3rd party tool. but here requirement is i have to write my own program to extract all the files same as zip file program...
    please do the needful..i am waiting for ur reply,,,

  • 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.

  • How to create  and hide a drive using java?

    I want to ask how to create a temporary drive/ or a drive by allocating some space of existing drives(eg allocating some space of C: Drive such as 5mb for storing files on the new drive that has been created) and then i want to hide that drive .So Please can anyone Explain me how to do that.

    Iam saying to all of you iam not blaming to anyone even java. And my harddisk is not currepted or damage by using that. My harddisk is working properly. But i don't know why all of you think that i am blamming to someone but iam asking some question which need to be answered.
    I am clearing all of you i am a student and iam creating an project in java for that i need this. I also want to add File/Folder lock on that project. This technique i have seen in folder lock 6 software that they use hidden drive to store files. Thats why iam asking that how to apply this technique using java.
    And plz plz read this carefully and answer me to solve my problem.

  • How to create hyperlink in Html page using Java

    Hello every one
    I want to know that how can I create a hyperlink in Html page using java ?
    Let for example
    I have code like this and i want to give hyperlink to it using java.
    rember that i am creating node using this id="name" which give me multiple value. and i want to assign diff link to each name..?
    <tr>
    <td ><span id="name"></span>
    </tr>

    but i m using this code to create node in html file
    HTMLLIElement li = (HTMLLIElement)appHTML.createElement("LI");
    Text txt = appHTML.createTextNode(name);
    li.appendChild(txt);
    appHTML.getElementById("name").appendChild(li);
    this will display all name value which is coming from database,
    and i want to assign a hyperlink to it,
    I have id with name also so I thought that using id i will
    create javascript like
    function popup(id)
         if(id==1)
              var n1 = window.open("../list/name1.html");
         if(id==2)
              var n1 = window.open("../list/name2.html");
    this way i want to popup particular file if i can pass id value in this function
    so want hyperlink like
    name

  • How to Create Linux-Cron Job  from a Java Program

    Hello,
    Can anybody help me to CREATE/EDIT/DELETE Linux Cron job from Java Program. Its Very Urgent.Thanks in advance..
    from
    Chakri

    I decided this didn't sound too tough so I played around with it a little. Basically because I'd never tried executing external processes out of java before, so I wanted to see how it was done.
    Just change whatever you like in the jobs ArrayList and call writeJobs.
    If you call writeJobs without putting anything in the list first you'll wipe out all of your crontab entries.
    import java.lang.*;
    import java.io.*;
    import java.util.*;
    public class cron {
        ArrayList jobs;
        Runtime rt;
        cron() {
         rt = Runtime.getRuntime();
         jobs = new ArrayList();
        void readCron() {
         String[] list = { "crontab", "-l" };
         jobs = new ArrayList();
         try {
             // Stick a job into crontab
             Process child = rt.exec(list);
             BufferedReader cronout = new BufferedReader(new InputStreamReader(child.getInputStream()));
             String cronjob = cronout.readLine();
             while (cronjob != null) {
              jobs.add(cronjob);
              cronjob = cronout.readLine();
             child.waitFor();
         catch(IOException e) {
             System.err.println("IOException starting process!");
         catch(InterruptedException e) {
             System.err.println("Interrupted waiting for process!");
        void listJobs() {
         Iterator iter = jobs.iterator();
         while (iter.hasNext()) {
             System.out.println((String)iter.next());
        void writeJobs() {
         String[] edit = { "crontab"};
         try {
             // Stick a job into crontab
             Process child = rt.exec(edit);
             PrintWriter cronIn = new PrintWriter(child.getOutputStream());
             Iterator iter = jobs.iterator();
             while (iter.hasNext()) {
              cronIn.println((String)iter.next());
             cronIn.close();
             child.waitFor();
         catch(IOException e) {
             System.err.println("IOException starting process!");
         catch(InterruptedException e) {
             System.err.println("Interrupted waiting for process!");
        void doStuff() {
         readCron();
         listJobs();
         jobs.add("* * * * 4 cronjob");
         writeJobs();
         readCron();
         listJobs();
        public static void main(String[] args) {
         cron c = new cron();
         c.doStuff();
    }

  • How do you query Oracle RDF database using Java program?

    Does anyone know how to get data out of the oracle RDF database using Java?
    I'm running the following java code and it returns basically null values. My guess is that the get_triple() function returns a dataset other than resultset. I've tried searching the Oracle web site. Am I supposed to be using CLOB object? Any help would be appreciated. Thanks
    sql = "SELECT a.triple.GET_TRIPLE() AS triple FROM family_rdf_data a";
    ResultSet rs = stmt.executeQuery( sql ) ;
    while ( rs.next() )
    System.out.println( rs.getString(1) ) ;
    rs.close() ;

    get_triple() returns an object, and the code would be different from the code of retrieving a string. Some sample code for retrieving objects is at http://www.oracle.com/technology/sample_code/tech/java/sqlj_jdbc/files/advanced/advanced.html
    get_subject(), get_property() return strings so the code below should work. get_object() returns a CLOB so different handling would be required and there is some sample code at the link above.
    Melli

  • How to create a subreport link programmaticly using java RAS sdk

    Hi,
    I want to create subreport link for couple of main report parameters programmaticly using RAS sdk.
    Main report has Param1 and Param2. I need to link these parameters to sub-report which doesn't have any parameters, so I can pass the parameters value just once when running the report and consume it's value in the sub-report.
    Below is the code I tried but I get "Invalid field name"error when I try to save the main report.
    ISubreportClientDocument subReportDoc = subReportCntrl
                      .getSubreport(subReports.getString(i));
    SubreportLinks srLinks = subReportCntrl.getSubreportLinks(subReports.getString(i));
    SubreportLink subRptLink1 = new SubreportLink();
    Fields paramFields = reportClientDoc.getDataDefinition().getParameterFields();
    subRptLink1.setMainReportFieldName(paramFields.get(0).toString());
    subRptLink1.setSubreportFieldName(paramFields.get(0).toString());
    SubreportLink subRptLink2 = new SubreportLink();
    subRptLink2.setMainReportFieldName(paramFields.get(1).toString());
    subRptLink2.setSubreportFieldName(paramFields.get(1).toString());
    srLinks.add(subRptLink1);
    srLinks.add(subRptLink2);
    subReportCntrl.setSubreportLinks(subReports.getString(i), srLinks);
    Thanks,

    Hi,
    I want to create subreport link for couple of main report parameters programmaticly using RAS sdk.
    Main report has Param1 and Param2. I need to link these parameters to sub-report which doesn't have any parameters, so I can pass the parameters value just once when running the report and consume it's value in the sub-report.
    Below is the code I tried but I get "Invalid field name"error when I try to save the main report.
    ISubreportClientDocument subReportDoc = subReportCntrl
                      .getSubreport(subReports.getString(i));
    SubreportLinks srLinks = subReportCntrl.getSubreportLinks(subReports.getString(i));
    SubreportLink subRptLink1 = new SubreportLink();
    Fields paramFields = reportClientDoc.getDataDefinition().getParameterFields();
    subRptLink1.setMainReportFieldName(paramFields.get(0).toString());
    subRptLink1.setSubreportFieldName(paramFields.get(0).toString());
    SubreportLink subRptLink2 = new SubreportLink();
    subRptLink2.setMainReportFieldName(paramFields.get(1).toString());
    subRptLink2.setSubreportFieldName(paramFields.get(1).toString());
    srLinks.add(subRptLink1);
    srLinks.add(subRptLink2);
    subReportCntrl.setSubreportLinks(subReports.getString(i), srLinks);
    Thanks,

  • How to create a semi circuler slider using java swing or awt

    I am trying to create a Jslider like thing but in semicirculer shape. Thanks in advance for providing any help.

    Is it possible to create such UI in java swing?Just to further illustrate, Swing only provides the raw foundation you need to be able to build a GUI. With the stock components you can create static user interfaces with standard controls. If you want to go further, you need to either find a component that somebody else already wrote, or you go into custom painting as previous posters suggested. To do an animating component for example, you would need all the frames as BufferedImage objects and you would combine custom painting with a Swing timer to update the displayed frame at a specified framerate.
    if you search for "java swing animation" using google, I'm sure you can find the examples you need. And here is the trail about swing timers:
    http://java.sun.com/docs/books/tutorial/uiswing/misc/timer.html

  • How to create inbox and outbox folder in java mail

    i have to get mails to my inbox and the sending mails in outbox folder. what i have to do. i need clear information regarding this with examples.

    You can start by asking in the JavaMail forum, where you're
    more likely to find somebody who can answer your question...

  • How to create a batch file for a java program?

    I have a java project in JCreator and the project is organised into packages. I have also configured JCreator to provide 2 arguments to the main method when the project is executed.
    I would want to create a batch file (.bat) for this project where the batch file can automatically use the arguments set in JCreator when the program runs.
    How do I go about creating the batch file?

    where the batch file can automatically use the arguments set in JCreatorThat all depends JCreator... can you get those arguments somehow?

  • Unable to locate existing  file from unix using java program

    Hi
    I have created a file in unix using java program, file.createNewFile();
    And when i try to search for the same file using file.exists() it is returning false. Paths are correct. Can anybody help me out.
    Thanks & Regards,
    Prasanth

    In Linux FC5 using JDK1.6, this code         File temp = new File(System.getProperty("user.home") + "/abcdefghijklmn");
            System.out.println(temp.createNewFile());prints 'true' and the file is created with length zero.

  • To get JRE or JDK version using Java Programs

    How do get JRE or JDK version using Java Programs?.
    Kindly Reply...
    By
    Mani

    If you're talking about current program's runtime environment (as opposed to all installed JDK/JRE) : System properties

  • How to create a Folder using java.

    Hi All,
    I have a doubt. I want to create a folder using java.
    Inputs are the destination where the folder should be created and the name of the folder. Plz help me in this regard.
    thanks and regards,
    Vincent .R.

    check out javadoc for java.io
    File reldir=new File("NewDir");//relatively where your program runs
    reldir.mkdir();
    File absdir=new File("C:/NewDir");//absolute path
    reldir.mkdir();
    File newdir=new File(absdir,"SubDir");//defines another dir under absdir
    newdir.mkdir();
    Gil

  • How to create /home directory in a diferent disk ?

    I installed Solaris 11-11-11 on a x4640 with 4 disks:
    How to create /home directory in a diferent disk ?
    Edited by: user1502 on Apr 25, 2012 1:51 PM

    I'm confused. It looks like you already have /home configured:
    <pre># zpool status
    pool: home
    state: ONLINE
    scan: none requested
    config:
    NAME STATE READ WRITE CKSUM
    home ONLINE 0 0 0
    c4t3d0 ONLINE 0 0 0
    errors: No known data errors
    # zfs list
    NAME USED AVAIL REFER MOUNTPOINT
    home 86K 134G 32K /home
    ...</pre>
    What is the problem? Looks like you already have /home configured. Are you sure automounter is not running?
    Try this:
    <pre>zfs set mountpoint=none home
    rm -rf /home
    zfs set mountpoint=/home home</pre>

Maybe you are looking for

  • TEXT ITEM from different table

    When a TEXT ITEM from different table exists in the DATA BLOCK, and when after EXECUTE_QUERY (in trigger POST_QUERY) we issue the SELECT for filling the TEXT ITEM from different table, how we can prevent FROM_STATUS and RECORD_STATUS to get the value

  • IDoc processing for same message type but diff extensions

    Hi I want to send idoc when a material is changed. Everything is in place and have also done a test scenario. In partner profile i had the message type linked to basic type and tested which is fine. Now i wanted to have one more idoc created for anot

  • Can Static Methods be overridden ?

    My question is can static methods be overridden ? I found this thread [Can Static Method be overridden ?|http://forums.sun.com/thread.jspa?threadID=644752&start=0&tstart=0] .Since it was too old,i have created this new thread. According to that threa

  • Disable Transfer Order Automatically/Immediately

    Dear All, May i know how to disable the TO automatically/immediately in Lean Warehouse. This is because, when i save the Outbound Delivery in VL01N, it will automatically generate the TO. Can i disable this function and create the TO manually? Thank

  • Problems with inbound aleaud

    Hi everybody, I have an Orders Idoc in two logical systems as Outbound Idoc. Only in one of them I need an Inboud Aleaud Idoc as ACK. You can customize the inbound aleaud idocs in program IDX_NOALE that fills the table IDXNOALE. You can choose de typ