32,199 Topics

Member Avatar for
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
257
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
635
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
129
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
75
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
123
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
250
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
185
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
96
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
282
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
75
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
423
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
167
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
231
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
138
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
230
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
102
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
364
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
330
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
94
Member Avatar for tipster3000

Hello. I need to reproduce this pattern using one main for loop and one nested for loop. I cannot seem to figure out the right way to do this. I came close, but not close enough. 0 10 210 3210 43210 543210 6543210 76543210 876543210 9876543210 [code]for (int x = …

Member Avatar for JamesCherrill
0
696
Member Avatar for syeda amna

Hi is it possible to use static variables with servlet. I want to access static variable from servlet but it gives null value. Why??

Member Avatar for syeda amna
0
76
Member Avatar for hfx642

I've got a JScrollPane that I would like to scroll horizontally ONLY. I've added a Row Header with setRowHeaderView (on the Left side), but I would like to add a "Row Footer" (on the Right side). There is no setRowFooterView! Any ideas of how to do this? Will I have …

0
91
Member Avatar for winecoding

I opened the .bashrc file on a system, which includes [CODE]export JAVA_HOME=/usr/lib/jvm/java-1.6.0-sun.x86.64[/CODE] After typing [CODE]whereis java[/CODE], the system prints out [CODE]java: /usr/bin/java /etc/java /usr/lib/java /usr/share/java /usr/share/man/man1/java.1.gz [/CODE] It seems to me that none of the above path matches the JAVA_HOME set up in bashrc file. Can you let me know …

Member Avatar for stultuske
0
248
Member Avatar for tom543

please help me! Fullfill 10 philosophers eating and thinking transaction at least 5 times and make them to be full.(with java) My Best Regards...

Member Avatar for tom543
0
193
Member Avatar for vextorspace

I have an JOGL based opengl program that uses textures on flat surfaces. After a texture is put on a surface, it will eventually crash. If the textures are small, it takes a while. I managed to reproduce it with a simple program: [CODE] package org.yourorghere; import com.sun.opengl.util.Animator; import com.sun.opengl.util.texture.Texture; …

Member Avatar for vextorspace
0
197
Member Avatar for eagl09

Keep getting reached end of file while parsing error I have been told this error is from extra or missing closing brace in code..CANNOT find where it is at. any help?? [code] import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import javax.swing.JButton; import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTextField; public class BasicCalculator { private static …

Member Avatar for rubberman
0
332

The End.