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.

Similar Messages

  • How to Create and Deploy Web Services Using Oracle 9i JDeveloper

    Hi,
    My Question is how to create and deploy Web Services using Oracle 9i JDeveloper.Anybody please give me a detailed Reply.Please Reply to [email protected]
    Hopr to Hear From you,
    Regards,
    G Sreekumar

    You could use datasources. You should do this in your BC4J Configuration. Then when deploying your applicaiton use the command -installDataSource (from admin.jar) to create the right datasource.
    You could probably use the name of your connection + "DS" so you can also use it locally in JDeveloper as JDev seesm to create this automaticly for your Connections.

  • How to create and read text file using LabVIEW 7.1 PDA module?

    How to create and read text file using LabVIEW 7.1 PDA module? I can not create a text file and read it.
    I attach my code here.
    Attachments:
    File_IO.vi ‏82 KB

    Well my acquisition code runs perfect. The problem is reading it. I can't seem to read my data no matter what I do. My data gets saved as a string using the array to string vi but I've read that the string to array vi (which I need to convert back to array to read my data) does not work on the pda. I'm using version 8.0. So I was trying to modify the program posted in this discussion so that it would save data from my DAQ. I did that but I still can't read the data after its saved. I really don't know what else to do. All I need to do is read the data on the pda itself. I can't understand why I'm having such a hard time doing that. I found a possible solution on another discussion that talks about parsing the strings because of the bug in the "string to array" vi. However, that lead me to another problem because for some reason, the array indicators or graphs don't function on the pda. When i build the program to the pda or emulator, the array indicators are faded out on the front panel as if the function is not valid. Does this kind of help give a better picture of what I'm trying to do. Simply read data back. Thanks.

  • How to create and print contact sheet using photoshop elements 10?

    how to create and print contact sheet with photoshop 10?

    Which operating system are you using?
    On a windows system you can use the Organizer
    http://www.dummies.com/how-to/content/how-to-print-contact-sheets-in-photoshop-elements-.h tml
    On a Mac, File>Contact Sheet II within the pse 10 editor

  • 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

  • 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 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 and write a BLOB using ImmediateAccess

    Hi there,
    I'd like to write a BLOB using ScrollableRowSetAccess an ImmediateAccess and thereby want to avoid the use of any SQL-statements.
    The problem is that I can't write to an empty BLOB, so that I have to create a dummy-Blob using BLOBDomain and overwrite it afterwards (see code below).
    It should be possible to avoid the creation of a dummy-BLOB but I don't know how. Could you please send me a corrected version of my code?
    Thanks in advance
    write File with filename to the column with index col /(or the column with name colname, if specified) of the table that is specified by ResultSetInfo rsi
    public static void writeFileToBlob(int col, String colname, ResultSetInfo rsi, String filename, SessionInfo _sessionInfo)
    FileInputStream fin;
    Object obj;
    ScrollableRowsetAccess srsa= _rsi.getRowsetAccess();
    ImmediateAccess ia;
    byte []mybytes;
    BlobDomain
    BLOB blob;
    OutputStream out;
    byte []myBuffer;
    int bytesRead=0;
    try{
    //open file
    fin = new FileInputStream(_filename);
    //lock Row
    srsa.lockRow();
    if (_colname==null)
    ia = (ImmediateAccess)srsa.getColumnItem(_col);
    else
    ia = (ImmediateAccess)srsa.getColumnItem(_colname);
    obj= ia.getValueAsObject();
    //insert a dummy-BLOB of size 1-byte
    mybytes= new byte[1];
    blobDom= new BlobDomain();
    blobDom.setBytes(mybytes); //ein Byte in den BLOB schreiben
    ia.setValue(blobDom); //Wert in Zeile einf|gen
    //commit Data
    _sessionInfo.getApplicationModule().getTransaction().commit();
    //access previously created dummy-Blob
    srsa.lockRow();
    if (_colname==null)
    ia = (ImmediateAccess)srsa.getColumnItem(_col);
    else
    ia = (ImmediateAccess)srsa.getColumnItem(_colname);
    obj= ia.getValueAsObject();
    //assign the BLOB
    blob= (BLOB) obj;
    //open BLOB for writing
    out= blob.getBinaryOutputStream();
    myBuffer= new byte[10*1024];
    //read file and write the BLOB
    while ((bytesRead= fin.read(myBuffer)) !=-1)
    out.write(myBuffer, 0, bytesRead);
    out.flush();
    out.close();
    fin.close();
    ia.setValue(blob);
    //commmit data
    _sessionInfo.getApplicationModule().getTransaction().commit();
    }catch(Exception e){System.out.println("writeblob:"+e);}
    null

    Here are the issues with your usage of BlobDomain:
    1. Streaming support is not implemented in 3.2 version of BlobDomain. It'll be implemented in our next release.
    2. Your casting of object returned from getColumnItem is illegal as the objects will be of type BlobDomain and not BLOB.
    3. When you create an empty BlobDomain you're in-effect meaning to call the empty_blob() method on the sql-row to create a empty blob locator.
    4. You need to use getBytes(), setBytes() to read data out/set data into a blob/clob domain object in JDev 3.2
    5. Casting/using oracle.sql.BLOB may lead to non-portable code (you're binding to the jdbc objects which may not be available in all tiers of deployment).
    Here's the pseudocode you could use for new blobs.
    1. create a new instance of BlobDomain()
    2. setBytes() with actual data read from a stream. (Yes this may not work with real large blobs but we've tested blobs ~2MB in size and for larger needs, we're implementing the streaming support scheduled for our next release).
    3. set the domain object into an attribute.
    4. post/commit your data.
    null

  • 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

  • Q: How to access and modify xml tags using Java

    I have an xml based document that i need to access and change. For example, the code
    <section id="section1">
    <div>
    <xforms:group id="id1">
    <xforms:label id="label1">
    <l style="font-size:16pt"> something </l>
    </xforms:label>
    </xforms:group>
    </div>
    </section>
    Working with Java I need to access all the tags, select some of them that are relevant to the current device and remade the document. I thought I would read the file character by character identifying the different labels and building a tree, storing in the tree nodes the relevant information as some kind of attributes (for example, in the case of the <xforms:group id="id1"> I would name the node "xforms:group" and create an "id" attribute with value "id1"). I'm not sure if that is the most efficient way of accessing the problem (computational power might be an issue), and would appreciate some help on the subject.
    Thanks,

    this may help you..
    this is a little util i made to help me read/write files.
    using this, you are only one step away from your solutions, you only need to figure out the regex you need to run on the text of the file to make it become what you need it to become.
    though if you use non-standard encoding, you might not want to use this code..
    import java.io.BufferedReader;
    import java.io.File;
    import java.io.FileReader;
    import java.io.FileWriter;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.Arrays;
    public class ASCIIFile {
         private File file;
         private StringBuilder builder;
         public ASCIIFile(String path) throws IOException{
              file = new File(path);
              openFile();
         public ASCIIFile(File file) throws IOException{
              this.file = file;
              openFile();
         public void setNewFileName(String fileName){
              file = new File(file.getAbsolutePath(), fileName);
         public void setNewFilePath(String filePath){
              file = new File(filePath, file.getName());
         private void openFile() throws IOException{
              if(!file.exists()) file.createNewFile();
              BufferedReader read = new BufferedReader(new FileReader(file));
              String line = read.readLine();
              builder = new StringBuilder();
              while(line != null){
                   builder.append(line);
                   builder.append("\n");
                   line = read.readLine();
              read.close();
         public String getContents(){
              return builder.toString();
         public StringBuilder getStringBuilder(){
              return builder;
         public void setStringBuilder(StringBuilder b) throws IOException{
              setContents(b.toString());
         public void setContents(String contents) throws IOException{
              FileWriter writer = new FileWriter(file);
              writer.write(contents);
              writer.flush();
              writer.close();
              builder = new StringBuilder(contents);
         public static File[] getAllFilesUnderDir(String fullpath, boolean recursive) {
              ArrayList queue = new ArrayList(10);
              ArrayList matched = new ArrayList();
              File root = new File(fullpath);
              File[] files = root.listFiles();
              if (files == null || files.length == 0) {
                   return new File[] {};
              queue.addAll(Arrays.asList(files));
              for (int j = 0; j < queue.size(); j++) {
                   File child = (File) queue.get(j);
                   if (child.isDirectory() && recursive) {
                        files = child.listFiles();
                        if (files != null) {
                             queue.addAll(Arrays.asList(files));
                   } else { // child is file
                        matched.add(child);
              return (matched.size() > 0)?((File[]) matched.toArray(new File[] {})):(new File[] {});
    }

  • How to Create a Bootable Flash Drive to do a clean install of Lion.  I have tried to use the InstallESD.dmg but it still will not do a clean install so that I do not have to do a reinstall from the Recovery (That just re downloads and takes over 6 hours)?

    How to Create a Bootable Flash Drive to do a clean install of Lion.  I have tried to use the InstallESD.dmg but it still will not do a clean install so that I do not have to do a reinstall from the Recovery (That just re downloads and takes over 6 hours)?
    The system I'm have is a Mac-mini that had SL on it and no SuperDrive.  I have also call Apple Support and they have really have not been to much help over 1st did my up grade to Lion and Installed the Lion Server.... it lost my SSL that I paid for and kill almost on of my server setting, plus kill all my web servers (using apache vhosts), and not to say the LDAP will even let remote users login to your laptops.
    PS: There is no way that I'm going to buy a Install USB from Apple... They have over billed me over $300.00 because the Apps Store still has bugs (Glad I did not write that App/Service)
    If there is anyone that can give in the information to create a USB install stick, I would be very thinkful.

    Here you are bro, courtesy of "softpedia.com"....brilliant site!!!
    If you ever had problems with your Mac OS X installation you know that the first thing you should do is to check the startup volume using Disk Utility.
    After the check has ended and, if the errors exceed a certain level of seriousness, the Disk Utility application will require you to restart your Mac and use its Mac OS X Install disc counterpart.
    Other users may have to reinstall OS X altogether, but will find, or already know, that their SuperDrive (a CD/DVD reader and write combo drive) is not functioning properly and it will not be able to read the Install disc.
    Although this might happen to Mac OS X Leopard users due to faultyhardware, the vast majority of problematic SuperDrives will be encountered inside Snow Leopard running Macs.
    This is due to the updated SuperDrive firmware included in either the Install disc or the software updates one has to install to reach the latest version of OS X, namely 10.6.6.
    This can be fixed by flashing the SuperDrive’s stock firmware using free command line tools that one can find for free online (I will write about this process also, but at a later time because this article only focuses on allowing you to create your own alternative USB boot disc).
    If you are reading this last bit of information with skepticism, than you should know that it happened to me too. Despite all my tries to make it work properly, the SuperDrive kept on munching any inserted DVDs and just popped them out in about twenty seconds.
    The workaround to this issue was to create my own Leopard bootable USB memory stick. I am not suggesting a Snow Leopard bootable stick mainly because there are lots of users that have decided to buy the cheaper, Upgrade version, which I have not tested and, therefore, I’m not sure if it will work properly once written to a USB disk.
    And now, here are the exact steps you should follow in order to obtain a fully bootable Leopard (or Lion) Install disc.
    Step 1 (If you already have the Leopard install disc DMG file you can skip to Step 2)
    Launch Disk Utility (you can find it inside /Applications/Utilities). Here select the Leopard Install disc in the list of drives on the left and click on the New Image menu entry at the top of the window. A save message will appear where you will have to select the Desktop as a destination.
    Step 2
    After Disk Utility has finished creating the Leopard DMG, insert your USB stick and erase all data and reformat the disk. To do this select the USB in the list of drives on the left and, after clicking on the Erase tab on the right side of the window, choose the Mac OS Extended (Journaled) format and click the Erase button beneath.
    Step 3
    After the USB has been reformatted, download the SuperDuper app from HERE and launch it. Once SuperDuper starts, you will only have to select the DMG in the Copy drop-down menu, your USB memory stick on the right and hit the “Copy Now” button.
    One can also use Disk Utility for this task but creating a bootable USB stick failed 2 out 4 times when copying the DMG to the stick (with the exact same settings each time). Creating the bootable stick using SuperDuper proved to be the perfect way to do it because it worked each of the 4 times I tested it.
    The steps above can also be used to create a bootable Mac OS X Lion USB by using the InstallESD.dmg image you can find inside the Lion installer (named “Install Mac OS X Lion.app”) downloaded from the Mac App Store in the /Applications folder.
    To locate the InstallESD.dmg right click the Lion installer, select the “Show Package Contents” entry, go inside the “Contents” folder, and from there into the “SharedSupport” folder. Inside this folder you can find the InstallESD.dmg you can use to create your own bootable Mac OS X Lion USB stick. To do so, go to the third step described above and use the InstallESD.dmg as the DMG to be copied to your USB disc.
    That’s it! Once the process ends you will have a fully bootable Leopard (or Lion) USB disk that you can use as an alternative to the Apple’s DVD Install disc that comes bundled with all Macs.
    To use your newly created bootable disk you will have to restart the Mac, press and hold the OPTION key until the StartupManager appears. Here, select the Mac OS X Install disk using your keyboard arrows and press return to start from the selected drive.

  • How to create and install a toolbar to a browser using java

    Hi all,
    Can any one guide me about how to create and install toolbar to a browser using java ??
    please any one help me about this,i am not getting any idea about this..
    Thanks and Regards
    Sandesh S

    I doubt you can. Those browser toolbars are done by implementing to an API provided by the browser. That API, I don't believe, is provided via Java. But of course, that would be entirely up to the browser, not Java.

  • How to create and use mutable array of UInt8

    Hello!
    If I get it right, UInt8 *buffer, buffer - is a pointer to a start of array?
    Then how to create and use mutable array of UInt8 pointers?
    The main target is a creation of the module that will store some byte array requests and will send all of them at the propriate moment.

    I try
    - (void) scheduleRequest:(UInt8 *)request {
    if (!scheduledRequests) scheduledRequests = [[NSMutableArray array] retain];
    [scheduledRequests addObject:request];
    But get warning:"passing argument 1 of 'addObject:' from incompatible pointer type"

  • HOW TO CREATE  and  USE EVENTS IN WORKFLOWS .

    HOW TO CREATE  and  USE EVENTS IN WORKFLOWS with the help of classes.
    What i am doing is..
    open se24
    event tab->event name->parameters
    method tab->method name->event handler->copy parameters
    interface tab->if_workflow->enter
    tell me what else to do step by step
    Another important thing is that HOW to use these class events to trigger the workflows.
    REPLY ASAP
    THXS IN ADVANCE

    Hi,
    Pl. see this blog...
    Raising ABAP OO events for workflow
    Regards,
    JOy.

Maybe you are looking for