32,204 Topics

Member Avatar for
Member Avatar for roshan_iiita

While running basic HelloWorld program using JSAPI, it is showing error "java.lang.NullPointerException at HelloWorld.main(HelloWorld.java:11)" Following is the code: [CODE]import javax.speech.*; import javax.speech.synthesis.*; import java.util.Locale; public class HelloWorld { public static void main(String args[]) { try { // Create a synthesizer for English Synthesizer synth = Central.createSynthesizer(new SynthesizerModeDesc(Locale.ENGLISH)); // Get it …

0
137
Member Avatar for rushikesh jadha

please tell me step of converting java source code into jar in netbean or if any software available please send me download link of it.

Member Avatar for rushikesh jadha
0
308
Member Avatar for Vampiricx3

Hey guys, right now I'm trying to setup my GUI so that I can search for an Employee (which when clicked, disables all of the Text Fields, but not the ID, so I can search for the ID. But right now I have no idea on how to do this, …

Member Avatar for zeroliken
0
175
Member Avatar for beetlejuice

hi, Recently i was trying to look for a pixel searcher for java that was built in with the language but the only command that was somewhat related to specific color pixel searching was the getPixelColor in the robot library. The problem with this command was that it only returned …

Member Avatar for NormR1
0
179
Member Avatar for dennysimon

hello all how to read from a text file which is not only run at the developer machine but also run at the other machine (after jar ing) I have tried ,the code run at my own machine but cannot find the text file on other machine thank you denny

Member Avatar for dennysimon
0
334
Member Avatar for Goldfinch

I was writing this simple loop and it's giving me trouble. It's supposed to count through the permutations in a deck, so Suit is supposed to go as high as Suit: 3 and Rank is supposed to go as high as Rank: 12, but it isn't doing that. My program …

Member Avatar for Goldfinch
0
178
Member Avatar for rushikesh jadha

how to store MySQL table data into file and then again from file to table using java program.

Member Avatar for rushikesh jadha
0
154
Member Avatar for DevNet

Hi guys. I just having a little problem about creating a good console GUI for our homework. My program is just a simple shopping cart program where in we were asked to create a GUI that asks for the user if he is either a ADMIN user or a CLERK …

Member Avatar for rushikesh jadha
0
163
Member Avatar for vartikachandra

i have to store msgs of string type in a file in java.how do i distinguish between 2 msgs.and how shud i delete the first msg in the file. for eg: "My name is abc.I am fbvnfdl.I am a girl." is stored in a file. and "My name is abc.I …

Member Avatar for stultuske
0
205
Member Avatar for 3nrichedd

Working on this program that uses 2 classes and a client program to test them, I keep getting this error pointing at my constructor, not sure what i am doing wrong but could use some assistance if anyone is able to offer, the error i am getting is: cannot find …

Member Avatar for stultuske
0
207
Member Avatar for mallikaalokam

package class import java.io.*; import java.lang.*; import java.util.*; package Yo public class C { String s,f,d; C(String s,String f,String d) { this.f=f; this.s=s; this.d=d; } void displayj() { System.out.println("1st arg passed:"+" "+s); System.out.println("2nd arg passed:"+" "+f); System.out.println("single arg const:"+" "+d); } } main class import java.lang.*; import java.io.*; import java.util.*; …

Member Avatar for rushikesh jadha
0
194
Member Avatar for emidevil

Hi. im kinda new here . i just want some help with this code i cant seem to figure out my problem, i already declared a constructor but it keeps on saying cannot find symbol when i compile it -_- import javax.swing.JOptionPane; import java.io.*; public class Sample_Thread { public static …

Member Avatar for DavidKroukamp
0
573
Member Avatar for sonicx2218

I like coding, though I'm really stupid, and not very good at it. I'm having trouble figuring out how to remove spaces from a String. I'm such a noobie.. if anyone wants to take a few min to educate me i'd appreciate it. The thing i was attempting to do …

Member Avatar for stultuske
0
115
Member Avatar for scheppy

I'm having some trouble using getClientproperty() to get a string value btw, im using java 1.4.2, so no autoboxing I know how to get int values, and here is an example, which works perfect in my program, [CODE] cx = ((Integer) btn.getClientProperty ("cx")).intValue (); [/CODE] but when i try to …

Member Avatar for JamesCherrill
0
249
Member Avatar for debasishdeb

/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package progressbar; /** * * @author DEBASISH */ import java.awt.*; import javax.swing.*; import java.awt.event.*; import java.awt.event.ActionEvent; import javax.swing.event.ChangeEvent; import javax.swing.event.ChangeListener; public class Progressbar { JProgressBar jprogressbar=new JProgressBar(); JButton jbutton=new JButton("Retrieve information"); …

Member Avatar for zeroliken
0
130
Member Avatar for sharathg.satya

Is exception handling useful in compile time errors logical errors and even runtime errors?

Member Avatar for dewitt-joyce
0
285
Member Avatar for jamie6441

Hello, I'm a beginner at Java and trying to get to know programming and one day work my way up developing android apps. Well I was trying make this program that would read in data from a txt file like this: [img]http://i42.tinypic.com/2vvkokj.png[/img] I wanted the firstname, lastname, id# and dob …

Member Avatar for stultuske
0
280
Member Avatar for MichaelCJ10

I need help!!! im trying to get my sentinal to stop counting as my last value passed. Im imputting a value for a house,and its calculating a total price based on interest and stuff ive set up according to the house value. then pressing -1 to go onto the next …

Member Avatar for DavidKroukamp
0
260
Member Avatar for Goldfinch

Hi I'm trying to create an array of objects and then put a different value into each object. Problem is, I don't know why this isn't working. [CODE=java] public class TestProg2{ public static void main(String args[]){ Rank rank= new Rank(); } } class Rank{ private static int rankIndex=0; public Rank(int …

Member Avatar for Ezzaral
0
169
Member Avatar for sarathsshanker

[CODE]public final class SavingsAccount implements Serializable { /** * This constructor requires all fields to be passed as parameters. * * @param aFirstName contains only letters, spaces, and apostrophes. * @param aLastName contains only letters, spaces, and apostrophes. * @param aAccountNumber is non-negative. * @param aDateOpened has a non-negative number …

Member Avatar for stultuske
0
221
Member Avatar for gedas

hey guys, I need a way to ftp a file from a server however i dont want to ftp all the files as there are some files that exceed 200mb what i need is to ftp a part of the file. in other words i would grep for a string …

Member Avatar for gedas
0
145
Member Avatar for Farhad.idrees

Hi... i m making script which is checking that username aur password is true or not..... i want to show alert if username or password is incorrect.then i want to redirect my page to original login page.... my code is [CODE]$alert = "<script type=\"text/javascript\">alert('Invalid UserName or Password');</script>"; echo $alert; header("Location:../Admin.php"); …

Member Avatar for diafol
0
188
Member Avatar for ndrichim

hello.i have a homework in java wich asks to create this program: there would be n persons who are going to rate songs. for n persons we will ask their name,surname,sex and age.after this each person will rate(vote) with points the song we have given to them.there are 15 songs …

Member Avatar for Philippe.Lahaie
0
348
Member Avatar for christian03

#include<iostream> #include<conio.h> using namespace std; struct biodata { string fname; string lname; string mname; string address; string pbirth; string dbirth; string religion; string citizen; string civilstat; string gender; string email; }*student; main( ) { int n,i,xx,c,d,a=0,e=1; char b,y; cout<<"how many records?"; cin>>n; cin.ignore( ); student= new biodata[n]; for(i=0;i<n;i++) { cout<<"\nLast …

Member Avatar for Lerner
0
226
Member Avatar for mallikaalokam

[CODE]import java.lang.*; import java.io.*; import java.util.*; interface Batm { final static int minbal=500; abstract void withdrawl(); } class Bal implements Batm { int amt,cbal; Bal(int amt,int cbal) { this.amt=amt; this.cbal=cbal; } void withdrawl() { if(cbal>minbal) { cbal=cbal-amt; System.out.println(amt+" "+"withdrawn"); } else { System.out.println("bal nt sufficient"); } } } class Atm …

Member Avatar for JamesCherrill
0
290
Member Avatar for kalcio

bonjour, j'ai un problĂ©me de compilation concernant un projet,malgrĂ© que j'ai un main class voici les erreurs: run: java.lang.NoClassDefFoundError: org/apache/commons/logging/LogFactory at com.anthonyeden.lib.util.XArrayList.<clinit>(XArrayList.java:86) at com.anthonyeden.jnm.JNM.<clinit>(JNM.java:174) Caused by: java.lang.ClassNotFoundException: org.apache.commons.logging.LogFactory at java.net.URLClassLoader$1.run(URLClassLoader.java:202) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:307) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:248) ... 2 more Could not find the main class: …

Member Avatar for kalcio
0
142
Member Avatar for gedas

hey guys, i need to create an application which would allow me to log on to ssh server and would allow me to use linux commands in the application, not necessarily all commands, but the main ones such as cd, ls, grep. please let me know where i can start …

Member Avatar for DavidKroukamp
0
160
Member Avatar for rushikesh jadha

when i run my source code on winows xp then progress bar work fine but on linux it just stuck and not run at all, My Code is as follows [CODE]import java.sql.Connection; import java.sql.Statement; import java.awt.BorderLayout; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.File; import java.io.FileReader; import java.io.IOException; import java.sql.DriverManager; import java.text.DateFormat; …

Member Avatar for JamesCherrill
0
347
Member Avatar for Skeldave

Hi, I am trying to add buttons to a Panel which is located on JFrame after the JFrame has been set to visible. My aim is to be able to click "File --> Load" then have it loop through a folder of images, creating buttons which have the images on …

Member Avatar for JamesCherrill
0
282
Member Avatar for harinath_2007

Hi folks. I have a java application which plays a audio file . SO before the audio file or sound is played by my java application , i want to mute all other application sounds like Windows media player , VLC player (etc) if those are currently playing at that …

Member Avatar for harinath_2007
0
249

The End.