36,051 Topics

Member Avatar for
Member Avatar for hazeeel

Hi all! I really really need your advice here! So please do reply me. Your help is greatly appreciated!! I need to do a translation here: X Y Z -3.621 15.574 14.908 (file1 - 2nd row) -3.441 15.678 14.859 (file2 - 2nd row) I need to move file 2 coordinates …

Member Avatar for javaAddict
0
106
Member Avatar for glenak

If there's anyone who knows a thing or two about this, your help would be much appreciated. This is a code I'm working on: [CODE] try { //ask user for short password System.out.print("Enter a password: "); //read in a character at a time, putting them into the buffer while((buf[bufPos++] = …

Member Avatar for javaAddict
0
5K
Member Avatar for keanoppy

this is my code snippets to capture data from a textfile [CODE] try{ // to store the stopwords File file8 = new File("stoplist3.txt"); FileInputStream stopStream = new FileInputStream (file8); InputStreamReader reader8 = new InputStreamReader(stopStream); StreamTokenizer stopToken = new StreamTokenizer(reader8); List stopWordList = new ArrayList(); //stopwords up to here[/CODE] i don't …

Member Avatar for keanoppy
0
121
Member Avatar for gabz16

Hi programmers I need this code to be completed with the sjf(shortest job first) to be preemptive, it means with arrival times with each process.. Here is my code so far: CpuScheduling1.java Interface: Menu [1]First- Come First-Served [2]Shortest Job First [3]Priority Enter Choice: Note: I need to have the sjf …

Member Avatar for gabz16
0
399
Member Avatar for glenak

Hi all, I want to write some cryptographic operations using RSA, but its provider, bouncy castle, does not come inbuilt in java, which is why when I put in this code: [CODE]Provider bcProv = new org.bouncycastle.jce.provider.BouncyCastleProvider();[/CODE] I went to the providers site and they said something about putting this line …

Member Avatar for glenak
0
111
Member Avatar for vgd

when the above code is executed then it is showing that m string is undefined, please tell how to modify a string ,which is taken as input [code]String m; BufferedReader x = new BufferedReader(new InputStreamReader(System.in)); try { m = x.readLine(); } catch (IOException ex) { Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex); } a--;} …

Member Avatar for JamesCherrill
0
75
Member Avatar for hopejuli

I am new to netbeans..i need help about jbuttons functionality.i want to make a main window having some buttons that can lead to other applications/projects i have created. How to link different projects/applications through one main window.e.g main window having button Calculator,on pressing it should lead to calculator application.and a …

Member Avatar for cale.macdonald
0
97
Member Avatar for glenak

Hi all, Ok, so I know how to write a simple client/server app where the send a message from the client and the message displays on the server's textarea, and I send a message from a server and it displays on the client's textarea. To do this I normally use …

Member Avatar for glenak
0
149
Member Avatar for nocookies92

I'm trying to make a program that will toggle a boolean value and paint a red rectangle on the right side of a swing panel when you press the 'a' key. Unfortunately, I'm not having much luck, because when I hit 'a' nothing happens. My mistake is probably something obvious …

Member Avatar for nocookies92
0
169
Member Avatar for glenak

Ok, this is very, very strange, and annoying. I declared this variable in my IDE: [CODE]long me = 2323237777777;[/CODE] And I get a compilation error saying that the literal 2323237777777 of type int is out of range. I don't understand. Isn't long supposed to be able to handle this type …

Member Avatar for glenak
0
107
Member Avatar for countpuchi

Okay, First and foremost im new to the forum. Hi and Thx to anyone who helps :D Anyhow, i would like to ask you guys if it is possible to separate a String with tokens one by one. Then make them appear in the jTextField with only 1 word per …

Member Avatar for jon.kiparsky
0
198
Member Avatar for Abhijeet Sutar

I am developing the web app and i am new guy I want to include the trace path like one following shown. [CODE]Trace: » about » hai-world » keywords » playground » home[/CODE] How i include within the web-page and i am using the Java Servlet and JSP Technology.. (This …

0
55
Member Avatar for herberwz

My button is not gaving out any action when clicked: (libraryBtn): [CODE]package LibraryDatabase; import static javax.swing.JOptionPane.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class PostLibraryDatabase extends JFrame implements ActionListener { // Text Fields XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX JTextField firstName, surName, id, serialNumber, category, dateToday, coverTitle, isbnNumber, authoursName, coAuthoursName, pubDate, loanDate, returnedDate, email, details; …

Member Avatar for NormR1
0
117
Member Avatar for adina_m

Hi! I read the jmf tutorial for how to capture an audio. I tried to run there code in netbeans but it din't work . This vector: Vector deviceList = CaptureDeviceManager.getDeviceList(new AudioFormat(AudioFormat.LINEAR, 44100, 16, 2)); was null. This means that it didn't find a device to record with? I used …

0
29
Member Avatar for prem2

Hi, I have downloaded j2ee server and compiled the jms programs successfully. But,i cannot able to run the j2ee server. My directory Structure: j2sdkee1.3.1/bin [root@localhost bin]# ll total 48 -rwxr-xr-x 1 uucp 143 345 2002-01-17 17:18 cleanup -rwxr-xr-x 1 uucp 143 1715 2002-01-17 17:18 cloudscape -rwxr-xr-x 1 uucp 143 463 …

0
38
Member Avatar for bowmaster

I am a student looking to create a functional ftp client software from scratch with java for my licence project. I am looking for: any usefull books regardind the subject of file transfer, sugestions on features that I could implement to make the project more unique and usefull, tutorials and …

Member Avatar for NormR1
0
78
Member Avatar for arthurav

I use a mysql database with students and grades for a training program. I would like to create a dynamic form with one field that works like this: if i write the name in the form and press check, and the student exists, i want it to show me the …

Member Avatar for javaAddict
0
117
Member Avatar for vgd

I am not getting a efficient way to solve the problem, the time taken i more than 5 sec while the time alloted for this problem is 1 sec .so please help me .please give me a answer using collections. ========== EASY - 2 ========== The great pirate Khurafati and …

Member Avatar for jon.kiparsky
0
158
Member Avatar for anz2050

Hi I want to capture the output into java varible of one of the command line statement. The command line statement is as below: [COLOR="Green"][B]..\_jvm\bin\java.exe -cp ..\DataLoader.jar com.salesforce.lexiloader.security.EncryptionUtil <option> <password>[/B][/COLOR] Infact this is the command line utility thru which I encrypte my password, if i do manually. [B]But I want …

Member Avatar for anz2050
0
248
Member Avatar for Sunshineserene
Member Avatar for jon.kiparsky
1
528
Member Avatar for hazeeel

[CODE] coordinates2[i][0]= Double.parseDouble(text2.substring(30,38));//X coordinates2[i][1]= Double.parseDouble(text2.substring(38,46));//Y coordinates2[i][2]= Double.parseDouble(text2.substring(46,56));//Z [/CODE] Can I do this: coordinates2[i][j]= coordinates2[i][0]+ coordinates2[i][1]+ coordinates2[i][2]; Is it possible to add them all together ?

Member Avatar for javaAddict
0
52
Member Avatar for capsitan

I am doing a payroll program that requires a sentinel value. I cant seem to get it right no matter how much I try. here is my code so far: //Filename: Payroll3.java //Description: Payroll calculator with sentinel loop //Author Name: Chris Russo //Date: 08/15/2010 import java.util.Scanner; public class Payroll3New { …

Member Avatar for tong1
0
416
Member Avatar for Sunshineserene

I have 2 arrays that are in a while loop each. I have declared the array ouside of the main, declaring it 'public static'. I want to use the values store in the array outside of the while loop, but I can't seem to do it. May I know how …

Member Avatar for Sunshineserene
0
818
Member Avatar for jemimaloh

hi. could some one help me. I am trying to read the tokens into the array but the datatypes are incompatible. what should i do to cast it into the same thing. the numbers from my text file are actually floats. But i can make do with just the integers …

Member Avatar for ~s.o.s~
0
133
Member Avatar for prem2

Hi, Can anyone send the download link of j2ee server. thank you, With regards, Prem

Member Avatar for prem2
0
39
Member Avatar for Garee

Hello, I am starting to learn java and I was wondering if anyone know of any resources/websites that have projects I could attempt to improve my skills and expand my java knowledge? Thanks.

Member Avatar for new_programmer
0
831
Member Avatar for Babyblues

Hello, I am having trouble with my Odd/ Even Code. Can anyone help me with this? Or has a current code?

Member Avatar for new_programmer
0
1K
Member Avatar for Xufyan

[CODE] class character1{ public static void main (String args[]){ float a,b; a=Integer.parseInt (args[0]); b=(float)Math.acos(a*(180/3.14)); System.out.println (b); } }[/CODE] the above program isn't working when entering angle other than 1 , why ?

Member Avatar for tesuji
0
698
Member Avatar for scottyg13

Hi I was wondering if someone could help me with a code for my website? Basically what I want to do is have a drop down list that is essentially a matrix in the sense that picking one option leads to another and eventually you can narrow down the results …

Member Avatar for scottyg13
0
74
Member Avatar for SeanC

I'm trying to create a method which checks if a certain text file is empty, and if so it deletes it. However, the program seems to freeze for one reason or another when executing this part. [CODE]try { BufferedReader in = new BufferedReader(new FileReader("File List.txt")); String str; while ((str = …

Member Avatar for SeanC
0
2K
Member Avatar for Temmu

hi, i'm wanting to do a for loop on the last line [CODE]System.out.println(host + "\t" + status);[/CODE] of this bit of code so that when i replace [CODE]String host = "server";[/CODE] with something like this: [CODE]String hostarray[] = {"pc","server","pc2","another","etc"};[/CODE] that i get output that looks like this: Server Up? pc …

Member Avatar for NormR1
0
104
Member Avatar for AhmedGhazey

Hello I want make java application which start running when system (OS)start anyone can tell me where i must search or a demo for that any help will be appreciated Thanks Yours Ahmed Ghazey FCI-CU-CS

Member Avatar for Ezzaral
0
61
Member Avatar for palak12

Hi everyone, I will be really thankful if someone could help me out. I am developing a gui application ( based on java jdbc and oracle10g), where a user can enter queries retrieve data from that can perform selection projection join union. Till now I could perform only selection queries …

Member Avatar for java_programmer
0
111
Member Avatar for prit05
Member Avatar for Duki
0
179
Member Avatar for NewOrder

the few things that i cant understand are inside the code.. The code should give out the car type, model type ,serial number. and the number of cars.. [CODE]public class part5{ public static void main(String[] args) { System.out.println(Car.getCounter()); Car[] cars =new Car[5]; for (int i = 0; i < cars.length; …

Member Avatar for NewOrder
0
237
Member Avatar for junichiro90

guys, i have a project that have to implement a reservation system by using java. Is it database the only way to store the data? Is there other method beside by using database? If database is the only way to do that, can anyone tell me how to do so …

Member Avatar for JamesCherrill
0
126
Member Avatar for jemz

hello can you help me i don't know how to make this method remove(Node n),in SinglyLinkedList can anyone give a hand on this.. thank you in advance.hoping for your positive responds... [CODE] public class SinglyLinkedList { private Node head; private Node tail; private int size = 0; public Node add(Node …

Member Avatar for jemz
0
289
Member Avatar for prem2

Hi all, Static Methods : static methods can access only static variables.It cannot access instance variables. static methods can call another static methods without the objects. static methods can call instance methods using the object of the class. Instance Methods: Instance methods can access static variables also instance variables. Instacne …

Member Avatar for jon.kiparsky
0
1K
Member Avatar for ueoptimum

[CODE]import java.io.*; public class DCS2{ public static void main (String [] args) throws IOException{ BufferedReader myInput = new BufferedReader (new InputStreamReader(System.in)); int code, al, nmp, brc; float tf = 0 , ir = 0; String name = "" , description = ""; System.out.println ("Enter Your Barrower's Name"); name = myInput.readLine(); …

Member Avatar for javaAddict
0
136
Member Avatar for capsitan

I am doing a payroll program that requires a sentinel value. I cant seem to get it right no matter how much I try. here is my code so far: //Filename: Payroll3.java //Description: Payroll calculator with sentinel loop //Author Name: Chris Russo //Date: 08/15/2010 import java.util.Scanner; public class Payroll3New { …

Member Avatar for tong1
0
161
Member Avatar for jk_bscomp

Hello, everyone!!! I just want to ask if you anyone here knows how to compile java file in linux specifically UBUNTU. For example, I have a java file named Hello.java and saved at my desktop. how do I compile and run this file using the terminal of ubuntu... By the …

Member Avatar for tong1
0
368
Member Avatar for playdaguigame

hi, i was supposed to write a program in jgrasp, using java, i am a grade 12 learner, my program needs to have gui, my program compiles with no errors, when i run it it gives me my error message - "problem with showdata" - and only fills the first …

Member Avatar for javaAddict
0
101
Member Avatar for herberwz

please me on how to insert a picture am new to netbeans [CODE]package LibraryDatabase; import static javax.swing.JOptionPane.*; import java.awt.*; import javax.swing.*; import java.awt.event.*; public class PostLibraryDatabase extends JFrame implements ActionListener { JTextField firstName, surName, id, serialNumber, category, dateToday, coverTitle, isbnNumber, authoursName, coAuthoursName, pubDate, loanDate, returnedDate, email, details; JButton writeBtn, displayBtn, …

Member Avatar for herberwz
0
157
Member Avatar for DARK_BYTE

Hi I successfully wrote a program that keeps sending data from client to server and from server back to client where the client prints the data. But now I'm trying to write one whereby the user enter numbers at the client and they are sent to the server whereby they …

Member Avatar for JamesCherrill
0
103
Member Avatar for hazeeel

[CODE] coordinates1[i][0]= Double.parseDouble(text2.substring(30,38));//X coordinates1[i][1]= Double.parseDouble(text2.substring(38,46));//Y coordinates1[i][2]= Double.parseDouble(text2.substring(46,56));//Z [/CODE] How do I combine the above 3 into 1 2D array?

Member Avatar for javaAddict
0
31
Member Avatar for Xufyan

Is it possible to call a constructor if we entered know value in the output screen ??? example !! [CODE]import java.io.*; class Employee{ int num; static int count=0; float compensation; public void print(){ System.out.println ("Employee number: " + num + ", Employee Compensation: $" + compensation); } public Employee(){ num …

Member Avatar for group256
0
194
Member Avatar for rajasekhar1242

hi , i am trying to develop one jsp application with tag concept on netbeans tool. but i am getting this error "According to TLD or tagfile, Attribute uri is mandatory for tag dbquery " . i could not run my application due to this error. In Jsp file i …

Member Avatar for rajasekhar1242
0
176
Member Avatar for yuvi2288

Hi friends .. Can you help me... I have been created a new form. In this form i have multiple check boxes & i should be able to check only one check box at a time from the multiple box. The check box value contains with embedd code. when i …

0
78
Member Avatar for prem2

Hi, I have a doubt in overriding the methods in java. Sample program For overriding .This program executes fine. [code] import java.io.*; import java.util.*; class one { public void show(){ System.out.println("I am in class one-Super Class"); } } class two extends one { public void show(){ super.show(); System.out.println("The subclass two"); …

Member Avatar for tong1
0
101
Member Avatar for NewbyChic

Alright, Ive moved onto my next mission. I have to draw a set of four triangles using for loops. I have the first two done, the second two have to have spaces prior to printing the asterisks. example: ***** **** *** ** * * ** *** **** ***** This is …

Member Avatar for javaAddict
0
178

The End.