|
prithaa wrote: thanks for the article
I did not provide one, I wonder what you have been looking at.
prithaa wrote: but i cant still open a writableworkbook
Did you follow my advice and read all the documentation in the link I gave you? It clearly shows how to create a writeable workbook from an existing file.
|
|
|
|
|
yes i did read the link u sent and looked at the
class writablework
but there is no method which opens an existing .xls file
Regards
Pritha
|
|
|
|
|
Sorry, previous link was not correct owing to HTML frame. However, I think this one[^] is the best you will get.
|
|
|
|
|
thanks for replying
Workbook workbook = Workbook.getWorkbook(new File("d:/Writefile.xls"));
WritableWorkbook copy = Workbook.createWorkbook(new File("d:/Writefile1.xls"), workbook);
copy.write();
WritableSheet sheet = copy.getSheet("Report2");
Number number;
number = new Number(0, 0, 453.25, times);
sheet.addCell(number);
copy.write();
copy.close();
I want to open an existing file and add a cell to an existing sheet. The above code opens the file but the cell editing doesnt happen.
Regards
pritha
|
|
|
|
|
Sorry, no idea why that's happening; I think you may need to re-check the documentation and work with your debugger.
|
|
|
|
|
Thankyou Richard for your help
|
|
|
|
|
Just for the record, I have never used these packages[^]; all the information I gave you I found by using Google and reading the Javadocs.
|
|
|
|
|
Hi, I have a class for uploading a file with a method called uploadFile(), which uploads the user's file to the server in a directory like this:
C:/apache-tomcat-6.0.35/temp/accountName/username/filename
Before uploading the file, it calls the method createDirectory() which creates the above directory path if it doesnt already exist. Here is the code for it:
public void createDirectory(String accountName, String username){
if (new File("C:\\apache-tomcat-6.0.35\\temp\\" + accountName + "\\" + username).exists() == false) {
new File("C:\\apache-tomcat-6.0.35\\temp\\" + accountName + "\\" + username).mkdirs();
}
}
I want to test that it creates a directory if it doesnt exist, without actually creating the directory (so using Mockito).
I'm struggling to get to grips with Mockito and would appreciate any assistance with it.
Thanks
|
|
|
|
|
I haven't work with that before. However, why don't you read there documentations and give a try?
If you've never failed... You've never lived...
|
|
|
|
|
Im facing one problem in streaming data capture for reading the broadcast during multithreading, pls help if u get time,
Actually there is one class which is reading data from one of the udp socket another class is their which accepts the tcp connection from every client request and creates a thread for every client and request the same udp class for data the thing is working with 1st thread which gets created but when i request with another client from another pc/ip the packets get losted to the 2nd client/thread
I have made a workaround by creating a list where im storing the Threads outputstream object
and looping it to send the data to all the client but this is just temporary as it ll delay the packets if clients/connections gets increased
pls suggest if required will share the code.
thanks in advance
|
|
|
|
|
praveen2609 wrote: there is one class which is reading data from one of the udp socket another class is their which accepts the tcp connection from every client request and creates a thread for every client and request the same udp class
So which is it: TCP or UDP? There is a difference and it affects how your program needs to operate.
modified 25-Jun-12 5:23am.
|
|
|
|
|
TCP is accepting connections from client requests , and create a thread which internally calls a class in run method of thread which create a udp connection and continously receives the data from the udp port and writes it to the tcp connection outputstream object
|
|
|
|
|
I'm still not sure what you are doing; perhaps if you show some of the code that is not working people will be able to offer suggestions.
|
|
|
|
|
It appears that you have the following system.
You have UDP port which recieves data.
You have TCP listener which accepts client connections.
Once you have a client connection you want to send some or all of the data from the UDP port to those clients (it doesn't matter whether it is some or all as that is a different problem.)
Solution to the above.
Part 1.
1. Create a thread safe pipe which allows for a single input and allows for multiple readers. This has NOTHING to do with UPD nor TCP.
2. Test it.
3. Test it again using threads.
Part 2
1. Creaet a UPD port
2. Set up the UPD port to write messages (data collected from port into something meaningful) to the pipe.
3. Test this. Note that this has NOTHING to do with TCP.
Part 3
1. Create a TCP listener
2. For each listener request hook up as a reader to the pipe.
3. Test this. Note that this has NOTHING to do with UDP.
Part 4
1. Put parts 2 and 3 together.
2. Test it.
|
|
|
|
|
hello,
I will look after a few days on the developement of an application jee a little big but I decided to devote one week prior to document more about IDEs and frameworks
then after my little research, I found netbeans for me the most because I like it more than eclipse and I will rely on the tutorial application full e-commerce to the doc netbeans to make my application,
but on the use of framework, I have not a clue what to do
is that because this is the first application I must not do all even if it is large
or I have to use because it facilitates the work
what do you advise me
and if I have to use them: to which you can direct me: JSF, Spring, Struct ......
and thank you
|
|
|
|
|
You can use Eclipse RCP as a framework for your application. It is working fine and also pretty well documented. The Framework provides a lot of features that one otherwise has to develop oneself.
You have to develop under Eclipse, but that is anyway the most common used IDE. With a little experience you'll begin to love it because it's so simple and structured.
Ralf Ebert has placed his book on Eclipse RCP3.x in the web : http://www.ralfebert.de/eclipse_rcp/EclipseRCP.pdf[^]
Lars Vogel is the other big source for tutorials and howto's on this :
http://www.vogella.com/eclipse.html[^]
|
|
|
|
|
Java EE spread in a wide range, like JSF, JSP, Spring, etc... So its all depend on what you really want to do. My advice is take the only tutorial and work on with that. With the time you can have a better understanding about the subject matter.
Don't stick with one IDE. Each and every has there own advantages and disadvantages. In almost all the IDEs you can easily attach the Java DOC and refer any time you want.
If you've never failed... You've never lived...
|
|
|
|
|
|
Using JDK 1.6 with the Cryptix encryption libs, I get this error: Error:java.lang.RuntimeException: NYI. I've updated the Security jars with many different version, but still get the same error. Suggestions please?
|
|
|
|
|
Allan Larson wrote: Error:java.lang.RuntimeException: NYI
Are you certain that is the complete message, it does not give much of a clue?
|
|
|
|
|
"NYI"? Does it mean: "Not Yet Implemented"? Then you have to wait for someone to implement it and get it released...
|
|
|
|
|
I am asking this question because I recently installed and then uninstalled eclipse IDE because it put me under lots of troubles for java whereas NetBeans is running quite smoothly with lots of support.There are lots of problems with JDBC driver with Eclipse (as far as I know) and no search engine even their own FAQ's don't provide the exact solution
Always believe in God and never let misfortunes make you give up
|
|
|
|
|
I use Netbeans and I like it. Others may disagree as it is a mater of preference as far as I'm concerned.
Panic, Chaos, Destruction. My work here is done.
Drink. Get drunk. Fall over - P O'H
OK, I will win to day or my name isn't Ethel Crudacre! - DD Ethel Crudacre
I cannot live by bread alone. Bacon and ketchup are needed as well. - Trollslayer
Have a bit more patience with newbies. Of course some of them act dumb - they're often *students*, for heaven's sake - Terry Pratchett
|
|
|
|
|
I have always used Eclipse as I find it easier to work with than NetBeans, but as the great Vilmos says: "ez egy mater preferencia".
|
|
|
|
|
I'm using Eclipse too. Netbeans is too fancy, to much play around for me.
Eclipse is just right. Most developers I know are working with Eclipse.
|
|
|
|