Creating a folder in current workspace using java code

Hi Experts,
I need to create a folder and some file in the workspace of NWDS user. Can someone please suggest how can i find out the workspace of user using JAVA code.
IWorkspaceRoot is not working in NWDS.
Regards
Pranav

Hi Pranav,
Tell me if you want to create this folder at run time or in NWDS while developing application.
If you want to create it at the time of development just change your perspective to Java perspective and from there you can see the entire project structure and from there you can create desired files / folders.
Ninad

Similar Messages

  • How to create a table in the file using java code.?

    HI,
    I should export the data from the view objects to a word document. I have done that but I should
    display the data in the form of a table.
    Kindly come up with the necessary information on how to create a table in the file using java.
    Thanks,
    Phani

    Hi, Thank you for responding to my query.
    The below are the details of my code.
    DCBindingContainer dcBindings =
    (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    DCIteratorBinding StudentDetailsContent =
    (DCIteratorBinding)dcBindings.get("StudentView1Iterator");
    OutputStreamWriter w = new OutputStreamWriter(outputStream, "UTF-8");
    Row currentRow =
    StudentDetailsContent.getRowSetIterator().first();
    Object a[]= currentRow.getAttributeValues();
    int i;
    for(i=0 ;i<=a.length;i++){
    w.write(a.toString());
    w.write(" ");
    w.flush();
    I am usning this coding to achieve the task of exporting data to file.
    I need to display this information in the table that is where I need help from you people.
    Thanks,

  • Creating a folder on hyperion workspace using a sqr job

    Hi Gurus
    need some help, I have this code in the sqr to create a folder on hyperion 9.3.1 workspace. When i run this job and do a show on "#dirfile_status0". The value in it is 2 ,which mean it is saying that the folder doesnot exists, but i know the folder exists. this is run on a unix box.
    if $sqr-platform = 'UNIX'
    let $prefix = '/' || 'Temp' || '/' || 'Subfol'
    let $NewDir0 = $prefix                          
    let #dirfile_status0 = exists($NewDir0)
    let $createDir0 = 'mkdir -p ' || $NewDir0
    if #dirfile_status0 <> 0
    CALL SYSTEM USING $createDir0 #RETURN WAIT
    end-if
    end-if
    Thank you in advance
    Kumar

    Hi Pranav,
    Tell me if you want to create this folder at run time or in NWDS while developing application.
    If you want to create it at the time of development just change your perspective to Java perspective and from there you can see the entire project structure and from there you can create desired files / folders.
    Ninad

  • Display current day using java code

    I want java code to get current day for the month.Please help me

    anie wrote:
    Sorry,but i did't understand what you are trying to point?????Im trying to point out that there is loads of examples of this to be found on the web(And it can easy be found by using Google(<-- a searchengine)). And it seems to me that the topic starter rather wants someone else to do the searching, or provide example code, rather than doing it him/her self. (S)he is not the first person to want to do this with other words. Im rather sure about it.

  • [i] ??????? Highlight current record, using Java-code ???????[/

    Hi,
    I have a report for multiple update. This is a very wide report and I like to highlight or set a color for the actual record the user is changing.
    The user starts to set a select-flag to Yes on the row he wants to correct. How can I set the current row to highligth or set column color for all columns on current row when select_flag = 'Y'
    I prefer to do this without doing a submit. Can a javascript solve this? I'm not so good at java.
    Thankful for help!
    Regard
    Message was edited by:
    ew6018

    I know YOUR out there :o)
    So please help me with this one.
    I found a almost similar thread so I just need a java expert to help me with my java function (se the highlight_row() function below):
    In the below example they want to highligt current row when using a checkbox, the different for me is that I am using av select item with values 'Y' and 'N'
    select
    htmldb_item.checkbox(1,empno,'onClick="highlight_row(this,#ROWNUM#);"') chk,
    ename, job, sal, comm
    from emp
    The Javascript function highlight_row() is "stolen" from the page HTML DB generates when it puts the builtin row selector. Put the function in the region header. The function is
    <script type="text/javascript">function highlight_row(checkBoxElemement,currentRowNum) {    if(checkBoxElemement.checked==true) {        for( var j = 0; j < checkBoxElemement.parentNode.parentNode.childNodes.length; j++ ) {            if (checkBoxElemement.parentNode.parentNode.childNodes[j].tagName=='TD') {                if(rowActive=='Y') {                    rowStyle[currentRowNum] = rowStyleHover[currentRowNum]; } else {                    rowStyle[currentRowNum] = checkBoxElemement.parentNode.parentNode.childNodes[j].style.backgroundColor; } checkBoxElemement.parentNode.parentNode.childNodes[j].style.backgroundColor = '#ededd6'; } } rowStyleHover[currentRowNum] = '#ededd6'; } else {        for( var j = 0; j < checkBoxElemement.parentNode.parentNode.childNodes.length; j++ ) {            if (checkBoxElemement.parentNode.parentNode.childNodes[j].tagName=='TD') {                                      checkBoxElemement.parentNode.parentNode.childNodes[j].style.backgroundColor = rowStyle[currentRowNum]; rowStyleHover[currentRowNum] = rowStyle[currentRowNum]; document.wwv_flow.x02.checked=false; } } }}</script>

  • How to create and edit a .ini file using java

    Hi All...
    Pls help me in creating and editing an .ini file using java...
    thanks in advance
    Regards,
    sathya

    Let's assume the ini file is a mapping type storage (key=value) so lets use Properties object. (works with java 1.4 & up)
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.util.Properties;
    public class Test {
         private static Properties props;
         public static void main(String[] args) throws IOException {
              File file = new File("test.ini");//This is out ini file
              props = new Properties();//Create the properties object
              read(file);//Read the ini file
              //Once we've populated the Properties object. set/add a property using the setProperty() method.
              props.setProperty("testing", "value");
              write(file);//Write to ini file
         public static void read(File file) throws IOException {
              FileInputStream fis = new FileInputStream(file);//Create a FileInputStream
              props.load(fis);//load the ini to the Properties file
              fis.close();//close
         public static void write(File file) throws IOException {
              FileOutputStream fos = new FileOutputStream(file);//Create a FileOutputStream
              props.store(fos, "");//write the Properties object values to our ini file
              fos.close();//close
    }

  • How to create a mail user agent by using JAVA...

    my lecturer has asked me to create a mail user agent by using JAVA , i have no idea how to start this assignment......

    What part are you stuck on? Creating a GUI (look at the Swing tutorials), or writing the talk-to-mail-server bit? Look at Java Mail, or the email RFCs.

  • Open, Open Containing Folder in Windows Explorer Using java

    How to open a file using the default application using java code?
    Ex: - Open a JPG file using its default image viewer (Ex: Piscasa 3)..... (Not Inside the Java Application)
    Then how to open a file containing folder with that file selected?
    Couldn't find any sources in the internet, Not sure whether my search terms are correct....
    Please Help
    Thanks!!!

    Madushan.UoM wrote:
    Thanks Andrew...
    I've did opening the file using
    try {
    Desktop desktop = null;
    if (Desktop.isDesktopSupported()) {
    desktop = Desktop.getDesktop();
    desktop.open(new File(path));
    } catch (IOException ioe) {
    ioe.printStackTrace();
    }Also able to open the directory by setting the "path" variable into the directory path
    But how to highlight the needed file after the Explorer is opened???Also, to be completely safe, you'd want to call Desktop#open() only if isDesktopSupported() returns true, otherwise you'll get a NullPointerException.
    if (Desktop.isSupported()) {
       try {
          Desktop.getDesktop().open(new File(path));
       } catch (IOException ioe) {
          ioe.printStackTrace();
    }

  • How to dynamically configure JPA setting at runtime using java code?

    Hi,
    I am new to EJB 3.0 and JPA. I am trying to help my company to deploy the use of JPA in EJB3.0. Currently, i am trying out with OpenJPA in IBM Webshpere Application Server 7.0. We have four different WAS servers running for testing, system integration testing, user testing and production respectively, and in each region, the configurations for data source, JDBC username and password, schema, etc are different. So i think i would need to configure the JPA setting during runtime using Java code that determines which is the environment. And apparently i am stuck with the limited knowledge i have.
    1) I understand that i could override the JDBC in the persistence xml by creating entity manager using entity manager factory. But is it possible that i do similar thing by using inejction of persistence context on entity manager to obtain a container managed entity manager?
    2) Alternatively, it is possible to create multiple persistence unit in the XML and inject different PU to the entity manager, am i right? But how to inject dynamically since @PersistenceContext(unitName="xxx") only accepts constant declaration.
    3) Is it possible that the JDBC username and password are read from properties file?
    Thanks for your help in advance!

    Hi
    Thanks for the reply.
    Are you saying that i have to configure the data source authentication to the backend DB2 using the JAAS-J2C? Correct me if i am mistaken. I guess i am unable to do so as the application server setup only contains one data source, and the server hosted a number of applications. Every applications has their own JDBC username and password supply to the data source (the ID supplied at the DB2 side will decide which resource can access) and thus, i have to supply the username and password at runtime. Talked to the server guy and seems that it is not feasible to have seperate datasource for each applications as considered to the volume of applications hosted inside the server.
    Any suggestion?

  • Read an excel file using java code

    Hi,
    I want to create an excel file on the client machine based on the personal details entered on the web page. And I want to save the file on the client machine in the form of CSV. Then I want to read the contents of the spreadsheet using Java Code from the using servlets. Can I read the contents of the file directly from the client machine or do i need to save the file on the server and then read the contents of it. Please help me solve this.

    Hi,
    I want to create an excel file on the client machine
    based on the personal details entered on the web
    page. And I want to save the file on the client
    machine in the form of CSV. Then I want to read the
    contents of the spreadsheet using Java Code from the
    using servlets. Can I read the contents of the file
    directly from the client machine or do i need to save
    the file on the server and then read the contents of
    it. Please help me solve this.As stated I am rather certain that is impossible.
    Servers don't access the file systems of client machines.

  • How to Invoke bpel process which is deployed in weblogic using java code

    Hi
    I want to invoke a BPEL Process which is deployed in Weblogic server using Java code. Please provide me the code snnipet which will be used to connect and then invoke a BPEL Process.

    The simple way would be creating a java client to consume the SOAP webservice interface exposed by the bpel process.
    If you have Oracle Service Registry you can also use UDDI to discover the endpoint at runtime.
    But you can also use direct binding to do that.
    If you search on internet you will find many blog entries about this as well as many related posts here on OTN.
    I can't suggest a specific one, but looking on Google this one seems quite ok: Managing Oracle SOA Environment [10g/11g]: Invoking SOA11g Composite Using Direct Binding Invocation API

  • How can we get requester's user id using java code

    Hi,
    How can we get requester's user id using java code?
    eg: If i had logged in as xelsysadm and request a resource for user uid101 on the userid field it should display uid101 and not xelsysadm.
    also,
    I have a resoure "A" which on revoking should also revoke resources B and C. How can it be done. Resource A, B, and C are 3 different resource objects.
    ==Thanks,
    doki

    Ok, so there is a way, but it's not available during submission. You can use the findRequests api. From the result set, get the "Requests.Consolidated Data Value" value. In this information, you will get an xml formatted data. It provides the list of users on the request on the left side after submission. After the request is completed, this value is available. Upon completion, you could get the request information, get this value, and parse the information for user ids.
    In the same adapter, use the following API:
    formIntf.setObjectFormData(objInstanceKey, formHash)
    The formHash is a hashtable containing the field name on your object form, and the values you wish to populate it with. You could create a textarea box on your object form and populate the userids for who the request is for.
    However, this makes absolutely 0 sense. When you get a request, the list of userids are listed right there on the request.
    -Kevin

  • How to write excel file (.xlsx) using file adapter without using java code

    Hi All,
    In soa suite 11g Is there any ways to write the data to the excel ( xlsx ) file using fileadapter and not using java code..Thanks in Advance

    Hi Siva,
    I don't think there is any way to write .xls file directly. You'll have to use some Java API (iText etc.) to create an .xls file. However, you can write .csv file that can be easily converted into .xls at the target end. In MS, it opens as Excel file if delimiter is comma *,*.
    Regards,
    Neeraj Sehgal

  • How can i generate BARCODE Images using JAVA Code

    Hello ,
    My requirement is to generate BarCode Images to Print using JAVA Code.
    User will give only
    1) String.as Input Parameter and
    2) Type of Encoding you want to apply on to the String.
    outPut : code should generate Bar Code Images as per the requirements.
    can any one help me out with jars ????? or any link which can provide me start.

    1) I have requriement like generate doc file with
    more than one barcode image on that document.???
    So?
    If your chosen "doc file" format supports inclusion of multiple images there's no problem.
    If it doesn't, choose another format.
    2) I am able to generate .doc file but in which
    format i should open that doc file.????
    The same format you used to create it.
    3) Main thing is how can i put more than one barcode
    image on that doc file????
    That would depend on the file format and the API used to create it.
    is any one faced the same problem or gone through
    same requirement.
    Almost certainly. And they solved it too, given the document I'm looking at right now which is an e-ticket for an airline that has many barcodes and other generated images on it.
    So keep on trying, grasshopper, and you may find enlightenment.

  • How to get the values from struct data type using java code..?

    Hi ,
    I am newer to java.
    we are using oracle database.
    How to get the data from struct data type using java code.
    Thanks in Advance.
    Regards,
    kumar

    Hi Rajeev,
    To retrieve a FilterContainer you will need to traverse the report structure:
    ReportStructure boReportStructure = boDocumentInstance.getStructure();
    ReportContainer boReportContainer = (ReportContainer) boReportStructure.getReportElement(0);
    FilterContainer boFilterContainer = null;
    if (boReportContainer.hasFilter()) {
         boFilterContainer = boReportContainer.getFilter();
    } else {
         boFilterContainer = boReportContainer.createFilter(LogicalOperator.AND);
    Calling boDocumentInstance.getStructure() will retrieve the entire structure for the document.
    Calling boReportStructure.getReportElement(0) will retrieve the structure for the first report of the document.
    Hope this helps.
    Regards,
    Dan

Maybe you are looking for