varargs versus array as Arrays.asList param

515 byte By bronze-starDukes at 2007-11-26 12:08:33
Arrays.asList is declared thus:public static <T> List<T> asList(T... a)Why would it be written that way rather thanpublic static <T> List<T> asList(T[] a)?Are they not equivalent? If they are, wouldn't the second be more clear to most consumers of the javadoc?Just ...

help, converting integers to array of bytes

445 byte By bronze-starDukes at 2007-11-26 12:08:34
Hi, I have an array of integer as follows:int[] values = {1, 2, 6, 13, 17}byte 1 represent values 0 - 7byte 2 represent values 8 - 15etc..I want to convert the above integer array to an array of byte.I.e the array if byte represented in decimal should be like thisbyte[0] = 70byte[1] = 32byte[2] ...

The back button

882 byte By bronze-starDukes at 2007-11-26 12:08:35
Hi all,I have JSP page that contains data, when someone click on the link its send him to new page with new data.In the second page I have another link with information. If you click on it it'll take you back to results.jsp and show you new and fresh data.The probelm is what to do when the end ...

How to get hba's WWN.

957 byte By bronze-starDukes at 2007-11-26 12:08:36
Hello,How can I get the WWN of my qla2300 cards ?For information I'm using the SecurePath tool from HP.The only informations I found for the moment are :bash-3.00# /usr/sbin/spmgr display -av Server: bzmte1.bkw-fmb.chReport Created: Mon, Dec 11 10:18:35 2006 Command: /usr/sbin/spmgr display ...

is it possible to get the last element in String tokenizer?

213 byte By bronze-starDukes at 2007-11-26 12:08:38
hi there..can someone enlighten me is it possible to get the last element in a string tokenizer and print out just the last element?i will appreciate if there is a sample codethank you.

Cron job for scheduled web maintenance task

676 byte By bronze-starDukes at 2007-11-26 12:08:41
Hi,I want to set up a cron job to run a webpage every day which performs maintenance on a website. It is a .asp page that checks entries on a database and emails the results to administrators. How can I get this to work using cron job? My sys admin are saying it's not possible but I think it ...

what is the diffrence b/w jar and ear?

45 byte By bronze-starDukes at 2007-11-26 12:08:42
what is the diffrence b/w jar and ear?

where can i look for deploytool?

184 byte By bronze-starDukes at 2007-11-26 12:08:43
where can i look for deploytool in my tomcat?i came to knw that i can conrol access to webresources using deploytool...but couldn't find that batch file anywhere.

can we put the bunch of object into List ?

268 byte By bronze-starDukes at 2007-11-26 12:08:44
List.add(int indexkey , Object obj.)Class Customer{ ......................}here my question is that ... can we put the bunch of Customer object like : c1, c2 , c3 into List as object as a second argument with single index .. ?

BAD TRAP: type=31 rp=2a1002b75b0 addr=d10198 mmu_fsr=0 occurred in module "

5957 byte By bronze-starDukes at 2007-11-26 12:08:45
Helllo,My solaris recently encounter kernel panic and reboot.I suspect it is hardware problem, but I am not sure, could anybody know this problem kindly give some suggestion?Following are messages:Nov 17 10:05:34 ASB_sim_1_1_5 unix: [ID 340138 kern.notice] BAD TRAP: type=31 rp=2a1002b75b0 ...

getMinutes()

327 byte By bronze-starDukes at 2007-11-26 12:08:47
hi all i have a form and when I input 7 I want the input is 7:00bu tnow I only got 7:0 i try minStar = startTime.getSeconds();minStar = startTime.getMinutes()*60 +startTime.getSeconds();late I store the minStar into datbase, but still got 7:0how to deal with it?Thank ...

When I start the web applicaiton of guessNumber contained in JavaEE server

3250 byte By bronze-starDukes at 2007-11-26 12:08:48
When I start the web applicaiton of guessNumber contained in JavaEE server and visit the index link to verify the JSF1.2 enviroment the following exception occured. I have any ideal about how to rectify the error. Any advice is ...

BufferedImage not loading

3284 byte By bronze-starDukes at 2007-11-26 12:08:49
I am trying to load images of cards for a game i am developing.I developed it on me windows based laptop and everythig works fine, however, I get the following runtime error when I try to play on a Mac OS X machine.Exception in thread "Thread-0" java.lang.IllegalArgumentException: Width (-1) ...

URL Connection

1302 byte By bronze-starDukes at 2007-11-26 12:08:52
Hi,I imagine this is a pretty simple question so I apologise if its a little trivial. I have a URL I wish to hit. It is basically an interface to a web service and I dont care about the result, I just want to hit this URL, it will do what I want to do and then I can forget about it. I have the ...

Automatic Generate Text File from mySQL

136 byte By bronze-starDukes at 2007-11-26 12:08:53
Can this automatic generate out the text file from mySQL database based on the current time at 8am daily?can this be done?

Question about JScrollPane

2181 byte By bronze-starDukes at 2007-11-26 12:08:54
Hi everybody,I'm using HSQLDB in my program and users can execute custom queries with a JTextArea. When an exception is thrown during the excecution of a big query, the message is pretty large, because it contains the query itself and the warnings/remarks about it.What I wanted to do was to ...

can't add cookies

579 byte By bronze-starDukes at 2007-11-26 12:08:57
I want to add some cookies to store some settings for the next time you open the page in a navigator. In my jsp-page I have following code fragment:String nbrlines = "200";.... Cookie cookie = new Cookie("tetra_index_lines", lines);cookie.setMaxAge(7*24*60*60);response.addCookie(cookie);When I ...

Websphere JNDI problem.....

3845 byte By bronze-starDukes at 2007-11-26 12:08:59
Hi,I use the following code (which I found in one of the forums) to do a Domain Lookup and check for the MX record:String hostName is in the form e.g. yahoo.comboolean domainLookup( String hostName ) throws NamingException {Hashtable env = new ...

make an connection to data base

116 byte By bronze-starDukes at 2007-11-26 12:09:00
how can I tell my net beans that my data base is access and how can I tell where is the path to my data base?

Two Players in a single Frame

509 byte By bronze-starDukes at 2007-11-26 12:09:01
Hi!I'm creating a mini app that plays two media files (no necessary the same file in both cases). I've created two JPanels and added to them the visual and control components. All OK, but there is a problem, only one of the visual component can be seen, the other is in black (altought the ...

New workspace in wsad

173 byte By bronze-starDukes at 2007-11-26 12:09:02
Hi, I want to create a new workspace in my system to import existing code and to change some jsp and java class file. Sir i am new to wsad.Thnx,

set security contstraints in web.xml

130 byte By bronze-starDukes at 2007-11-26 12:09:03
what all shl i add to my web.xml to add the security constraints.. i need to make the client cert and authentication

NOBODY OUT THERE?

129 byte By bronze-starDukes at 2007-11-26 12:09:04
i have been posting since days on some vulnerabilities and other stuffs... no body is there to answer my questions?

problem condition and list

3827 byte By bronze-starDukes at 2007-11-26 12:09:06
Hello i have problem for adding and removing object from a list that is updated with a new list at some time interval.Here is my code :if(applicationList != null){h = new JobHolder(chemin, 2);List newList = h.getJobList();ObjectInList objInList1, objInList2;String name1, name2;for(Iterator it = ...

Check For Authenticated Users

2375 byte By bronze-starDukes at 2007-11-26 12:09:07
Hi, im trying to test if the user have a valid account on the my company's exchange server or not... What i do, is requesting him for the username & password, then try to connect to the server using them, if the connection was successful, then he will be accepted to send mail from my ...

dynamic class loading

1205 byte By bronze-starDukes at 2007-11-26 12:09:08
We have an application in part of which the users can write their own java code to do a specific action. Their code is compiled implementing an interface with a run() method, and the compiled code is stored on an SQL database. When the user wants to do this specific action, the compiled code is ...

mock objects

165 byte By bronze-starDukes at 2007-11-26 12:09:09
Hi have found following tools for the mock objects:1)JMOCK2)MOCKRUNNER3)MOCKCREATOR4)EASYMOCKWhich is the best tool to use?

AutoComplete Attribute Not Disabled for Password in Form Based Authenticati

748 byte By bronze-starDukes at 2007-11-26 12:09:10
AutoComplete Attribute Not Disabled for Password in Form Based Authentication any fix avaialable?THREAT:The Web server allows form based authentication without disabling the AutoComplete feature for the password field.IMPACT:The passwords entered by one user could be stored by the browser and ...

Adding two boxes in same branch group

208 byte By bronze-starDukes at 2007-11-26 12:09:11
Hi,I am new to Java3D. I want to add two boxes in same branch group at different location so that both of them are visible simultaneously. Can i achieve it?Thanks and regards,Rahul

marker interfaces

103 byte By bronze-starDukes at 2007-11-26 12:09:12
IS Runnable interface is marker interface inspite of having run()? why we use marker interfaces?

append string using <c> tag

535 byte By bronze-starDukes at 2007-11-26 12:09:13
Hi,I've a code like this<td> <c:set var="author" value="${blogEntry.authorDetails}"/><c:out value="${author.firstName}"/> <c:out value="${author.lastName}"/></td>the problem is both first name and last name are strings,word wrapping is not done perfectly. For ...

Java Mail Api Junk box problem

182 byte By bronze-starDukes at 2007-11-26 12:09:14
I am able to succesfully send emails but the problem is that it is going to Junk mail folder instead of the inbox.Any idea what could be the problem?Please Help.

Regarding Java Help System...('',)

779 byte By bronze-starDukes at 2007-11-26 12:09:15
Hello All,I had successfully implemented Java Help System for my chat messenger...But the problem I am facing is.... after making a jar file of my helpsystem..I am trying to access my Helpset file from my java code....When I click on Help topics button to display the Helpset It will give me the ...

DataInputStream.read()

959 byte By bronze-starDukes at 2007-11-26 12:09:16
HiIm using the DatainputStream class to read segments of a specified file.Im trying to acheive this by passing in the following parameters to the read method,myDataInputStream.read(myByteArray[], 512, 512)Where my file in the datainputstream has a length of 31,000 (there abouts).The byte[] has ...

How to create a Jar with only class files?

482 byte By bronze-starDukes at 2007-11-26 12:09:17
Dear all,I want to create a jar file with only classes.My class files and java files are in different folders under com .saycomin com there are two folders folder 1 -- subfolder 1 folder 2 -- subfolder 2like this.If i want to create a jar file from com directory how should i give the jar ...

Date problem in JTable

1883 byte By bronze-starDukes at 2007-11-26 12:09:18
Hi.I want to make a table with actual date and toolbar with buttons to change date on it.Here is some code:public class SimpleTableDemo extends JFrameimplements ActionListener,TableModelListener{JTable table;Calendar calendar;DateFormat czas;String time;Date date;public SimpleTableDemo() {// ...

language used to develop JRE ?

101 byte By bronze-starDukes at 2007-11-26 12:09:19
i want the exact answer please help me..............................Regards,jack

JSP + dropdown menu

621 byte By bronze-starDukes at 2007-11-26 12:09:20
HIi have declared an array and giving it as input to select options String[] reasonArray={"An Apple"," Bugs bunny","Cute cat"};<select name="abc"><%for(int i=0;i<reasonArray.length;i++){%><option ...

is the following possible with java and quicktime?

1108 byte By bronze-starDukes at 2007-11-26 12:09:22
Hi there,I'm planning to create a application or applet for the following purpose.a person at home can view a quicktime file (with timecode track) from a internet server. When he is viewing the movie he can set in and out points and give a description of the scene shots.After he spotted the ...

Simple player no sound, 'hang' during stop()

2699 byte By bronze-starDukes at 2007-11-26 12:09:23
Hallo,I have troubles diagnosting my jmf problem. Can you help a newb, please?I am using cross platform jmf-2.1.1e and mp3 plugin. My goal is to create single distribution (application jar + jmf.jar) that does not requrire anything but 'plain' jre installed on client side. But I have troubles ...

how to enable fastcgi in webserver

161 byte By bronze-starDukes at 2007-11-26 12:09:24
Hi all. Please tell me how to enable fast cgi in sunone webserver and execute the php application.please tell me in detail.ThanksNamassivaya

window.open() and prerender()

633 byte By bronze-starDukes at 2007-11-26 12:09:25
I've got a table with a column with hyperlinks. When the user clicks a hyperlink the onClick javascript reads as follows: window.open("/MockFitwise/faces/CompanyDetails.jsp?idBedrijf=#{currentRow.value['company.idCompany']}", "_blank");This bit works, however I don't get my ...

EntityBean and Inheritance

1017 byte By bronze-starDukes at 2007-11-26 12:09:27
Hi,I am a newbe to j2ee and ejb. I would like to ask you for some help.I develop j2ee application using j2ee1.4. I have some dictionaries I would like to map to entity beans. All those dictionaries are persisted on the same table, where is a column to distinct them. Lets say it looks like ...

How can I re-organize String lines

820 byte By bronze-starDukes at 2007-11-26 12:09:28
Hello My String consists of random lines. Every line has an priority number. Example of a String:Doneidpricreatedfinisheddescription00012006-12-11-job x00122006-12-11-do this00232006-12-11-work x00302006-12-11-some00422006-12-11-thing00512006-12-11-reads00602006-12-11-hereEvery "token" is ...

Books

223 byte By bronze-starDukes at 2007-11-26 12:09:30
Have any of the more experienced developers on this forum have any recommendations for decent books for the novice Java Card programmer (but not a novice programmer). I am working with the JCOP tools supplied by IBM.

Getting compilation Error in C++5.5 patch( Patch 113817-14) on SUNOS 5.8

495 byte By bronze-starDukes at 2007-11-26 12:09:31
Hi ,I getting following compilation error while compile below piece of code.class X{private:typedef struct a_st {int i;char c;} A_st;typedef struct b_st {int c;A_st aa;} B_st;};int main (){ return 1;}[b]ERROR[/b]:"tt1.cpp", line 11: Error: X::A_st is not accessible from X::b_st.1 Error(s) ...

Unable to pass enum to a method

1988 byte By bronze-starDukes at 2007-11-26 12:09:32
I am trying to use a enumation to list all the graphics drivers available and when I pass it from my main class to a another objects setGraphicsDriver method (with corresponding argument) I get the error:init:deps-jar:Compiling 2 source files to C:\Documents and Settings\Sean\Desktop\Java ...

Calling a Workflow form changeAnswersResults.jsp

229 byte By bronze-starDukes at 2007-11-26 12:09:33
Can we call a workflow form changeAnswersResults.jsp?In changeAnswers.jsp, when we click on Save or Cancel, accordingly I want to call two different workflows (may one)Can anyone give me example?Thanks

JComboBox - autocomplete

180 byte By bronze-starDukes at 2007-11-26 12:09:34
About autocompletion in JComboBox, I found this on the web:www.java-solutions.biz/jsJComboBox.htmlSomeone describet it as a very good solution. Is it worth 5€?

displaying null when trying to read integer type from excell sheet

1714 byte By bronze-starDukes at 2007-11-26 12:09:35
i have imported some tables from web page and trying to retrieve data using jsp ,i am able to see integer data in excell but not while i run it please help methe code followstry{out.println("Getting Connection ...");Connection ...