36,051 Topics

Member Avatar for
Member Avatar for bhawna_5nov

I dont know whts wrong with the code... its in java..the error msg is shown while compilation i.e. class, interface , or enum exception.. plzz can anyone help me with this.. [CODE]import java.io.*; import java.security.*; import java.awt.*; import java.awt.event.*; import java.applet.*; public final class DiffieHellman extends java.applet.Applet implements ActionListener { …

Member Avatar for javinpaul
0
282
Member Avatar for stow19

hey all, I know this might seem like a basic question but we haven't really been taught it at university and I was getting curious. Once you've created your program and have all your relevant java classes/package and it has been compiled where do you find the .exe and how …

Member Avatar for stow19
0
201
Member Avatar for jamd200

[code=java] /*This is a small GUI application that I made for personal use. It allows you to enter the colors of the bands on a 4-band fixed resistor to calculate the resistance (and tolerance) of that particular resistor. Eventually, I will create a version that deals with 5-band and 6-band …

Member Avatar for jamd200
0
7K
Member Avatar for newcoder310

Hi, Can some1 plz explain wht is the advantage of Inversion Of Control concept of Spring. I know that there is no need to instantiate in the class and the container will do it like [CODE] Hello h = new Hello(); [/CODE] The above need not be given and we …

0
76
Member Avatar for Majestics

Can any one give a useful link to learn oracle report server and also how to connect it with java application.... Thank you. Require second question answer....

Member Avatar for Majestics
0
137
Member Avatar for Majestics

[code]"insert into invoice(sno,entrydate,invoicedate,companyname,party,station,purchase,avail,sale) " + values("+Integer.getInteger(head.getSerial().getText())+",to_date('"+head.getEntryDate().getText()+ "','dd/mm/yyyy')"+",to_date('"+head.getInvoicedate().getText()+ "','dd/mm/yyyy')"+",'"+head.getCompany().getSelectedItem()+"'"+"'"+head.getParty().getSelectedItem()+"','"+head.getStation().getSelectedItem()+"',"+Integer.getInteger(head.getPurchase().getText())+",1,"+Integer.getInteger(head.getSale().getText())+")"); [/code] SNO NOT NULL NUMBER(38) ENTRYDATE DATE INVOICEDATE DATE COMPANYNAME VARCHAR2(50) PARTY VARCHAR2(50) STATION VARCHAR2(50) PURCHASE NUMBER(10,2) AVAIL NUMBER(1) SALE NUMBER(10,2) Whats wrong in this query.... I am getting sqlException ....

Member Avatar for peter_budo
0
92
Member Avatar for PHIPH

hello, Am new to Java and i just installed jdk, but i failed to set the paths correctly since am missing some paths am supposed to edit as the procedure says, any one having an idea pliz help me, thanx

Member Avatar for NormR1
0
65
Member Avatar for I<LateNupurGuha

A [B][I][U]concept[/U][/I][/B]:icon_rolleyes: has grown, may be it as wrong or right, that in Java [COLOR="Green"]if we do not take the help of [I]thread class[/I] or [I]runnable interface[/I] at all then also several threads get executed there[/COLOR]; If so how it happens with other languages where there is no concept of …

Member Avatar for Majestics
0
100
Member Avatar for sirlink99

I am trying to read a custom file extension When reading a string from the file it output the correct string, however when I attempt to read an int it does not output the correct int. Here is my code: [CODE] import java.awt.event.*; import java.awt.*; import java.io.BufferedReader; import java.io.FileInputStream; import …

Member Avatar for NormR1
0
276
Member Avatar for xThrash

Hello everyone, I have some code to sort a random array of integers, although im getting an error whenever I try to run the method. It prints the input and then I get an error. The code is below and the error is below that. If anyone could help me …

Member Avatar for stultuske
0
882
Member Avatar for register86

Hi everybody! I am implementing my undergraduate thesis with subject "object extraction in a video shot". I haven't studying signal processing topic when i majored in computer science, so this subject is very strange to me. I knew this problem associates with image segmentation issue,thats all, maybe having else one …

Member Avatar for stultuske
0
85
Member Avatar for MoZo1

Original question:[url]http://forums.sun.com/thread.jspa?threadID=5323307[/url] [quote]So I would like to include a bean into the same project (as a separated library of course) that uses it, so the project would be self containing, and the bean's code would stay in syncron with the program's one, even if I move it to another computer. …

Member Avatar for MoZo1
0
181
Member Avatar for Majestics

When we define a new variable for frame it hold "null" value, but what it contain when we close that frame?

Member Avatar for Majestics
0
300
Member Avatar for slawson01

This is code generated for my Algorithm Implementation's class. I was to create my own RSA public and private keys using modPow and modInverse and use that to implement a digital signature. That works great, not the problem here. For extra credit I am implementing a digital envelope that will …

Member Avatar for slawson01
0
239
Member Avatar for xhalcyon

I'm new to java and having trouble. I need to take a class I wrote and write a test applet for it to see if it works. The applet is supposed to have a length label, an input for it, an width label, an input for it, a button to …

Member Avatar for sirlink99
0
107
Member Avatar for masterofpuppets

Hi all, I searched this topic and found a couple of posts but I couldn't find what I am looking for. Here's the problem - I am trying to send an image to a client (browser in this case) over a socket. After the image is received I am trying …

Member Avatar for masterofpuppets
0
9K
Member Avatar for skiabox

I am reading murach's book about jsp and servlets. He uses netbeans(I am using intellij idea) and I am at a point when he uses the META-INF folder that netbeans creates to save a context.xml file there that contains a Resource tag with information about a connection pool. The problem …

Member Avatar for skiabox
0
290
Member Avatar for Majestics

Oracle accept dates in '00-JAN-0000' format, is there any way i can change it to '00-01-0000'.

Member Avatar for debasisdas
0
162
Member Avatar for sirlink99

I have this key listener in my application, and it wont work. This is my first key listener in an application, however I have done a mouse listener in one before. Anyway here is my code: [CODE] import java.awt.Graphics; import java.awt.event.KeyEvent; import java.awt.event.KeyListener; import javax.swing.*; public class DropGame extends JPanel …

Member Avatar for sirlink99
0
521
Member Avatar for wizzwig

hello, i have an educational compiler construction project that does not have to be hectic but a simple one using java to construct the compiler. It has to compile some of the set of java language, libraries, objects, and controls. it also requires all facets of a standalone compiler (parser …

Member Avatar for JamesCherrill
0
209
Member Avatar for sabrina_singh

hey can anyone help me out......... I am trying to connect 2 processes on a single computer using socket programming in java....how can i connect such 2 processes....pplllzzzz help me out

Member Avatar for JamesCherrill
0
42
Member Avatar for Vern247

[URL="http://sourceforge.net/projects/pmd/"]http://sourceforge.net/projects/pmd/[/URL] [QUOTE]PMD is a Java source code analyzer. It finds unused variables, empty catch blocks, unnecessary object creation, and so forth.[/QUOTE] I've been tasked to write customised rules to find the following: [LIST] [*]Instances where Double.ValueOf was used to parse a string to a double [*]Instances where Float.valueOf was used …

1
94
Member Avatar for nisrin

im creating a website that deals with the monthly reminders (extracted from Oracle) for my members for a school project. Should I create a login page using JSP or servlets? I am unfamiliar in both the languages. Will I need to establish my connection for each page if I use …

Member Avatar for javaAddict
0
1K
Member Avatar for PHIPH
Member Avatar for newcuser

Hello. I am working on a little Java project and have gotten a little stuck. May I have a little help please? First the original class and then the test class code here. Thanks!! [CODE]public class PhoneBookEntry { private String name; private String number; PhoneBookEntry(String string, String string2 ){ } …

Member Avatar for stultuske
0
440
Member Avatar for manish250

hi all i have start working on java rmi currently.i using this tutorial to write my first java rmi program. [url]http://www.javacoffeebreak.com/articles/javarmi/javarmi.html[/url] i started the rmiregistry.then i compile server file and generate the stub file using rmic.Now when i am running the server using java command it is giving following exception …

Member Avatar for ~s.o.s~
0
262
Member Avatar for sid78669

Hi All, This is the first time I'm using Java to connect to my online MySQL database that is hosted by a separate web host. Following is the code in use: (I've removed the server url, username and pass for obvious reasons. They all work when I use them in …

Member Avatar for sid78669
0
641
Member Avatar for sirlink99

Hello. I am trying to make a program that has a menu. When you click play , it should (for now) output the text "In Game". It does that. However, it prints the text on a new JFrame. I would like it to print it on the same frame. How …

Member Avatar for sirlink99
0
132
Member Avatar for skiabox

I have seen in many servlets that doPost and doGet are declared public or protected. What is the purpose of declaring a doPost or doGet as protected? Thank you.

Member Avatar for stultuske
0
77
Member Avatar for zahidmaqbool

Hi, I have got a problem which has left me banging my head against the wall. Anyways, here is my situation. I've got to scan for a directory continuously and as soon as I've got a CSV file in it. I need to process that CSV file and pass on …

Member Avatar for stultuske
0
126
Member Avatar for xThrash

Hello, For some work I have to implement the selection sort algorithm on an array list, I dont really know how to do this. I have started off the code but I just need to actually implement the selection sort! This is proving to be the stumbling block. Here is …

Member Avatar for NormR1
0
2K
Member Avatar for dark_sider_1

I've been trying to create a Hangman game in Java, and I have a string that looks like "_____" for a certain number of letters that they are supposed to represent. How would I replace just one of those, rather than all? I've heard that you can't replace an underscore …

Member Avatar for hfx642
0
260
Member Avatar for dharma117

How to upload a photo in mysql database using Browse Button.that means i want to upload the photo in databse anywhere from hard disc using Brawse button.. please help me ..

0
62
Member Avatar for baby_c

hello friends, I got a problem with an object array.I'll write a sample code for understand the problem.I declared an array of objects named item. [CODE]item[] itemAr = new item[100];[/CODE] And then I initialized some of them [CODE]itemAr[0]=****; itemAr[1]=****; itemAr[2]=****;[/CODE] I want to know that is there a way to …

Member Avatar for baby_c
0
187
Member Avatar for coding101

Im having trouble implementing my own ordered linked list from scratch. [CODE] public class LinkedList{ Node head,tail; public LinkedList(){ head=tail=null; } public LinkedList(Node node){ this.head=new Node(node.num); this.tail=new Node(node.num); } public static void main(String[] args){ LinkedList list=new LinkedList(); list.insert(new Node(7)); list.insert(new Node(3)); } public void insert(Node node){ if(head==null){ head=node; tail=node; } …

Member Avatar for NormR1
0
99
Member Avatar for newbie14

Dear All, I have an application where I got few different sql queries that I would like to have an ACID properties. I have now setAutoCommit false. Where best to put commit and rollback statement? [CODE]try { [INDENT]dbconn = DriverManager.getConnection("jdbc:mysql://192.168.1.45:3306/***?"+"user=****&password=*****"); dbconn.setAutoCommit(false); stmt = dbconn.createStatement(); String selectQuery2 = "Select * from …

Member Avatar for newbie14
0
285
Member Avatar for geekme

I work on ubutnu 10.10 and have java installed on my machine ( jdk 1.6.0) cause when I type java -version on terminal ,it gives me the details.But when i try to open eclipse , it says no jre or jdk found etc, .Please help.

0
77
Member Avatar for matthewkeating

Hey guys I need a little bit of help. I am writing a program that generates 100 random numbers and then stores then in an arrays (2, even and odd numbers) I need a little help with passing the array into the function and generating random numbers. What am I …

Member Avatar for matthewkeating
0
427
Member Avatar for triumphost

Hi guys, I'm currently switching from mechanical engineering to Computer Programming analyst in September so I have a few months to learn how to do this.. What I want to do is make a Bot for a game.. The game is written in Java and I want to load it …

Member Avatar for m4ster_r0shi
0
170
Member Avatar for Majestics

[code] import java.awt.event.ItemEvent; import java.awt.event.ItemListener; import javax.swing.DefaultCellEditor; import javax.swing.JComboBox; import javax.swing.JFrame; import javax.swing.JScrollPane; import javax.swing.JTable; import javax.swing.table.DefaultTableModel; public class main implements ItemListener { String[] a = {"one","two","three"}; String[] b = {"4","5","6"}; String[] c = {"7","8","9"}; String[] d = {"10","11","12"}; String[] e = {"13","14","15"}; JComboBox a1 = new JComboBox(a); JComboBox b1 …

Member Avatar for Majestics
0
234
Member Avatar for stevanity

Im trying to make a calculator and I thought of using the ScriptEngine class to evaluate expressions. So I designed the following code: CalculatorFrame.java : [CODE] import java.awt.*; import java.awt.event.*; import javax.swing.*; import java.lang.Math; import javax.script.ScriptEngine; import javax.script.ScriptEngineManager; public class CalculatorFrame extends JFrame { public CalculatorFrame() { setTitle("My Scientific Calculator"); …

Member Avatar for stevanity
0
2K
Member Avatar for new_developer

Hi everyone, I am new in Java programming. I want to know that how to check integer variable whether it is null or not. I have a situation I write a program that asks that how old are you. If a person accidentally press enter and does not put a …

Member Avatar for JamesCherrill
0
48K
Member Avatar for AurosGamma

Hello, i'm here to ask you for some help, i have done several applications/games in different programing languages, most of them without planification. For example,i wrote a five-in-a-row game in C++ with A.I (simple heuristic functions) without making sketchs or things like that, i started programing just to see what …

Member Avatar for stultuske
0
141
Member Avatar for thomas6188

Hi everyone, I am using netbeans 6.8 version. I was trying to learn servlet by working around.So i created a html file ,in which i placed a form whose action is given as "login.java" which is a servlet file. But when i run the program and click on the button …

Member Avatar for dresses623
0
156
Member Avatar for Majestics

when i click on a column on which editor is attached , the getselectedrow return -1 ...... I have also tried list selection listener but nothinhg work properly.... i dont think it need code.... Please help.....

Member Avatar for mKorbel
0
234
Member Avatar for itsmeisuru

Hi The error I stated in the title appears when I try to run the following code in Eclipse. I have created the Table which is named as "Emp" in Microsoft SQL Server. I can't find the error I have done here, and I googled but nothing helped me.. Plz …

Member Avatar for masijade
0
2K
Member Avatar for divyakprabh

Hi, I have problem deploying ear's in jboss application server. I have a ear, which has the this structure test.ear /META-INF /dependency jars When i deploy this application under non scoped isolation, it works fine but i want my application to be deployed in scoped isolation. The exception what i …

0
104
Member Avatar for thanatos1

Hey guys, i've been trying to clone pokemon in java but i've come across a very weird problem. [CODE]java.lang.VerifyError: (class: attribute/base/health/AbstractBaseHealth, method: <init> signature: ()V) Constructor must call super() or this() at actor.pokemon.AbstractPokemon.<init>(AbstractPokemon.java:44) at actor.pokemon.charmander.AbstractCharmander.<init>(AbstractCharmander.java:16) at actor.pokemon.charmander.ConcreteCharmander.<init>(ConcreteCharmander.java:11) at main.Main.<clinit>(Main.java:17) Could not find the main class: main.Main. Program will exit. Exception …

Member Avatar for thanatos1
0
371
Member Avatar for marsangel

Hi! I am having problems with my login form. So I created a database for my login form so that i can create multiple user. That works fine but when I try to log in the user created an error shows: Error: [CODE] java.sql.SQLException: No row count was produced at …

Member Avatar for marsangel
0
340
Member Avatar for kukuruku

I am confused with the optimized quick sort little help please [CODE] public static void quickSort(int []A,int p,int q){ while(p<=q) { int r = partition(A, p,q); quickSort(A, p, r); quickSort(A, r+1, q); } } static int partition(int []A, int p, int q) { int a=A[p]; int lp=p-1; int rp=q+1; while(A[rp]<a) …

Member Avatar for stultuske
0
99

The End.