I'm very new to java.so dont know much about it. i'm trying to get a input from user and write it into a file named alpe.jacl My question is how I will be able to get multiple userinputs like address and jobtitle etc etc in the same single window. and the code will save the inputs in alpe.txt one by one in a new line like nameis name address russia jobtitle dev
Suggest you see whether there is a writeLine() method rather than write; that will mean you can forget the "\r\n" which only really applies to Windows. Try here. You might want System.out.println("Your file has been written."); instead.
You can repeat the JOptionPane calls for the other attributes; your writing calls look quite good otherwise.
Thanks,as i told before am very new to java, so still I'm not able to get it correctly. could anyone please explain with an example. or take my program as an example and modify to show it up. one more thing i tried the same file to compile and run in unix but it compiled but it failed to run.
No, It's compiling correctly. and also I dont have any problem run the class file now once i switched to root user. I was asking about my first question... please explain with example hoe i will be able to get multiple user inputs from a single window and write it to a file..
I was asking about my first question... please explain with example hoe i will be able to get multiple user inputs from a single window and write it to a file..
Unfortunately, this is not really a specific question -- it is asking for an example that does your homework problem.
You need to get specific. What is the next step to get you application closer to the assignment? And are you running into any particular issues? Now...
If you don't know what your next steps should be, I suggest you take a look at some of the methods of the FileWriter class -- which you are using. You need to get confortable with writing to the file. Don't worry about get the data to write yet.
But this giving me new windows each time i enter a input. I want this all inputs from a single window. what should i do to give all inputs from a single window. Do I need to create a window frame.. If yes then from where should i start.. Give some suggestions.
Hi Rob, Thanks. I tried your suggestion. Now its showing all in a single window but i ran into a new problem. It suppose to create a file called alpe.jacl where all values entered will be stored. So I did like this:
Now one more problem I'm not able to figure out how i will be able to execute ./install.sh script at command line present at the same folder with clicking on a button named Install.
How should i go further do i need to create a button named INSTALL and assign a task ./install.sh on click event. Am not sure help me.