35,618 Topics

Member Avatar for
Member Avatar for mith_cool

Exception in inserting date into database [CODE] String Fname= request.getParameter("txtfname"); String Lname= request.getParameter("txtlname"); String Uname=request.getParameter("txtuname"); String Pass=request.getParameter("txtpass"); String Email=request.getParameter("txtemail"); String Gender=request.getParameter("group1"); String Add=request.getParameter("txtadd"); java.sql.Date sqlDate = new java.sql.Date(new java.util.Date().getTime()); //out.println(""+Fname+Lname+Uname+Pass+Email+Gender+Add); Connection con= null; //if(Fname != null && Lname != null && Uname != null && Pass != null && Email …

0
84
Member Avatar for cozmo87

Hi guys, I'm making a class for importing a table from a text file with tab delimited data. It works perfectly as long as there are no empty cells in the text file. (see attached example) Any suggestions how to detect an empty cell and what to fill the ArrayList …

Member Avatar for JamesCherrill
0
110
Member Avatar for Xufyan

Hello everyone, i was reading java tutorials on the internet then i saw this program, [CODE] class Cat { private String mCatName; Cat(String name) { mCatName=name; } public String getName() { return mCatName; } public void setName(String strName) { mCatName = strName; } public void messWithCat(Cat kitty) { kitty = …

Member Avatar for JamesCherrill
0
276
Member Avatar for mynameissiva

hi folks, Here i face problem in my webpage [servlet + mysql] Connection are working fine. But when running time it get download the page instead of display the content in the browser. I try myself so many time, cant sove it.. plz guys help me to overcome this problem. …

Member Avatar for mynameissiva
0
254
Member Avatar for ankit.pandey3

Hi friends.... I want to execute my first servlet but i am not able. I am going to explain what steps I did. 1-First I copy "Servlet-api.jar" from lib folder in tomcat and paste it in ext folder of java. 2- Create HelloWorld.java in somewhere in my hard drive [CODE]import …

Member Avatar for mynameissiva
0
354
Member Avatar for kishanillur

I am writing some application for Android. Here my app receives sms and as soon as it receives, it launches another activity,say a browser with some url supplied. So here, I need two classes, broadcastReceiver( to receive sms) and Activity. But in java i can inherit only 2 classes. Since …

Member Avatar for JamesCherrill
0
244
Member Avatar for MagnetoM

I would like to learn java. Can anyone recommend an up to date java book. There seems to be many java versions, if that is the correct term of course, such as jdk 5, jdk 6 etc. Which one is good to learn. I posted this in a different thread …

Member Avatar for pro_learner
0
108
Member Avatar for darwin_nacional

Hi guys, I'm trying to add a splash screen on my app but I can't seem to follow the instructions here in: [url]http://download.oracle.com/javase/tutorial/uiswing/misc/splashscreen.html[/url] ... creen.html I'm using netbeans and I can't understand where to put the gif file. I have also tried editing the manifest.mf but I can't make it …

0
103
Member Avatar for Jake.20

Guys need help. i'm having problem in setting the font-size of my jtfText. every time i set the font-size of jtfText all the panels and buttons is also getting bigger but not their font-size just the buttons. This is my code [CODE]import java.awt.*; import javax.swing.*; import java.awt.event.*; import javax.swing.event.*; import …

Member Avatar for Ezzaral
0
208
Member Avatar for sunjcarkey

i'm not too familiar with java...though... actually i'm trying to insert the values entered by the user into the access table but every time i click the add button on my application it shows [I]java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Syntax error in INSERT INTO statement. [/I] error... [CODE]String str="insert into …

Member Avatar for Ezzaral
0
380
Member Avatar for freesoft_2000

Hi everyone, I need to use something in java that is similar to the C language goto statement. This is what i have in a function [code] public int ret() { if { //something //something //This is the part where i need to jump to the end of the //function …

Member Avatar for Ezzaral
0
150
Member Avatar for magnetic rifle

Hello, Is there someway that I can randomly assign an x y and z axis to a geometirical object? Any programming language is fine just need some insight. Thank you, Suhail Rawal

Member Avatar for sirlink99
0
83
Member Avatar for ARaza110

Hi, I wanted to understand a java code that i picked from a website RoseIndian.net. It is about Binary Search three implementation in java. Can someone please explain how the retrieval of the node values [node.value] in the method "[B]printInOrder(Node node){}[/B]" being done, because the node.values are not being stored …

Member Avatar for ARaza110
0
207
Member Avatar for lili.edryana

[CODE] public Integer countWeekday(Date startDate) { startDate.setHours(0); startDate.setMinutes(0); startDate.setSeconds(0); }[/CODE] I have this function and a parameter passed to it. setHours,setMinutes and setSeconds are deprecated. What else can i use?

Member Avatar for mKorbel
0
114
Member Avatar for Jessurider

how can i make the border line to the position shown in the attachment [CODE] package proj; import java.awt.BasicStroke; import java.awt.Color; import java.awt.print.PrinterJob; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.geom.Rectangle2D; import java.awt.print.Book; import java.awt.print.PageFormat; import java.awt.print.Printable; public class j extends javax.swing.JFrame { public int st,i,k1,k2;PrinterJob printJob = PrinterJob.getPrinterJob(); String str[]=new String[20]; …

Member Avatar for NormR1
0
179
Member Avatar for nikelin

Hi, guys! I really cannot describe my problem with a words, so I record debug process in a video. Here it is: [url]http://www.youtube.com/watch?v=5EVwNhdQ8o4&feature=player_detailpage[/url] Track changes of a IFormField<T>.this.value and object ID's in a memory and you understand what I mean.

Member Avatar for nikelin
0
119
Member Avatar for Jessurider

can anyone tell me how here the count of [B]st[/B] is [B]incrementing[/B] like this[B] 2,4,6,8,10 and not like 1,2,3,4,5 [/B] how could i get the count of [B]st[/B] to increment as [B]1,2,3,4,5[/B] [CODE] PrinterJob printJob = PrinterJob.getPrinterJob(); Book book = new Book(); for(int i=0;i<5;i++) { book.append(new IntroPage(), printJob.defaultPage()); } [/CODE] …

Member Avatar for Jessurider
0
280
Member Avatar for kemplu

Hello, I'm new in java and must make a dummy server client connection (webserver) that check if the client has the actual software (actual version) and send links (in .txt or something else, if any update available). I'd like to make a program as simple as possible. I am using …

Member Avatar for kemplu
0
242
Member Avatar for dangari

My java application has been running smoothly for the last 2 years in one linux server. Recently, we moved it to another linux server and it's then that it started giving the error as shown below: [CODE] java.sql.SQLException: Prepared statement needs to be re-prepared at com.mysql.jdbc.SQLError.createSQLException(SQLError.java:946) at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2870) at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1573) …

Member Avatar for dangari
0
3K
Member Avatar for icehiro

I'm quite new to programming and I've just started Java, I'm not sure about why my program is stuck in a loop - [CODE] import java.util.Scanner; public class Tplayer { static int numplayer; static int startvalue; public static int dice1; public static int dice2; public static int bet = 20; …

Member Avatar for sirlink99
0
167
Member Avatar for yapaarachchi

I want java code for image aligning.Actually I want to produce image, using several same images.Can anyone give me help??????

Member Avatar for sirlink99
0
95
Member Avatar for vbx_wx

This is how I want my XML file to look: [code] <root> <data> <track src="123456"> <desc id="1" mt="audio/mp3" ra="24" dr="221" nv="10005761">Madonna - La Isla Bonita</desc> <clipdata>PD94bWwgdmVyc2lvbj0iMS4wIiBlb</clipdata> </track> </data> <completed/> </root> [/code] And this some part of my code: [code] AttributesImpl atts = new AttributesImpl(); AttributesImpl atts2 = new AttributesImpl(); AttributesImpl …

Member Avatar for peter_budo
0
242
Member Avatar for mith_cool

I only wanted to print the value in the string variable fname but somehow am not able to use the jsp tags effectively. [CODE] <%@page language="java" import="java.util.*" %> <% Cookie[] c= request.getCookies(); if(c==null) { response.sendRedirect("index.jsp"); } else { for (int i=0; i<c.length; i++) { if(c[i].getName().equals("Cuname")) { try{ Connection con=null; Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); …

Member Avatar for masijade
0
117
Member Avatar for yumyam09

Can anyone show me a sample program that can turn on a computer automatically on scheduled time..please show me so that i have an idea what it look like.. thnx ^_^

Member Avatar for stultuske
0
188
Member Avatar for ARaza110

Can someone help me please. I am using a Scanner Class and want to count characters entered in the textfield. Unfortunately, backspace and any key (Ctr,Alt,Capslock) for that matter is counted as a character and that increments the counter by 1. Here is the code [code] String ab="^[A-Za-z0-9]+$"; public void …

Member Avatar for ARaza110
0
701
Member Avatar for rayden150

Please Help, im trying to run the emulator on my WINDOWS VISTA I really dont know why it doest woork!, It just stays at this huge black screen which I know isnt normal, it should be smaller.. I have the ANDROID SDK 3.1 and have ECLIPSE HELIOS and I think …

Member Avatar for hithirdwavedust
0
418
Member Avatar for jason_joseph60

[CODE]import javax.swing.*; import javax.swing.JButton; import java.awt.*; import java.awt.event.*; public class CreateTabbedPane extends JFrame implements ActionListener { JButton b1; JTextField txt1; public CreateTabbedPane() { JFrame frame = new JFrame("Tabbed Pane Frame"); frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE); JTabbedPane tab = new JTabbedPane(); tab.addTab("Jay",new abc()); tab.addTab("RD",ram a); } class abc extends JPanel { public abc() { txt1=new …

Member Avatar for NormR1
0
125
Member Avatar for Voldemort2

I need to parse a csv file, whose encoding format is in utf-16 format. Actually the csv file contains the list of directories to the file. for reading i used following code BufferedReader br = new BufferedReader(new InputStreamReader(new FileInputStream(str))); But the output i got is not in the correct format …

Member Avatar for NormR1
0
920
Member Avatar for azzaid

please anyone help me i take example from sphinx4-1.0beta6 but when i run it in netbeans this error appear run: Exception in thread "main" Property exception component:'dictionary' property:'fillerPath' - Can't locate resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/fillerdict edu.cmu.sphinx.util.props.InternalConfigurationException: Can't locate resource:/WSJ_8gau_13dCep_16k_40mel_130Hz_6800Hz/dict/fillerdict at edu.cmu.sphinx.util.props.ConfigurationManagerUtils.getResource(ConfigurationManagerUtils.java:483) at edu.cmu.sphinx.linguist.dictionary.FastDictionary.newProperties(FastDictionary.java:149) at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505) at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:287) at edu.cmu.sphinx.linguist.language.ngram.SimpleNGramModel.newProperties(SimpleNGramModel.java:97) at edu.cmu.sphinx.util.props.PropertySheet.getOwner(PropertySheet.java:505) at edu.cmu.sphinx.util.props.PropertySheet.getComponent(PropertySheet.java:287) …

0
103
Member Avatar for rahafrouz

hi! I want to start writing a project that recognizes speech and voice. first I want to know,have you ever seen a project like this,written in java or any other languages? if no I know it is not a simple project that it can be found by requesting in a …

Member Avatar for azzaid
0
204

The End.