36,051 Topics

Member Avatar for
Member Avatar for shimama

Trying to read a file from the user that contains numbers which i use to calculate avgs, range, number of #'s and so on. I can't get it to work tho. Any critiques and help would be much appreciated. Thanks much double grade; //variable for entered grades double sum = …

Member Avatar for BestJewSinceJC
0
141
Member Avatar for prashant1111

i want to take input from keyboard and check which key is pressed if possible send the code. thank u.

Member Avatar for BestJewSinceJC
0
76
Member Avatar for PhiberOptik

I guys, I am working on a program that does remote desktoping and I am finding the biggest issue is that most people have routers which block most ports. What port do you recommend to create the least amount of difficulties with routers. (This program will be used for technically …

Member Avatar for PhiberOptik
0
94
Member Avatar for lllllIllIlllI

Hi I have a sorting applet that implements Bubble Sort and Insertion sort, and i have a couple of classes in my program. I made it using netbeans and i have no main class, and when i run it using this code: [code] <html> <applet code=Sorter.class width=800 height=300> </applet> </html> …

Member Avatar for lllllIllIlllI
0
368
Member Avatar for denniskhor

[CODE]{ String readPOS; readPOS = jTextArea1.getText(); String []POS; POS = readPOS.split("[-.!? ]"); jTextArea2.append("Part of Speech Result:\n"); String patternKGN,patternKPF,patternKK,patternKNA,patternKPA, patternKPC,patternKPK,patternKS; for(int i = 0; i < POS.length; i++) { try { File readKGN = new File("KGNLibrary.txt"); FileReader outKGN = new FileReader(readKGN); char[] buf = new char[(int)readKGN.length()]; outKGN.read(buf); patternKGN = new String(buf); …

Member Avatar for denniskhor
0
120
Member Avatar for denniskhor

[CODE] String readPOS; readPOS = jTextArea1.getText(); String []POS; POS = readPOS.split("[-.!? ,\n]"); jTextArea2.append("Part of Speech Result:\n"); String patternKGN,patternKPF,patternKK,patternKNA,patternKPA, patternKPC,patternKPK,patternKS,patternKNK; for(int i = 0; i < POS.length; i++) { if (POS[i].equals(POS[i].toUpperCase())) { jTextArea2.append(POS[i].toUpperCase() + "/KNK" + " | "); } }[/CODE] i ady split the input with "[-.!? ,\n]", for example …

Member Avatar for denniskhor
0
99
Member Avatar for stewie griffin

This is my code: [code]public boolean SetYear (String year) { if (year.matches("[0-9]{4}")) { _year=year; return true; } return false; }[/code] Instead of return false I want to make a runtime error with my massage. Something like "the value must be 4 digits" How can I do it?

Member Avatar for Ezzaral
0
171
Member Avatar for Christ1m

First write the method publi static lp append(lp head1, lp head2) It takes two lists and puts them together -- first the elements of head1, then the elements of head2. If head1 is empty, the answer is head2. Otherwise, use a recursive call to append head1.rest to head2. Now use …

0
60
Member Avatar for manfosys

HI Iam URL class to extract webpage . URL url = new URL(link);// for ex link="www.yahoo.com" like that Pgm is wrking fine.But while running it throws java.net.SocketException: Connection reset at this line while ((read = in1.read(buf)) != -1) {} Plz help me to solve this problem

Member Avatar for JamesCherrill
0
61
Member Avatar for artemis_f

I have the following code (this is just an example that I thought of for the concept I am having trouble with) [CODE]String fileName = "example3.txt"; Reader reader = new Reader(); ArrayList<String> vertices = reader.getVertices(fileName); Matrix m = new Matrix(vertices); Matrix m2 = m; m.setEdges(fileName); m2.print(); m.print();[/CODE] what I want …

Member Avatar for artemis_f
0
117
Member Avatar for heysebas

Hi guys, I'm writing a Java programme, one with GUI for a project in college. We separated the work into a few guys doing a few standalone Java classes. These standalone Java classes are run by doing the usual: java -jar XXX.jar through the console. The functions of the class …

Member Avatar for JamesCherrill
0
1K
Member Avatar for Miyuki Suzuki

Hello again, today is just not my day :( I had a problem with speed this morning and got help that totally solved it, so here goes hoping for some more help. [B]background:[/B] I have an ejb that picks up a file, copies it and the has to process the …

Member Avatar for Miyuki Suzuki
0
147
Member Avatar for K?!

Hi all We have to create a program that will require a lot of database interaction. I would like to create a JList with all events where a user can select an event he would like to edit. Is there a good way to store ID's into the list and …

Member Avatar for K?!
0
116
Member Avatar for jsplp

hello, I am trying to update data into MS access databace using jdbc,jsp.setString() of ResultSet is not working on memo datatype of MS access database.Can anyone help me wid the method tht can be used its urgent plzzzz!

0
46
Member Avatar for denniskhor

[CODE] private void jButton5ActionPerformed(java.awt.event.ActionEvent evt) { String readPOS; readPOS = jTextArea1.getText(); String []POS; POS = readPOS.split("[-.!? ]"); jTextArea2.append("Part of Speech Result:\n"); for(int i = 0; i < POS.length; i++) { if (POS[i].equals("makan")||POS[i].equals("kerja")) { jTextArea2.append((POS[i] + "/KK" + " | ")); } else if (POS[i].equals("sakit")||POS[i].equals("cantik")) { jTextArea2.append((POS[i] + "/KS" + " …

Member Avatar for denniskhor
0
99
Member Avatar for add4

Hi there, i am trying to create multiple clients connecting to the server. But the problem is that I can't set the Socket() constructor time.i.e by default the constructor waits to listen for 20 sec. My clients are many so that the time taking for those is hi. So that …

Member Avatar for JamesCherrill
0
109
Member Avatar for javaman2

hello again, i hate to be a bother but this is the third day im working on this assignment and i need a little help ill point out the 2 lines im having trouble with in my driver program(driver1) but ill supply you with the class definition and the driver …

Member Avatar for javaAddict
0
225
Member Avatar for Miyuki Suzuki

Hello everyone, I am having some difficulty with file handling, I hope someone can help. Here is the background: 1) I have to read a .dat file, file size varies from 692kb to 109.742kb with the following format of data: eg : ID|flag 1|y 2|y 3|y 4|y 4.37777451|y 5.52625317|y 2) …

Member Avatar for Miyuki Suzuki
0
106
Member Avatar for ckillackey

Ok, I have a homework problem that I'm needing some help with. The program has to Allow the user to specify the number of integers to be inputted into the array read a data set of number of integers into the array Determine the sum find the largest integer and …

Member Avatar for sillyboy
0
119
Member Avatar for nishantdaniweb

Hi All, I successfully deployed my application in Jboss server. My application is working file But my problem is when I first time access my application then I am getting the following error but after refresh or clicking on browser back button, I am not getting this error. This below …

0
92
Member Avatar for smithu.simi

Hello, i need to use fork() for the below problem Problem statement is program would accept various 2d arrays as inputs as long as the user wishes to enter.. Every individual sum of the array is calculated and sum of each array becomes the element of a resultant array and …

Member Avatar for BestJewSinceJC
0
112
Member Avatar for cronodevir

I have reinstalled serveral times for diffrent reasons, one of them being that javascript links all the sudden stopped working with no change in computer settings or software. Sence then, they have never worked, even after numerous reformats. I have the latest Firefox and IE, and the latest Java Enironment, …

Member Avatar for joshuastaple
0
404
Member Avatar for Andrewsc1

alright basically what the program does is convert Kilograms into pounds, then displays its on a table. There are two problems i am having the first one is getting rid of the even numbers. I've been trying combinations of modulator and the NOT expression and so far have been unsuccessful …

Member Avatar for Andrewsc1
0
109
Member Avatar for dammitjim30

Hi all! I am racking my brain trying to figure out why my code is not working for this TicTacToe board assignment. I keep getting the following error: Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 3 at TTTBoard.makeMove(TTTBoard.java:79) at TTTGame.main(TTTGame.java:59) Java Result: 1 The assignment calls for a 3-by-3 2-dimensional array of …

Member Avatar for dammitjim30
-1
452
Member Avatar for ^CurryPork^

Hi all, I am newbie for JSP.i want to create a simple website which provide search function from Database(MySQL). I downloaded Apache Tomcat ,MySQL and JDK 6 Update 12 with Java EE.Who can tell me how to setup this simple website ? help! Thank You! :-)

Member Avatar for peter_budo
0
89
Member Avatar for avi_2009

Hi Everyone: I am trying to use google code rest-client ([url]http://code.google.com/p/rest-client/downloads/list?can=1&q=&colspec=Filename+Summary+Uploaded+Size+DownloadCount[/url]) to query a REST web server. But, I could not use it properly as after logging in to the web server, the session expires immediately. I am just wondering if it is by design or I am doing something …

0
40
Member Avatar for shahab.burki

Hi, I want to read an integer value from console, but my input returns the ASCII value of integer, Please Help me. [CODE]import java.io.*; class Test{ public static void main(String args[])throws IOException{ BufferedInputStream br=new BufferedInputStream(System.in); System.out.println("Enter an Integer"); int i=br.read(); //int j=(int)i; System.out.print(i); } }[/CODE] Thanks

Member Avatar for ejosiah
0
116
Member Avatar for vasthan_2005

i have apache server and i want to access database by jsp what can i do please gve me steps actually iam at intially stage in jsp

Member Avatar for ejosiah
0
81
Member Avatar for javaman2

hi everyone, i need help with an assignment that i'm having trouble with. I need to create a class called Money whose objects represent amounts of money, with two instance variables of type int for the dollars and cents in the amount of money i got the constructors down but …

Member Avatar for darkagn
0
708
Member Avatar for coolbuddy059
Member Avatar for ejosiah
-1
93
Member Avatar for shailendranath

Hi, would anyone please tell me the latest encryption algorithm for the media file such as audio,video etc. Thanks in advance.

Member Avatar for ithelp
-1
45
Member Avatar for aparna_18

Hi all, I am working on Xalan-J XSLT processor.I have implemented the javascript extension function but in runtime it is showing TransformerException. Please help me on this. I am using `jdk1.6` and included `xalan.jar,xercesImpl.jar,xml-apis.jar;serializer.jar;bsf.jar;js.jar;xsltc.jar` into my classpath. Hereby, I am attaching the code what I have written <?xml version="1.0"?> <xsl:stylesheet …

Member Avatar for aparna_18
0
174
Member Avatar for Mr.UNOwen

Hello, I know Java and Objective C are totally different languages, but I thought may be since both are object oriented languages, there maybe some similarities between the two to help me make the transition. I also know C, so some of the stuff is looking similar. Could someone help …

Member Avatar for jasimp
0
90
Member Avatar for ZeRo 00

Guys...I am writing a program in Java which includes writing different panels where i need to pass values from one panel to another. i.e I have got a combo box to choose a title and i need to get the performances for that title in my next panel. So can …

Member Avatar for JamesCherrill
0
112
Member Avatar for farhan.foxtrot

Running this file returns the error: Exception in thread "main" java.lang.NullPointerException at Packet.<init>(test.java:20) at test.main(test.java:46) here: line 20 : this.data[i][j] = data[i][j]; line 46 : Packet packet = new Packet(4,data,count,column); can anyone help ma how to create this constructor that accepts String[][] ? [code] class Packet{ int op_code; String[][] data; …

Member Avatar for Ezzaral
0
99
Member Avatar for Narayan15

I created a html form and i want to submit the form automatically. So i used Javascript. I add that html form in java using JEditorpane, but JEditorPane doesn't support javascript. i heard that there is Rhino package which supports Javascript. But I dont know how to add Rhino in …

Member Avatar for Ezzaral
0
156
Member Avatar for mario.herbst

Hi everybody. I am a student in computers at the Hebrew University in Jerusalem. I started to work with Java - and working with Product Version: NetBeans IDE 6.5 Java: 1.6.0_11; Java HotSpot(TM) Client VM 11.0-b16 System: Windows XP version 5.1 running on x86; Cp1252; en_US I have an urgent …

Member Avatar for Ezzaral
0
100
Member Avatar for JP_L

hi, I'm trying to run my 1st servlet I'm using eclipse and tomcat but I get an error that I cannot solve. can anyone tell me what I'm missing? here is my index.jsp [code=java] <%@ page language="java" contentType="text/html; charset=ISO-8859-1" pageEncoding="ISO-8859-1"%> <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> …

Member Avatar for ejosiah
0
102
Member Avatar for amarjeetsingh
Member Avatar for javaAddict
0
124
Member Avatar for gabec94

Hi, does anyone know what is wrong here? The program is supposed to find the largest number entered, and the 2nd largest number entered. The process for assigning the 2nd largest is not working, I do not think I am evaluating it correctly, and suggestions? [code=java] package random; import java.util.Scanner; …

Member Avatar for masijade
0
236
Member Avatar for denniskhor

Any one can tell me how to save text area thing to text file in arranged. like i save it.. become "Splited Result:New Sentence = sdsdsdsd sdsd sds.Tokenized Result:sdsdsdsd | sdsd | sds | Part of Speech Result:sdsdsdsd/KNK | sdsd/KNK | sds/KNK | i wan it become like tat : …

Member Avatar for sillyboy
0
160
Member Avatar for tygerberg

Hi I want to program a IM in java, but I don't know where to start. I can't find information on the net about IM programming. Could anyone please help me, I'm lost. I want to hopefully get the IM working from pc to mobile phone and vice versa. Any …

Member Avatar for stultuske
0
160
Member Avatar for aman_dba

hi friends i am connecting to sql server with java through eclipse as IDE. here's my base connectivity class to sql server public class BaseDAO { public Connection getConnection() throws Exception { String userName = "aman"; String password = "password"; String url = "jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=amandb"; // step 1 Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver").newInstance(); // Step …

Member Avatar for aman_dba
0
106
Member Avatar for rainny

Hi, does anyone know how to calculate the time difference between one row and another row inside one column? The time is already sort in a column. So, I hope to know that the difference time between first row and second row and consequently. Time is count by using the …

Member Avatar for BestJewSinceJC
0
95
Member Avatar for JP_L

Hi everyone I'm new to JSP and followed a code I read in a book here is my code: [code=JSP]<%@ page import="java.sql.*" %> <%@ page import="java.io.*" %> <% String connectionURL = "jdbc:mysql://192.168.10.2/ox?user=moop&password=unbind"; Connection connection = null; Statement statement = null; ResultSet rs = null; Class.forName("com.mysql.jdbc.Driver").newInstance(); Connection cn = DriverManager.getConnection(connectionURL); Statement …

Member Avatar for JP_L
0
413
Member Avatar for macfrik

Hey guys, I'm new here. Hello. I have a question for you huys. I've been stuck here for more than 2 hours figuring this out. Problem Create a menu-driven "Guess the Number Game" that allows the player to choose from two options: Version 1 - allows unlimited guesses Version 2 …

Member Avatar for BestJewSinceJC
0
95
Member Avatar for blaklite

firstly hello to you all.. Secondly, im new(ish) to java and prone to doing silly things so i'm probably doing it all wrong BUT I want to be able to have a class that has as one of its members as an array of objects. When the class is instanced …

Member Avatar for blaklite
0
125
Member Avatar for jackiejoe

I am trying to add data from an array into a jTable, I have seen [URL="http://www.netbeans.org/kb/55/vwp-databoundcomponents.html"]one[/URL] or [URL="http://blogs.sun.com/winston/entry/nb6_table_binding_enhancement"]two[/URL] tutorials which say go to the "Table Layout" page but I cannot find this page anywhere in NB (have been searching for ages now) so I cant get my array into my …

Member Avatar for BestJewSinceJC
0
87
Member Avatar for Dio1080

Binary Search tree help Can somebody explain to me what this code is doing step by step?, thanks [CODE=java] TREE-SUCCESSOR(x) 1 if right[x] ≠ NIL 2 then return TREE-MINIMUM (right[x]) 3 y ← p[x] 4 while y ≠ NIL and x = right[y] 5 do x ← y 6 y …

Member Avatar for Dio1080
0
107
Member Avatar for PhiberOptik

Hi guys, I am trying to use JavaWebstart to launch a application i have developed. I have two problems: 1. It doesn't launch in Firefox but it works in IE7 2. After loading the file says Unable to Launch Application Here is the link[URL="http://nerdaid.ca/offsitelaunch.jnlp"] http://nerdaid.ca/offsitelaunch.jnlp[/URL] please check it out let …

0
64

The End.