Get ur Duke Dollars Fast

how to allow a applet to create a file in the local machine . examples and codes please
Thanks in advance

Hi
you can create a file on the local file system using applet that is running in an appletviewer. because applet viewer donot have as much restrictions as the browser. I have created a file and here is the code.
import java.awt.*;
import java.awt.event.*;
import java.applet.*;
import java.io.*;
public class writerApplet extends Applet
boolean isStandalone = false;
//Get a parameter value
public String getParameter(String key, String def)
return isStandalone ? System.getProperty(key, def) :
(getParameter(key) != null ? getParameter(key) : def);
//Construct the applet
public writerApplet()
//Initialize the applet
public void init()
try{
PrintWriter file = new PrintWriter(new FileOutputStream("C:\\a.txt"));
file.println("HI...........");
file.println("Sending data to the file.");
file.println("bye");
file.close();
}catch(IOException e){
System.out.println(e.getMessage());
e.printStackTrace();
public void paint(Graphics g){
g.drawString("File has been written to C:\\a.txt successfully.", 10, 10);
I hope it would do help
bye

Similar Messages

  • How to get My Duke Dollars

    i want to know the process to get my duke Dollars.
    With Regards.
    From,
    Anupam Kumar

    You have to signup for a paypal.com account, the
    click on the 'Transfer to PayPal' link in the 'My
    Duke Dollars' section.If only.

  • Who has the most duke dollars?

    Is there a place in the JDC where you find find a list of who had the most duke dollars? I think they had this a long time ago, but I'm not sure what happend to it.
    Thanks,
    Strider

    http://developer.java.sun.com/developer/community/dd.jshtml#winners
    (Do I get any duke dollars for this?)

  • Pocketing DUKE DOLLARS!!!

    How to get earned Duke Dollar??????

    some heartening info: earning dukes has nothing to do with peripatetic evenings in the red light district...

  • I'm not being given new Duke Dollars

    Hey all,
    I read through the FAQs and they say I'm supposed to get 10 Duke Dollars each month as long as I login at least once a month. I've been logging in and helping others with the little bit of knowledge I have (I'm still a beginner).. but I'm not getting any new Duke Dollars..
    Is anyone else having the same problem?
    Kenny

    Oh Great, I wish I had known that before I gave all of
    mine away... sigh how are newbies supposed to get
    questions answered? I certainly can't answer other
    people's questions to get dollars... I'm a fricking
    newbie!I never answer questions based on dukes. I don't believe most people do either. So it shouldn't matter.
    And even as a newbie it might be possible for you to answer some questions.

  • How do you add Duke Dollars to a post???

    How do you get the little Duke Dollars thingy to show up next to your post? There are no buttons to do so on the page where I'm ttyping this, nor on the preview page. Nor does it say anything about it in the Duke Dollars FAQ.

    Oh never mind! I saw the option to add Dukes appear after the message was posted.
    IMHO you should be able to add Dukes either on the form or the preview page.

  • I wanna assign you ALL my Duke Dollars....

    ...for a new question i have BUT b4 I can do that I need to retrive back the duke dollars from my earlier messages that haven't been answered and have my dollars gathering dust...how on earth do i do that?

    Silkm I have no issues with assigning you all my dukes from all those earlier questions...just go there, type anything and I will assign them to you if u can solve my query...
    It's gotta do with setting the classpath...and yes, i have already been thru google and forums here...
    This is what i do:
    - Start>Control Panel>System>Advanced>Environment Variables
    - Click on Path in the System Variables section
    - Click Edit and add C:\Program Files\Java\j2re1.4.1_01\bin AFTER %SystemRoot%\system32;%SystemRoot%;%SystemRoot%\System32\Wbem;c:\Program Files\Common Files\Adaptec Shared\System;
    - Next I go to DOS and get my C prompt to C:\Program Files\Java\j2re1.4.1_01\bin
    - I type javac helloworld.java and ENTER
    - I get "javac is not recognised as an internal or external command, operable program or batch file"
    So then I go back to Start>Control Panel>System>Advanced>Environment Variables
    - This time I click on New in the "User Variables for Gaurav" section(that's me) - after all i am logged in as Gaurav on my XP machine!
    - I type Path in Variable Name and C:\Program Files\Java\j2re1.4.1_01\bin in Variable Value
    - Save
    - goto DOS
    - type helloworld.java and get "javac is not recognised as an internal or external command, operable program or batch file"
    BTW i have installed j2re-1_4_1_01-windows-i586 on a XP machine
    HELP!

  • Duke Dollars Not Working

    I tried to assign Duke Dollars to my last post. It says that I have 50 dollars to assign. Whne I try to assign them I get a 500 Server error. i kept trying and it eventually displayed a stack trace stating the user has insufficient dollars. What Gives?

    I'd tell you if there were some Dukes on offer.

  • Where's my monthly duke dollars?

    according to the faq "Duke dollars: JDC members acquire Duke Dollars upon registration, then again on a monthly basis. "
    I dont know enough to earn dukes (yet)... so i count on getting this... otherwise i will have to continue being cheap! I dont like being miserly with my dukes : (
    PS While i have your attention, Christmas is coming - so can i make a request for "lots" of dukes?? ; )

    they are hiding under the Chrismas Tree.

  • Duke Dollars?

    How do I get duke dollars back if no-one answered question or response is not worthy.
    thanks

    You dont need to. If none of the responses were any good, you dont have to award dukes. If you did then changed your mind then thats tough.

  • "My Duke Dollars"

    Go to your "My Duke Dollars" and click on the link to "Duke Dollars Rewards Program Account Summary".

    And??What does it give you because for me it gives memy
    'profile management'?No. I get my list of dukes spent, gained, totaland
    recent activity.I too. Sometimes. Other times, I get a 404 or a
    log-in and my profile.Do you remember all the shenanigans with your user profile. How you had to confirm something or whatnot a couple of years ago so they could "centralize" and "streamline" the one Sun account login thingy?
    That worked out well didn't it. Much better now.
    Vote "Don't touch it!" in Sun's feedback poll http://forum.java.sun.com/thread.jspa?threadID=710736&tstart=0 Sun should fix the bugs in the forum software before fiddling around with the GUI.

  • Duke Dollars Question

    Hi,
    I have posted couple of questions with DUke Dollars. I did not reward them because nobody answered my question. Now i can i use those dollars in my New Posts.
    thanks.

    You can also un-assign them (get them back) assuming Sun hasn't changed the web site lately, but I don't remember exactly the URL you have to hit. Search the forums for "reward.jsp" and see if you can find another post about doing that.

  • How are duke dollars distributed?

    Hi all,
    I wonder.... For the last 2 months, I replied on several messages with Duke Dollars on it. But those Duke dollars were never attributed to anyone. Very often there wasn't even a feedback from the person that posted the message.
    What happens with those dollars?
    Marc

    Don't let others fool you.
    I am collecting all unassigned dukes. Just post the
    threads you have been answering and I'll make sure you
    get those dukes (charging only a small fee).Don't trust him! He said he would collect for me but instead he intimidated the user into giving him all their Duke Dollars!

  • 10 Duke Dollars if you help me set up tutorial

    After several posts to this forum w/o any success, I am now offering 10 Duke Dollars to get this problem fixed:
    I am trying to work through the j2ee tutorial on a Windows XP platform, specifically the servlets section which requires me to build the bookstore1 example (chapter 11). I am having problems with using asant to compile and package the project. I have been at a complete standstill for about a week now because I cant get the example to run - Im tearing my hair out, so plese help me!!!
    The command I am using is asant create-bookstore-war. This throws about 80 compilation errors because classes referenced within the source files are not found . I therefore know that the compiler cant find the classes (suggesting CLASSPATH problems), but I dont know what settings Im supposed to be using.
    Some info for you:
    I tried adding JAVA_HOME and J2EE_HOME to the environemt variables, pointing to the java sdk (inside the app server) and J2EE application server installation location respectively. This didnt work. Initially I had JAVA_HOME pointing to a seperate installation of the SE SDK I had, but since discovering the SDK inside the appserver, I uninstalled J2EE, J2SE SDK, and re-installed J2EE, using the enclosed sdk as JAVA_HOME. None of this solved my problem.
    I think I know now that the environment variables are not anything to do with the tutorial - this is just for the locations of the J2EE and J2SE SDK command path files - is this correct? In which case, using J2EE_HOME and JAVA_HOME is just for shorthand declarations in the environemtn/system variables?
    (As you can probably guess by now I have spent a lot of time trying out different things!!!).
    I also tried setting the j2ee.home and j2ee.tutorial.home attributes in the build.propoperties file located in <INSTALL>/j2eetutorial14/examples/common. This didnt work. I also tried setting the admin username property in this file, and the corresponding password in the password file (cant remember offhand what its called). Again, no luck.
    In another post, somebody asked for the following oputput from my system:
    D:\J2EE\j2eetutorial14\examples\web\bookstore1>asant listprops
    Buildfile: build.xml
    listprops:
         [echo] Path information
         [echo] j2ee.home = C:\Sun\AppServer
         [echo] env.Path = C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C
    :\BORLAND\BCC55\BIN;C:\Sun\AppServer\jdk\bin;C:\Sun\AppServer\bin;
         [echo] env.PATH = ${env.PATH}
         [echo] Classpath information
         [echo] classpath = .;D:\Packages;
         [echo] Admin information
         [echo] admin.password = ${admin.password}
         [echo] admin.host = localhost
         [echo] admin.user = admin
         [echo] admin.port = 4848
         [echo] https.port = 8181
         [echo] Domain information
         [echo] domain.resources = "domain.resources"
         [echo] domain.resources.port = 8080
         [echo] Database information
         [echo] db.root = C:\Sun\AppServer/pointbase
         [echo] db.driver = com.pointbase.jdbc.jdbcUniversalDriver
         [echo] db.host = localhost
         [echo] db.port = 9092
         [echo] db.sid = sun-appserv-samples
         [echo] db.url = jdbc:pointbase:server://localhost:9092/sun-appserv-samples
         [echo] db.user = pbpublic
         [echo] db.pwd = pbpublic
         [echo] url.prop = DatabaseName
         [echo] ds.class = com.pointbase.jdbc.jdbcDataSource
         [echo] db.jvmargs = -ms16m -mx32m
    BUILD SUCCESSFUL
    Total time: 1 second
    D:\J2EE\j2eetutorial14\examples\web\bookstore1>There must be somebody out there who has set this tutorial set up on Windows XP - please can you give me a dump of your system and environment variables, and any other settings I need (build.properties etc.).
    Many thanks

    Heres the last couple of errors on running asant creat-bookstore-war. All errors are cannot resolve symbol, so im sure its a classpath problem.
    I only have PATH properties set in the environment variables, and the set CLASSPATH only points to my own J2SE packages.
        [javac] D:\J2EE\j2eetutorial14\examples\web\bookstore1\src\servlets\ShowCart
    Servlet.java:147: cannot resolve symbol
        [javac] symbol  : class ShoppingCartItem
        [javac] location: class servlets.ShowCartServlet
        [javac]                 ShoppingCartItem item = (ShoppingCartItem) i.next();
        [javac]                                          ^
        [javac] D:\J2EE\j2eetutorial14\examples\web\bookstore1\src\servlets\ShowCart
    Servlet.java:148: cannot resolve symbol
        [javac] symbol  : class BookDetails
        [javac] location: class servlets.ShowCartServlet
        [javac]                 bd = (BookDetails) item.getItem();
        [javac]                       ^
        [javac] 68 errors
    BUILD FAILED
    file:D:/J2EE/j2eetutorial14/examples/web/bookstore1/build.xml:56: Compile failed
    ; see the compiler error output for details.
    Total time: 8 seconds
    D:\J2EE\j2eetutorial14\examples\web\bookstore1> and heres the build.properties file:
    j2ee.home=C:\\Sun\\AppServer
    j2ee.tutorial.home=D:\\J2EE\\j2eetutorial14
    sunone.home=${j2ee.home}
    admin.password.file=${j2ee.tutorial.home}/examples/common/admin-password.txt
    admin.host=localhost
    admin.user=colr
    admin.port=4848
    https.port=8181
    domain.resources="domain.resources"
    domain.resources.port=8080
    db.root=${j2ee.home}/pointbase
    db.driver=com.pointbase.jdbc.jdbcUniversalDriver
    db.host=localhost
    db.port=9092
    db.sid=sun-appserv-samples
    db.url=jdbc:pointbase:server://${db.host}:${db.port}/${db.sid}
    db.user=pbpublic
    db.pwd=pbpublic
    url.prop=DatabaseName
    ds.class=com.pointbase.jdbc.jdbcDataSource
    db.jvmargs=-ms16m -mx32m Thanks.

  • I'm trying to make i(to the power of n) over n.quickanswer=MANY duke dollar

    I will pay many duke dollars for a quick answer to this.
    i(to the power of)n
    the full equation is r=---
    n
    heres what i did:
    class Project
         public static void main(String[] arguments) {
              int P = 0;
              int r = 0;
              int n = 0;
              int t = 0;
              int i = 0     
              int interest = i public static double exp(n) / n;
              system.out.print("The Interest rate is" + interest);
              int rate = 1 + r public static double exp(1/n) h;//the effective rate
              system.out.println("The effective rate is" + rate);
         int A = P (1 + i public static double exp(n) /n) public static double exp(n*t);
    The program isn't finished i have to get this far without errors

    one last thing. could you just go over this briefly and quickly?
    class Project { 
         public static void main(String[] arguments) {
              int P = 0;
              int r = 0;
              int n = 0;
              int t = 0;
              int i = 0;     
              //these values are put in by you, the user.
              int interest = Math.pow(i, n) / n;
    system.out.print("The Interest rate is" + interest);
              int rate = Math.pow((1 + r), 1/n) ;//the effective rate
    system.out.println("The effective rate is" + rate);
              int A = P * Math.pow( (1 + Math.pow(i, n) / n), n * t); system.out.print("The total holdings (A) is" + A);
              int e = Math.pow(1 + (1 / n), n);     system.out.print("The return (e) is" + e);
              int time = P Math.pow(1 + r, t);
    system.out.print("The time needed to double?");
    system.out.print("The time needed for this principal is" + time);

Maybe you are looking for

  • Is there a way to create scripts to use tmconfig...

    Is there a way to create a script to execute tmconfig and change CLOPTS parameters for a particular server? Here is what I would like to accomplish. Want to set "-r" option to a limited number of servers, on an as needed basis. I do not want to bring

  • What am I doing wrong, I am trying to burn a video that I downloaded form I tunes

    I have a Compaq Presario desktop no CQ3240AN and am trying to burn a video that I purchased from ITunes, I keep on being asked to load a disc, which I have many times. The disc I am using is Kodak DVD-RW,. My computer doesn't seem to recogonise the d

  • Not Receiving Emails on my Tour9630

    Thursday I didn't get any emails from my external email accounts (Yahoo, Hotmail, Work) until 11:40PM Pacific then I got a whole days worth.  Since then I haven't received anything. My phone works, text messaging works, the brower works, I can see th

  • Drag and drop songs gets a search box looking for autoplay

    Hi, All of a sudden I'm having problems with my shuffle. I reset to default factory settings hoping that would help, but no luck. When I drag songs into my shuffle a windows search box (with the flashlight) pops up and it's searching for "autoplay".

  • Ical doesnt work

    Ical doesnt work . It shut down