Connecting two programs - please help
Hi, I'm new here, so I'd like to say 'hi' to everyone :) I'm a freshman in the java comunity, so please be gentle.
Firs of all I'd like to ask how to resolve the first problem. I've got the code which is responsible for convert a html document to the txt file. It looks like:
import javax.swing.text.html.parser.*;
import javax.swing.text.html.*;
import javax.swing.text.*;
import javax.swing.*;
import java.io.*;
public class TextFromHtml extends HTMLEditorKit.ParserCallback{
static String trimmss(String o){
return (o.trim()).replaceAll("\\s+", " ");
public void handleText(char[] data, int pos){
try{
String o = new String(data);
PrintWriter pw = new PrintWriter(new BufferedWriter(new FileWriter("test.txt", true)));
o = trimmss(o);
pw.println(o);
//pw.close();
catch (IOException exc){}
System.out.println(new String(data));
public static void main(String args[]){
try{
String s = JOptionPane.showInputDialog("Enter the name of the file you want to convert from html to txt.");
Reader r = new FileReader(s);
ParserDelegator parser = new ParserDelegator();
HTMLEditorKit.ParserCallback callback = new TextFromHtml();
parser.parse(r, callback, true);
catch (IOException e){
e.printStackTrace();
System.exit(0);
}But unfortunately I don't know how to change this code to obtain such situation as making a new txt file without blank spaces > 0 and erasing the \n new lines. I'd like to get a txt file, which contains of line-by-line text. Could you please help me - tell & show me how to do that? I'd be very grateful
Regards, skullscape.
Hi Skullscape,
My apologies for not getting a response on this forum, but this may have been because this is a fairly generic Java programming question, rather than an issue specific to the JSE product, the purpose of this particular forum.
So may I suggest that you check out http://java.sun.com/ which has a full set of facilities for those such as yourself who are new to Java programming.
Although by now you nay not be such a novice :-)
Similar Messages
-
Hi there, I am trying to connect to my server at work from home using a vpn connection. It connects fine and the time ticks along, but when i click go - connect to server, it comes up with connection failed. Please help!
... when i click go - connect to server, it comes up with connection failed.
If you're trying to connect to a Bonjour server on the remote network, that won't work over a layer 3 VPN. Use something like Hamachi or one of the SSH-tunnelling Bonjour proxy apps for that. -
After the IOS7 update, i can no longer use my imessage and facetime. It says "waiting for activation" and tried to log in on my apple id but it turned out to connection error. Please help me guys! Thank you.
Have you tried to reboot your phone(hold home and lock button simutainiously)?
-
My MacBook get's hot really quick and then discharge's quickly without opening any program, please help.
I have checked the cooling fan, and it's working, and I took it to an IT technician and he said my hardware is allright, so is it a problem from the OS it self??
OS X(10.8.5)Restart with the Option key held down and the Mac OS X install disk inserted, provide the firmware password, click on the DVD, press the button with the straight arrow, access the firmware settings, disable the password, and use FireWire Target Disk mode. If you can't do that or it doesn't work, contact Apple.
(38384) -
When I try using FaceTime it doesn't seem to work. When someone face times me all I get is a missed notification. An when I try to FaceTime someone it tells me to connect to wifi please help.
Alright, when you are attempting to FaceTime someone, are you connected to WiFi? With the iPhone 4, it does not support using FaceTime over the cellular network, you will need to be connected to Wi-fi.
-
i have windows 8 and I got this error "Adobe Photoshop has stopped working" whenever I start a program. please help. how can I fix this problem? many thanks
Please read these and proceed accordingly:
http://blogs.adobe.com/crawlspace/2012/07/photoshop-basic-troubleshooting-steps-to-fix-mos t-issues.html
http://forums.adobe.com/docs/DOC-2325 -
I have a MacBookPro with OSX 10.9, and my Tata Photon plus is not working on it. When I try to connect, Its not connecting.. Please Help
<Email Edited by Host>Current Firefox versions require a Mac with an Intel processor and OS X 10.6 (Firefox 16 runs on Intel Mac OS X 10.5).
*http://www.mozilla.org/firefox/25.0/system-requirements/
For an unofficial Firefox 17.0.10 ESR compatible version that runs on a PowerPC Mac with OS X 10.4.11 or OS X 10.5.8 you can look at TenFourFox.
*http://www.floodgap.com/software/tenfourfox/
*http://www.macupdate.com/app/mac/37761/tenfourfox
*http://code.google.com/p/tenfourfox/wiki/ReleaseNotes1710
See also:
*http://code.google.com/p/tenfourfox/wiki/PluginsNoLongerSupported
*http://code.google.com/p/tenfourfox/wiki/QuickTimeEnabler
*http://code.google.com/p/tenfourfox/wiki/AAATheFAQ -
I have just bought iPhone 3gs in Sept.11. I was trying to update the software using itunes but it is showing Error "-3259" saying connection timeout. Please help.
Did you already check your securit software settings? iTunes has to contact Apple during the update process.
See this article: iTunes for Windows: Troubleshooting security software issues -
hi, i just try to update my 3g in itunes unfortunatly it got error while updating it asked me to restore update but unable to restore it , now my 3g i locked and on screen it displying usb symbol connect to itunes ,please help me regarding this
I suspect your error was 1015, not 1051. This usually involves a jailbroken iPhone, use Google to find your solution.
-
When I am on line and click on another link, it won't connect...PLEASE HELP!
See:
iOS: Device not recognized in iTunes for Windows
You need iTunes version 10.7 -
My iPad/iPhone wont connect to iTunes please help
My iPad/iPhone wont connect to iTunes please help...im trying to sync both but its not connecting to iTunes and id like to update my music library
Hello there, gretchenkemp95.
The following Knowledge Base articles offer up some great, in-depth steps for troubleshooting your iOS device not being recognized:
iOS: Device not recognized in iTunes for Windows
http://support.apple.com/kb/ts1538
or
iOS: Device not recognized in iTunes for Mac OS X
http://support.apple.com/kb/ts1591
Thanks for reaching out to Apple Support Communities.
Cheers,
Pedro. -
While trying to import pictures from iPhone to iTunes, iTunes request to make software update and then to restore iPhone. I have cancelled the restore to rpotect pictures. The pictures have not been imported yet, but the iPhone display freezed at ITune connection page. Please help me save pictures and use the iPhone as usual. Restarting of the phone did not work so far.
RingomonIf the device is in recovery mode there is no date on the device to salvage.
Restore the device. -
Error when splitting a Table into two columns - Please help!
Hi!
I have created a table in which I have created a header which has been split into 3 parts conisting of 2 columns. These all work fine. However, when I try to split the row below the header row into 2 columns, it does so but, in a way, connects the line inbetween the two columns with the line inbetween the two columns above and will not allow me to move it left or right by manually changing specs or dragging the line. Please help! (I'm using CS5 by the way!) Thank you!I suggest you begin with a pre-built CSS Layout. DW has several to help jump start your projects. Go to File > New Blank Page > HTML. Select a layout from the 3rd panel and hit CREATE. See screenshot.
Save this layout as test.html and begin building your prototype page saving and validating code often during your work sessions.
Code Validation Tools
CSS - http://jigsaw.w3.org/css-validator/
HTML - http://validator.w3.org/
Good luck with your project!
Nancy O. -
I cant sing in facetime in my imac\ wifi connection...please help
I have no problem with connection to the internet (wifi) but i can not sign in facetime using my apple id. how can i use facetime please help me
thanksHello . There are two links that helped me if you are still having this log in issue :
1. https://discussions.apple.com/thread/3009867
2.http://mac.downloadatoz.com/tutorial/6399,how-to-fix-facetime-for-mac-not-sign-i n-issue.html
bye -
Connecting Two Wireless Routers HELP!!!!
I recently bought two WRT150N routers. I currently have one connected to my cable modem. I want to setup the second one in another part of my house. How do I connect the second router to the first router that is already connected? I am VERY new in all this. I read somewhere that I would need an Access Point but this router is supposably an "access point". PLEASE HELP ME!!
Diagram:
cable moden-->WRT150N )))))))) XX (((((((((WRT150N--->computer.
Message Edited by ddp4lyfe on 03-18-200704:04 PMHow far away is the "other" side of the house from the 1st routers location? You could just probably do this....
WGA54G ---- XBOX
modem---WRT150N )))))))))))
WUSB300N ---- PC
Maybe you are looking for
-
Using two computers with one Extigy sound c
Hello: This is my first post; am wondering if there is a way to plug the Extigy USB input into two computers at the same time, perhaps with a USB sharing device? Has anyone ever tried this? Thanks. Glad to be part of the new community group. Pineocea
-
How can I map half the keyboard to another instrument
Hey, Let's say that I want the left half of my M-Audio keyboard to play a Chruch Choir and the right half to play Piano, how should I proceed? Thanks,
-
BDC : creating Billing frm Dr/Cr Memo - Problem in deletion of conditions
Dear Gurus, I am facing a problem when I try to develop a BDC for creating a Billing document from a Debit/Credit Memo Sales Order. The requirement is to delete some condition when creating billing from debit note for Depot plant. The problem I am fa
-
Hi friends, I am getting the error -200279 during acquisition. I have developed the application in a PXI located at my place. The application is running fine in that PXI. But when I ran it on PXI which is located at a remote site. It is giving this e
-
Trouble opening Illustartor CC
I just signed up for Illustrator CC trial version but can't figure out how to open the application on my PC. Can you point me in the rtight direction? Thanks