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 ...
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] ...
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 ...
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 ...
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.
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?
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.
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 .. ?
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 ...
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 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 ...
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) ...
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 ...
Can this automatic generate out the text file from mySQL database based on the current time at 8am daily?can this be done?
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 ...
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 ...
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 ...
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?
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 ...
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,
what all shl i add to my web.xml to add the security constraints.. i need to make the client cert and authentication
i have been posting since days on some vulnerabilities and other stuffs... no body is there to answer my questions?
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 = ...
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 ...
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 ...
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 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 ...
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
IS Runnable interface is marker interface inspite of having run()? why we use marker interfaces?
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 ...
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.
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 ...
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 ...
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 ...
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() {// ...
i want the exact answer please help me..............................Regards,jack
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 ...
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 ...
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 ...
Hi all. Please tell me how to enable fast cgi in sunone webserver and execute the php application.please tell me in detail.ThanksNamassivaya
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 ...
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 ...
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 ...
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.
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) ...
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 ...
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
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€?
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 ...