Score: 163°       Point: 39664       Stars: 0        




vBulletin 4.0 Publishing Suite with CMS

Get Adobe Flash player


Creating Spinner in excel sheet using apache poi

Hi ,
Is it possible to create a spinner in excel sheet using apache poi because i have been using this to create excel sheets

2013-06-12 13:35:13

NoClassDefFoundError using MultipartRequest

Hello everyone.
I am having a problem in using MultipartRequest class for uploading file.
I had successfully compiled my program with no errors ,downloaded the cos.jar file and set the classpath using command prompt.
But when I run my servlet on Weblogic 8.1 or Apache Tomcat server, it gives error which says :
java.lang.NoClassDefFoundError: com/oreilly/servlet/MultipartRequest
at uploadservlet.doPost(uploadservlet.java: 16)
at javax.servlet.http.HttpServlet.service(H ttpServlet .java:760)
at javax.servlet.http.HttpServlet.service(H ttpServlet .java:853)
Can any one please guide me how to remove this error.
Thanks and regards,,

2013-06-12 11:12:49

Base conversion

Hello forum. I am confused. I am writing a method that takes in a int value and a base and from those two find the base number . For example: The method takes a number, say 342, and converts it to a base (any base).
I understand the algorithm, cant fathom the code
Heres what I know
value % base = first digit starting from right
(value/base) % base = second digit starting from the right
(value/base^2)% base = third digit starting from right...
,... and so forth.
I am not sure how to write this loop. I was thinking a while...I cant see this. Can some one help me better understand how to loop this? THanks in advance

2013-06-12 04:47:43

My program has to run in less than a minute. Can anyone help make my code efficient?

Hey all. I am trying to find the millionth prime number. My code's functionality is fine, but it takes too long to run (about 3 minutes)
I want to make it run in about a minute or less. Here's my code:
import java.util.*;
public class Mainn
public static void main(String[] args)
int count = 0;
int number = 2;
ArrayList a = new ArrayList();
while(count < 1000000)
int c=0;
for(int i = 2; i <= Math.sqrt(number) ; i++)
if (number%i == 0) //check to see if it is even
break; //end loop if even
}//end of while
System.out.println(a.get(a.size()-1)); //prints last element of the arraylist which is the 1 millionth prime number
long startTime = System.currentTimeMillis();
long total = 0;
for (int i = 0; i < 1000000; i++)

2013-06-12 04:04:43

Platform independent socket communication between Java and C++

Hello forum,
I would like to build a simple Java server that can receive TCP messages from different endpoints that use Java, C++ or any other language. As far as I know the following message properties are critical: byte order, encoding and number representation. However, I don't know which Java Streams and Writers write Java specific code (like ObjectOutputStream does) and which can be used to communicate with a non-Java endpoint.
Thanks for any help.

2013-06-12 00:34:38

Error adding a method to a class

im new to Java and learning how to program through a book. Im working on adding a method to a class but I am getting an error when compiling and im not sure what i need to do to the method to allow it to be read.
Any help is much appreciated :o)
Here is the problem.
im using eclipse to compile.
The class is saved as AddMeth.java.
I had no problems previously adding class vehicle to an existing class before i prepared AddMeth.
Error message:
Minivan can carry 7.Exception in thread "main" java.lang.NoSuchMethodError: vehicle.range()V
at AddMeth.main(AddMeth.java:28)
class vehicle{
int passengers;
int fuelcap;
int mpg;
void range()
System.out.println("The Range is " + fuelcap * mpg);
public class AddMeth {
public static void main(String args []){
vehicle minivan = new vehicl

2013-06-11 21:01:52

Java as a CGI to Upload a File.

I am trying to write a Java program that runs on the server as a CGI and then it will be able to save an uploaded file.
I am running on an MVS system so I can't use imports like javax.* or apache.* and most examples use those imports.
I have code that parses the data from the HTML POST but I am not clear on how I get the Data Input Stream to save it on the Server ?

2013-06-11 19:20:21

Why the semicolon after the curly braces

Hello. Why is it necessary to have a semicolon after a closing curly brace? I thought the purpose of the curly braces was simply to identify a code block. So what purpose does the semicolon after a closing curly braces serve?
Ex. The compiler is telling me I need a semicolon after the last closing curly brace of this block of code. With the added semicolon, the code compiles OK.
ActionListener action = new ActionListener() {
public void actionPerformed(ActionEvent evt) {
if (boat != null) {
Thanks in advance.

2013-06-11 16:57:51

Sending request to HttpUrlConnection: Status 405 error method not allowed

Hi ,
My web application is deployed on my machine . I can access thru Url and access the API's .
But when I am trying to access the API thru Java code,HTTP 405 Status Error: Method not Allowed comes up.
The request will be in this form:
url : e.htm
My java code is like this :
package gepoc;
import java.io.IOException;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.StringWriter;
import java.net.HttpURLConnection;
import java.net.MalformedURLException;
import java.net.URL;
import java.net.URLConnection;
import java.net.URLEncoder;
import java.util.logging.Level;
import java.util.logging.Logger;
import javax.xml.parsers.DocumentBuilder;
import javax.xml.parsers.DocumentBuilderFactory ;
import javax.xml.parsers.ParserCon

2013-06-11 10:53:03

Read Large Excel Files with Better Performance & Rendering Image Fonts

What is new in this release?
The long awaited version of
Aspose.Cells for Java 7.5.0
has been released. This maintenance release contains enhancements and fixes for the issues reported in earlier versions. In this release, we have provided support to fonts in rendering image files when the required font is not found. We also resolved an issue caused by JBOSS for mixed cases Java classes for the users. Several other important issues have been addressed. For example, issues around rendering Microsoft Excel files, rendering charts, manipulating worksheets and rendering to PDF format have been resolved. Issues pertaining to the formula calculation engine have also been fixed in this release. This release includes plenty of improved features and bug fixes as listed below
Use java.awt.Font to

2013-06-11 07:36:57

How to use random booleans

My question: how to trigger an event by using a random boolean?
I want a action event to happen in my program but I only want the action performed if the boolean is true(for example by clicking on a button I want something to display or not if the boolean is true). I want to use a random boolean, and then use an if statement to test to see if the boolean is true and if so then display like a JDialog or something. Here is some of the code for what I am trying to do
//rob boolean declared as true in constructor
public boolean randomBoolean(){
return Math.random() < 0.5;
private void LeaveTownActionPerformed(java.awt.event. ActionEven t evt) {
Dialog.showMessage("You have been robbed");
So why doesn't this code work?????????? Thanks

2013-06-10 17:12:16

iterate through filenames in directory

I am trying to iterate through a directory and a search for any file that contains .log in its name, and save these names into a string array. The directory which I want to search is where ever the .class or .jar will be located (i.e. if i put the program onto the desktop, it will look through all file names existing on the desktop). Is there a way to do this?

2013-06-10 16:58:01

How to search for specific pattern in string?

I need to search for a specific pattern in a string. I need to identify if a string contains a 10 character sequence that begins with C, and contains both and only numbers and letters (i.e. no symbols), and all characters must be uppercase. I did look into regex's but I didn't fully understand them, and I am not even sure if this is what to use for such a task. I would also need to get the index of this character sequence when found as well. Can anyone help me out?

2013-06-10 15:57:42

Telnet Connection class read(byte[]) response byte[] size

I have written one Telnet based connection class to send and receive response from Network. Here I am facing an issue when I am reading the Network response in byte[] by using TelnetConnection.read(byte[]) method, at a time I am receiving maximum of 1024 bytes only and due to this I am getting only half of the response in that request. Pls.let me know the solution to get the entire response in single request.
Thank & Regards,

2013-06-10 10:48:00

Obtaining A Session ID RESTful Web Services Not Using A Servlet

So i have finally resolved my problem all I did was add
private HttpServletRequest request;
which allowed me to call
return request.getSession().getId();
within my RESTful web service.
So im developing some code that allows a user to upload a file using apache tomcat. I have the upload portion working correctly but what I am having trouble with is the code to obtain a users session ID because all i can find is examples that show how to get a session ID using servlets but i am not using a servlet i am using a RESTful webservice. My question is, is it possible to obtain the users session ID without using a servlet because i havent found any way to do this

2013-06-09 17:12:37

netscape.javascript.JSObject for Java Version 1.7

Hi ,
Could you please advise
I Have a program that works find with Java 1.6 but not with Java 1.7 ( user can't enter input )
I didn't wrote the code just need to fix it ...
The problem is related to " netscape.javascript.JSObject" witch is define to work with java-plugin-
Q -1 - Where ( in the project ) should the java-plugin-
.0.23 is define ?
Q -2 - Is there a java-plugin-
for " netscape.javascript.JSObject" ?

2013-06-09 08:47:20

Interactive Game

Hi, I'm trying to make an interactive game for school and I'm trying to do it in java. What I mean with an interactive game is this: for example, I put a video of basketballer dunking in java. However I want to pauze at certain points. So, for example, when he's about to jump the video pauzes (or slows down) and you need to press space in order to continue the video. After that when he's almost at the ring it pauzes again and then you need to press arrow keys up, right and down. This idea sounded very simple to me, but I can't even get it to work to play a video in java. I want to put a small menu screen in the beginning and I want to use multiple videos. I tried JMF, but it says it can't create a player for any of my videos (.mov .avi .mp4 ...). Can anyone tell me how I should handle this

2013-06-08 20:44:27

exec foreground process

I have a java app that displays a slideshow.
Some of the files are movies instead of photos.
When a movie comes to be displayed the action depends upon the OS.
On Mac OS X it calls exec() VLC to play the movie. This works, but...
VLC displays behind my App. OK so I add -video-on-top to VLC command line. Movie now visible but VLC is still a background process (key presses go to my app while movie is playing).
I want keypresses to go to VLC until the video finishes (then VLC quits automatically).
How can I use exec to launch a (Mac OS X bundle app) in the foreground?

2013-06-08 11:44:35

Issue with Tomcat and eclipse

I am new to servlets.I have installed eclipse juno and installed Apache tomcat 6.0 in it.I wrote hello world in servlets and tried to execute it.I end up with http-404 error.I have oracle database client at 8080.So i changed the connector port to 8081 in config.Still i find in the eclipse console that tomcat is running on 8080.I am clueless as i am new to it.
Sometimes I get this error also."several ports(8080,8009)required by tomcat are already in use.
Can someone help me?

2013-06-08 08:34:47

Real Time Console output to JTextArea ?

As the title says Im trying to output to a JTextArea in real time exactly how the console works. What I have so far is a GUI when the user enter a integer and button is clicked loops starts and only outputs the whole result once all the calculations and loops finish. Also I am using the .append() method to output to JTextArea. How can I resolve this problem ?

2013-06-07 22:08:26

View More (Log In and Will Fans)

Win the T-shirt

with only 4000 points

Who We Are Partner Advertising Contacts Privacy terms Help & FAQ

© Copyright 2010-2017 Fabrizio Fichera. All rights reserved.

© 2010-2018 Fabrizio Fichera


Fill out the form you see below. Registration is free, fast and simple.
If you are already registered, sign in page login.

Web Site :
Required Field
First Name :
Required Field
Last Name :
Required Field
Email :
Required Field
Sex :
Required Field

evolveStar.com is free for ever !

evolveStar.com provides a search engine that allows you to gather information to write their own blog.

evolveStar.com enhances the sources displaying the logo of the site.

If you want to remove your site or you believe a site listed infringes copyright, please report it to: info@evolvestar.com

Specifies the subject copyright violation and the url of the page

evolveStar.com respecting the law DMCA (Digital Millennium Copyright Act) will immediately remove whatever its merits.

Next will be effectual and relevant checks.