- Strength to Increase Rep
- +0
- Strength to Decrease Rep
- -0
- Upvotes Received
- 2
- Posts with Upvotes
- 2
- Upvoting Members
- 2
- Downvotes Received
- 2
- Posts with Downvotes
- 2
- Downvoting Members
- 2
73 Posted Topics
Hello everyone, I am trying to merge large number of CSV files into one, using the following "awk" command, but if I increase the number of files more than 10,000, it then gives me "argument too long" error. Can someone suggest how I can manage to go beyond the limit? … | |
Hello everyone, I have 2 JSP files, lets call it 1.jsp and 2.jsp. I have a javascript function in my 1.jsp file, that I am calling 2.jsp, and passing one argument. as follow: 1.jsp function call1Servlet () { var myId = document.getElementById('lblId').textContent; window.open("/myapp/2.jsp?myId="+myId, "", "toolbar=no,menubar=no,resizable=no,scrollbars=yes,width=1024"); } Now, in my 2.jsp … | |
Hello all, I have data in my MySQL table. some of my columns contains Arabic texts. [My DB and J2EE webapp is on Centos7]. When I tested the application on my laptop [Windows], it displays properly; however, when I deploy my WAR file on Centos linux, then the Arabic text, … | |
Hello all, I have a J2EE application that displays a dropdown of items, in Arabic text. This data is stored in a table in underlying MySQL server. The DB character set is set to utf8 and I have in my JSP the carset encoding as utf8 as well. This works … | |
Hello everyone, I am populating a dropdown list in my webapp, from a MySQL database table. There are around 160,000 records in the table. When I start my webapp and when populating the content of the drop-down, it takes incredible amount of time, and eventually the browser crashes. I am … | |
Hello all, I have a function in JS, that I need to translate in Java to be used in my JSP as part of server side script. I need to find out what's the equavalent of JSON.stringify() in Java? This is my current JS function. This functioin takes a CSV … | |
Hello everyone, I need to pass some parameters from my servlet to my JSP. I am able to access 2 of my parameters from the request object, but one of them is returning null value. Here's my servlet snipet: request.setAttribute("selectedA", aBook); request.setAttribute("selectedB", bBook); request.setAttribute("book_ref", book_ref); logger.info("book_ref = " + book_ref); … | |
Hello all, I have an index.jsp that has 3 frames [banner, menu, main]. My menu options are in "menu" frameset, and when I click on a menu option, it calls the servlet, then based on that, it does some processing in my servlet, and forward the request/response to specific JSP. … | |
Hi all, I have a multi-threaded program. This program, lets say spawns 10 threads. I would like to update a variable when each thread finishes its job. The reason why I am asking this, is because I would like to show something like progress bar (not really a progress bar, … | |
Hello everyone, I am writing a Java program to reset LDAP account password. I know the password should be quoted passwrod and then encoded in UTF-16. I have a question, if someone can confirm please. I am getting encoded password as follow: String oldPassword = "Password1234"; String newPassword = "Password9999"; … | |
Hi all, I have a J2EE web application that I am integrating with LDAP to implment Password Reset functionality to allow AD users to change their own password. My code works at times, and sometimes it stops working throwing [code]LDAP error code 52, initializing SSL/TLS error.[/code] I don't know why … | |
Re: [code] Actually to convert from .doc to .pdf via Java I could not find a direct method, But I found a two step process, Access your Microsoft Format files using Apache POI, You can read more about it here. Next use iText to convert the data you have into a … | |
Re: Try this: I changed alittle bit your program, but this should work [code] import java.awt.*; import javax.swing.*; import javax.swing.border.*; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; public class TrafficLight extends JFrame implements ActionListener { private static JButton btn1 = null; private static JButton btn2 = null; private static JButton btn3 = null; private … | |
Hi all, I have a java program when I compile it, it compiles fine, without any error or warning. However, when I run it, I get the following warnings. [code] bash-2.03$ javac CountSessions.java bash-2.03$ java CountSessions Writing data to file... Data written to file !! log4j:WARN No such property [maxFileSize] … | |
Hello folks, I am trying to add a JFrame object into JTabbedPane, but I am getting a java.lang.IllegalArgumentException. Here's my code snipt. [code] // other codes... JTabbedPane tabs = new JTabbedPane(); tabs.addTab("Flight Information",flightInfoPane); <-------------- line 28 // other codes... private FlightInfoPane flightInfoPane = new FlightInfoPane(); [/code] Here I have flightInfoPane … | |
Hi all, I am trying to compile a servlet, and am getting the following error. [code] C:\Program Files\Apache Software Foundation\Tomcat 5.5\webapps\flatironswp1\WEB-INF\classes>javac export\ExportUtil.java export\ExportUtil.java:5: package javax.servlet.http does not exist import javax.servlet.http.*; ^ [/code] and here's my code: [code] package export; import java.io.*; import javax.servlet.http.*; import javax.servlet.*; public class ExportUtil extends HttpServlet … | |
Re: Or for 2nd one, add the following right after your for() loop: [code] for (j=0;j <triangleSize;j++ ) { for(k=triangleSize-1;k>j;k--){ System.out.print('*'); } System.out.println(); } [/code] | |
Hi all, In my program I need to create 2 log files, success and error. But I need to create either one of them, depending on the out come of the program execution. In other words, if program fails for any reason, I need to create the error log file … | |
Hi all, I have a program, which is invoked from a shell script. I need to return back to the shell script a status, whether the program succeeded or failed, so the shell script determines whether to continue with its normal course of actions or to stop upon faileur. So, … | |
Hi all, I am trying to execute a windows command from within my java program, but I can't get it to execute the DOS command. Here's my code: [code=java] try { Process p = Runtime.getRuntime().exec("cmd.exe /C cls"); } catch (IOException e) { // catch exception } [/code] But, the code … | |
Hi all, I have set up a project in Eclipse 3.1 and am using java 5.0 compiler. Here's my folder structure in Eclipse [code] DFS\RemoteClient\TestClient.java DFS is the project in Eclipse [/code] and this is how it looks my java class [code] package RemoteClient; import java.util.*; // other imports public … | |
Hi all, I have a frame, which has several tabs. I would like to perform some actions, when user clicks on a tab. Can someone please tell me what's the event that I should look into? Thanks in advance. | |
Hi all, I have a simple JFrame windows with two JLabel, two JTextField and two JButton. I use SpringLayout to display controls in on the frame. But when I run the application, the windows is displayed in a very small size. Only the two buttons are displayed. But when I … | |
Hi Folks, I am making an RMI call to a remost host (Weblogic) and am getting the following nested exceptions [code] weblogic.rjvm.PeerGoneException: ; nested exception is: java.rmi.UnmarshalException: Incoming message header or abbreviation processing failed ; nested exception is: java.io.InvalidClassException: com.ic.framework.exceptions.ExceptionLevel; local class incompatible: stream classdesc serialVersionUID = 2325229144791754421, local class … | |
Hi all, I have a threaded program, which migrates contetn from one repository to another. The program works fine, when I test for small number of documents, say arround 10 or 20. But when I increase the number of documents, then I get [B]java.lang.OutOfMemoryError[/B]. I can't seem to figure out … | |
Hi all, I have an HashMap with key/value pair. The program processes each element of the hashMap, and should mark the HashMap element as "processed". i.e. I have the follwoing key/value pair. [code] 1/"090003453bc454" 2/"090003453bc455" 3/"090003453bc456" and so on... [/code] So, when the program process each element, it should mark … | |
Re: Here's what you can do: [code=java] HashMap map = new HashMap(); map.put(new Integer(1), new String("ONE")); map.put(new Integer(2), new String("TWO")); map.put(new Integer(3), new String("THREE")); int one = Integer.parseInt(map.get(new Integer(1)).toString()); and so on... [/code] | |
Hi all, I am getting the content of an object which is returned as [B]ByteArrayInputStream[/B], and then I am assigning to another object, which accepts input as [B]ByteArrayOutputStream[/B]. Can someone please suggest as how can I convert ByteArrayInputStream to ByteArrayOutputStream... Here's my code: [code=java] ByteArrayInputStream b_input = source_object.getContent(); // how … | |
Hi all, I have to write a synchronization utility which synchronizes a target folder with a source folder: i.e. I have the following source directory structure and would like to synchronize it. [code] C:\source\ | +----Folder_A | | | +---Folder_A1 | | | | | +---File_AA1.txt | | | +---FileA1.txt … | |
Can someone tell me what jar file do I need inorder to use the above class? | |
Re: Have you created a data source for your Database on the SQL Server? | |
Hi all, I have an object, say its called MySuperType, which has a sub type, say it is called MySubType. MySuperType has the following attributes: int a; int b; int c; MySubType has the following attributes: (besides inhereting a,b and c) int d; int e; I was wondering if I … | |
Hi all, I have to write a program which utilizes threads. In my program I have to connect to a Database and execute a massive number of UPDATES on a table--arround 2000 to 5000 records needs to be updated. I am planning to use threads. So, I can spawn multiple … | |
Re: [QUOTE=push;549346]respected sir/madam sorry to say that am not asking for any homework. am an employ working in non it sector. and am trying to lear some thing wich is possible from my side. i learend java. am not asking about how to pass argument. am asking how work that at … | |
Re: [QUOTE=comjisu33;595985]public class TFQuestion { String tfQuestion; boolean cAnswer; public TFQuestion(String tfQtion) { tfQuestion = tfQtion; cAnswer = true; } public String toString() { return tfQuestion; } public boolean checkAnswer() { } this is what i got... i dont know if i am correct for first constructor and i am not … | |
Re: Try this: [code] public class Reverse{ public static void main(String [] arg) { String s = arg[0]; for (int j = s.length()-1; j >= 0; j--) { System.out.print(s.charAt(j)); } } } [/code] | |
Re: You need this: [code] public class DemoAges { private Ages ages = new Ages(); public static void main(String[] args) { //Declare/initialize Ages int age = 0; int type = 0; int avgAge=0; Scanner scan = new Scanner (System.in); //Input Ages System.out.println("Enter 1st Age: "); age=scan.nextInt(); System.out.println("Enter type: "); type=scan.nextInt(); ages.setAges(type, … | |
Re: You should change your while loop as follow: As well, you need to re-initialize your index to zero, each time you are verifying. [code] int index = 0; while (goodSoFar && index < 6) { // your checking here ... } index = 0; while (goodSoFar && index < 6) … | |
Re: Google Java connectivity. (JDBC) | |
Re: If your question is about accessing the excel as your DB, then: Microsoft provides a driver for that, and you can use JDBC to access your excel (DB) like any other database. you need to create a data source for your excel (DB). | |
Hi all, In my program I am using RMI call to a service in a remote host. My program runs without any exceptions from within eclipse, since I have all the packages and jar files in my build path. However, the program needs to eventually run from the command line. … | |
Re: You cannot compare string with number, the way you are doing it. however you can compare strings with equals() or equalsIgnoreCase() methods of String. What is it that you try to compare, e.g. 0 to 9 , 10 to 19 and etc...? you are trying to compare a last name … | |
Re: - Open a command prompt - Type in: date - it prompts you for new date/time - enter new values. | |
Hi all, I would like to create a date object and specify a value. I am facing some defficulties. Here's what I tried: [code] String dateString = "2005-04-29 00:00:00.0"; Date asOfDate = new Date(dateString); // this gives Illegal argument exception. [/code] I know that Date constructor with String as argument … | |
Re: [QUOTE=abhi287;558650] I want to acess the rows from the excel [/QUOTE] If your question is how to access your excel file from your java program, then: Microsoft offers a driver, by which you can use JDBC to access it. Simply create a data source and you can simply use it … | |
Re: Try compiling your program with "-classpath" keyword. e.g. [code] javac -classpath <classpath> PublicGarage.java [/code] | |
Re: or: [code] public void actionPerformed(ActionEvent e) { if (e.getSource() == b1) { // b1 is clicked, do some action here } else if (e.getSource() == b2) { // b2 is clicked, do some action here } } [/code] | |
Re: [QUOTE=beatlea;552003]Hello, I am trying to write my first ever assignment in Java and am straggling with it. I have a superclass LivingThing and two subclasses, Monster and Human. Both subclasses have an attribute 'strength', but the maximum value of it is different for each of them. In my superclass I … |
The End.