32,199 Topics

Member Avatar for
Member Avatar for Devendra1

I have created a simple struts application, my context name is --- > /LetStart I am using struts 1.3 When I am deploying this application to JBOSS 4.2 It is throwing deploy time exception, pls see below:-- 22:31:14,046 WARN [JAXWSDeployerHookPreJSE] Cannot load servlet class: org.apache.struts.action.ActionServlet 22:31:14,078 INFO [TomcatDeployer] deploy, ctxPath=/LetStart, …

0
104
Member Avatar for axn

getting error when compiling. "java:60: non-static variable inventory cannot be referenced from a static context for (String show : ProductDB.inventory)" the showCodes class has to public static void. Here is code [CODE]import java.util.*; import java.text.*; public class ProductApp { public static void main(String args[]) { // display a weclome message …

Member Avatar for axn
0
130
Member Avatar for DARK_BYTE

Hi wat's wrong with my "do while" loop it never allows me to enter the grade even if I enter 'A' or 'B' or 'C'..? [code] import java.util.Scanner; public class ArraysOfStudentDetails { public static void main( String [] args ) { Scanner in = new Scanner( System.in ); final int …

Member Avatar for Jocamps
0
99
Member Avatar for Serpterion

Hello there. I've been contemplating on this matter for sometime, and now I'm left stumped. I'm a college student taking a Java 2 course, and was given an assignment that i've nearly completed except one problem. The program description asks you to read from a binary file using the .readUTF(); …

Member Avatar for llemes4011
-1
198
Member Avatar for gibson.nathan

im trying to get the same heat index that prints int the program to write to a file. i have copied the procedure from another program that worked correctly. any help is appreciated. import java.io.PrintWriter; import java.io.IOException; import java.util.Scanner; import java.io.File; public class HeatIndex { public static void main(String [] …

Member Avatar for gibson.nathan
0
103
Member Avatar for didi00

Hello everyone, can someone help me with this please? Create class which will create tables in data base (Microsoft Access). About the tables: number of columns, type of data, lenght of the data. And mantaining the information (the data) in the tables- add data, delete data and edit data. So …

Member Avatar for Jocamps
0
152
Member Avatar for jawaharl0207

Hi friedns, //Demonstrate the clone method [code=Java]class TestClone// implements Cloneable { int a; double b; TestClone cloneTest(){ try{return (TestClone)super.clone();}catch(CloneNotSupportedException e){System.out.println("cloning not allowed");return this;} } }[/code] [code=Java]class CloneDemo1 { public static void main(String[] args) { TestClone x1=new TestClone(); TestClone x2; x1.a=10; x1.b=20.98; x2=x1; //x2=x1.cloneTest();//clone x1 //System.out.println(x2==x1); // System.out.println(x2.equals(x1)); System.out.println(x1.a+" "+x1.b); System.out.println(x2.a+" …

Member Avatar for Jocamps
0
101
Member Avatar for new@java

Hi. Im working on a problem and Im having trouble with it. In the class Mymath, write a method called lab51 that reads three doubles a, b and c followed by one non-negative integer k, and prints the values of the function `y = ax2 + bx + c` for …

Member Avatar for Jocamps
-1
141
Member Avatar for locked_twilight

package MyJava; //change package name according to what the name of the package //the class would be installed to import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; public class [B]Calculator[/B] extends JFrame implements ActionListener{ private JTextField displayText = new JTextField(30); private JButton[] button = new JButton[16]; private String[] keys = …

Member Avatar for locked_twilight
0
943
Member Avatar for nikolai04

i have a tictactoe java code that has mouse events in it. my professor wants me to run it in a mobile phone... can anyone help me with that? please... thanks in advance.

Member Avatar for peter_budo
0
64
Member Avatar for mactavish

i am new in j2me programming and i want to code a file compression/decompression in series 40 phones. anyone could help me or could share their codes with me. thank you very much

Member Avatar for quuba
0
67
Member Avatar for leegeorg07

Hi, the site [url]http://932gs.co.cc/secure_site.html[/url] loads fine for ie and chrome/chromium but for some reason the javascript wont load, can people verify this and if it is true, how can I fix it?

Member Avatar for leegeorg07
0
94
Member Avatar for newjavastudent

Hi all, could anyone tell me how to read a unorder file into order output, I wrote a method that only read order file(begin with product). The following is my code. My input file like this: product Apples location 10 Downing Street London England quantity 382764 location Akihabara Tokyo Japan …

Member Avatar for quuba
0
75
Member Avatar for shroomiin

hello everyone. when working with objects, how would one specify that the input of negative numbers is not allowed in the constructor part of the code?

Member Avatar for Jocamps
0
119
Member Avatar for gretty

Hello I'm new to java & I am trying to convert a float to a string in my simple program. But I get an error on that line. Can you tell me why or what I need to do to fix it? Maybe I haven't imported the right things or …

Member Avatar for Jocamps
0
192
Member Avatar for RoflNinja

Hey, ran into a little trouble with this, keep getting this error. I went over it many times, but can seem to find where the curly bracket is missing or if I have too many or so. [CODE]import java.lang.*; /** * Carries out the instructions from all the objects. * …

Member Avatar for quuba
0
173
Member Avatar for Sinh

Okay, we are on the third assignment in Java, Java, Java. I do not understand the book that well and while I have been searching google for something explained in simpler terms it hasn't came up. We have two files: OneRowNim2.java and Assign3.java The specifications were: You are to create …

Member Avatar for Sinh
0
176
Member Avatar for ShailaMohite

Hello.Can anyone tell me how to differentiate between voice packet i.e. real time packets and data packets i.e. non-real time packets while simulating the network using java network simulator.(jns 1.7) Is there any way to identify the packet header in order to check it! Please help me.Its urgent!

0
62
Member Avatar for ankiwalia

Hi all, i am new to java servlets. i simply created a login form with username and password fields. now when i deployed it on tomcat server, after i click on submit button it gives the following error: java.sql.SQLException: Column not found codin of this login servlet is attached below. …

Member Avatar for ankiwalia
0
206
Member Avatar for low1988

i am creating a bank application with connection of MS ACCESS Database which is already construct a table with the following statement [CODE] Statement stmt = con.createStatement(); stmt.executeUpdate("CREATE TABLE ACCOUNT " + "(AccName VARCHAR(32), AccNum INTEGER, Deposit FLOAT, " + "Balance FLOAT, Withdraw FLOAT)"); [/CODE] So everything works fine ,the …

Member Avatar for javaAddict
0
123
Member Avatar for kulrik

Im having trouble with this problem: The Maclaurin series for arctan(x) is a formula which allows us to compute an approximation to arctan(x) as a polynomial in x. The formula is: arctan(x) = x - x3/3 + x5/5 - x7/7 + x9/9 - x11/11 + . . . Write a …

Member Avatar for javaAddict
0
311
Member Avatar for talablink

I got this code but there seems to be a problem an error showing Error javax.microedition.media.MediaException: Player cannot be created for audio/basic I don't know how to fix it.. Does anyone have an idea? Thanks [CODE]import java.io.*; import javax.microedition.midlet.*; import javax.microedition.lcdui.*; import javax.microedition.media.*; import javax.microedition.media.control.*; public class RecordMIDlet extends MIDlet{ …

0
97
Member Avatar for kulrik

Homework help Up Vote 0 Down Vote #1 24 Minutes Ago | Add to kulrik's Reputation | Flag Bad Post Im having trouble with this problem: The Maclaurin series for arctan(x) is a formula which allows us to compute an approximation to arctan(x) as a polynomial in x. The formula …

Member Avatar for darkagn
-1
81
Member Avatar for TigerGirl

Hi I am trying to find out the complexity class estimate of algorithms. So, the first one is f(100) = 20, f(200) = 76, f(400) = 325, so would that be O(log2 N)? And then f(100) = 100, f(200) = 119, f(400) = 139, and this would be O(1) like …

0
62
Member Avatar for TigerGirl

Hi I have a method that has a reference to a linked list and an int that is the value. I want to recursively call that value to count and return how often that value is in the linked list. So, here is what I got: [CODE]public static int find(LinkedNode …

Member Avatar for TigerGirl
0
105
Member Avatar for kulrik

With this problem. I finished the coding, but my output is displayed in Radians instead of Degrees. Can anyone help? Here's my coding: public class MyMath { public void displaySin() { int angle = 0; System.out.println("Angle\tSin(Angle)\tValue"); while(angle<=360){ final double RADIANCONST=180; double angleRadian; angleRadian = Math.sin((RADIANCONST*angle)/RADIANCONST); System.out.printf("%d\tSin\t(%d)\t%5.2f\n",angle,angle, angleRadian); angle = angle …

Member Avatar for kulrik
-1
81
Member Avatar for oneat

I'm using netbeans graphic intarface to create my own JPanel. But I have a problem. When I change panel's layout in grid one I can only place cells on left and right side only of others. So instead of 2x2 I can only make 4x1. Do you know what shoyd …

Member Avatar for BestJewSinceJC
0
120
Member Avatar for iamsmooth

So I have an interface program called: IstackInterface.java, which contains method declarations and it compiles fine. I put it in a package we call package abc. Now I have another java program called IArrayStack.java that says: [code] public class IArrayStack implements IStackInterface { // code goes here } [/code] But …

Member Avatar for BestJewSinceJC
0
146
Member Avatar for jimmylee

How do I convert the Integer to String by: 1. Asking the user to input the number (Eg: 704 = Seven Hundred and Four) 2. Display the output in JTextArea. 3. Using Arrays Thanks for your support.

Member Avatar for BestJewSinceJC
-2
82
Member Avatar for sxk

Hi can you please help me with the following code program as I am new to java. [B][U]Step1: define the interface named Ashape[/U][/B] write an interface called Ashape that defines: double DEFAULT_SIZE equal to 1.0 [by default it is constant] method calcPerim() that returns a double equal to the perimeter …

Member Avatar for javaAddict
0
117

The End.