32,204 Topics

Member Avatar for
Member Avatar for ainct

Hi, I want to execute unix commands(pdftops and ps2pdf) in windows system using java environment. but m getting error.plz help me. here is my code:[CODE] public static Process p1; public static Runtime rt; rt = Runtime.getRuntime(); ////linux commands filename=args[0].replace(".pdf","temp.pdf"); String pdftopsCmd ="pdftops "+args[0]+" temp.ps"; String pstopdfCmd="ps2pdf temp.ps " +filename; p1 …

Member Avatar for ainct
0
148
Member Avatar for neelkris

Hello Sir, I am doing a small mini project for my college and i need code on how to create a minimun of hundred buttons placed in a grid. you will be a lifesaver if you can provide me with this little task Thanking You.

Member Avatar for verruckt24
0
78
Member Avatar for soundman107

I have been beating my head against the walls about the all time favorite Cars Inventory program. I got Cars to compile but won't run due to a exception in thread "main"java.lang.NoSuchMethodError:main and spent many hours....trying to eliminate error. [CODE] // Cars.java //Car inventory program public class Cars { private …

Member Avatar for verruckt24
0
105
Member Avatar for geek_till_itMHZ

I am Trying to write a Java Program that animates 4 arcs to make it look like a moving fan. As of now I have the arcs drawn and Im trying to make buttons for my slow, med, fast and off settings Im getting the following errors: DrawArcs.java:6: cannot find …

Member Avatar for geek_till_itMHZ
0
91
Member Avatar for tiad123

So, yes, this is a homework assignment, but I have been working on it for days and I really need a push in the right direction please. I have a gui with four buttons: first, previous, next and last. The gui comes up fine. I also have 4 windows with …

0
33
Member Avatar for brianlevine

I'm having trouble getting ant to delete files. I'm working through a basic spring tutorial and it has included an ant target to clean the build: [CODE] <target name="clean" description="Clean Output Directories"> <delete> <fileset dir="${build.dir}"> <include name="**/*.class"/> </fileset> </delete> </target> [/CODE] It seems pretty basic to me, but it's not …

Member Avatar for Ezzaral
0
138
Member Avatar for endsamsara

Hi, well, I have an ArrayList with this values ACU ACU ACU ACU ACY ACY AER AER AER AGC I need to get the number of items of each Word, so for ACU we will get 4, ACY we will get 2, AER we will get 3, AGC we will …

Member Avatar for Ezzaral
0
276
Member Avatar for sujithy15
Member Avatar for gedas

hey guys im new to Java programming and im trying to convert the code from an applet application to a application that would have a main method and could run on...lets say net-beans. here is the link for the applet that i want to change [url]http://javaboutique.internet.com/Absolute/[/url] and here is the …

0
61
Member Avatar for jaxy

Hi, I was wondering how do i go about generating unique random numbers? ie i want to generate numbers between 0-9 randomly. I dont want to repeat the numbers.Then that no: should display on the buttons.ie there are 9 buttons. first randomly generated number should display on the first button …

Member Avatar for neelkris
0
2K
Member Avatar for tjsail

Is it possible to read a file as lines are written to it but not lose your location in the file? As in there is a program that will write lines of text to a file until it reaches 2.4MB. I want to read this file as these lines of …

Member Avatar for tjsail
0
131
Member Avatar for houlahan

when i run the server and the client i get the following errors: Client: [CODE]Exception in thread "main" java.io.EOFException at java.io.ObjectInputStream$BlockDataInputStream.peekByte(ObjectInputStream.java:2570) at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1314) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:368) at Client.main(Client.java:29) Java Result: 1[/CODE] not really a error but it should receive the patients name?: [CODE]waiting for connection... Message Recieved:null waiting for connection...[/CODE] so …

Member Avatar for houlahan
0
125
Member Avatar for scratchwiz

Hey all..am quite new to Java and I have encountered a problem with my program. I am getting the error message "cannot find symbol constructor". I have tried to figure it out but I have failed. I have read around that adding an empty constructor would help but this is …

Member Avatar for verruckt24
0
729
Member Avatar for salamjamal10

Okay this is my assignment question: Write a program that accept the format [I][B]last name, first name [/B][/I]and print out [I][B]first name, last name[/B][/I] Thats what I did: [code] import java.util.Scanner; public class Name { public static void main(String[] args) { Scanner input = new Scanner(System.in); System.out.println("Enter your name"); String …

Member Avatar for salamjamal10
0
114
Member Avatar for jayaj

i m using netbeans for java program for jdbc connection. i m getting classnotfound exception , i have also downloaded jdbc driver for ms sql server 2005 but driver doesnot contians msbase.jar mssqlserver.jar and msutil.jar files Plz reply asap.

Member Avatar for peter_budo
0
133
Member Avatar for cicile

could you please help me cn u give me a code about character uppercase on its first letter

Member Avatar for peter_budo
0
30
Member Avatar for stano007

I'm in my 1st year of college, doing some Java programming...and really struggling. We have some project to do, to test a date...there will be 5dates and the output should be next day of the date. If anybody can help... thanks Stan

Member Avatar for musthafa.aj
0
148
Member Avatar for Dearster

Few problems I'm having with Java at the moment, would be grateful if any of you could give me a hand. Wrote this piece of code to input 2 numbers from user, square root of 1, and cube root of another. Program works but I want to know while using …

Member Avatar for javaAddict
1
114
Member Avatar for fardoonmuhafiz
Member Avatar for verruckt24
-3
143
Member Avatar for endsamsara

hi forum. I have a code to return an arrayList with the duplicates of an ArrayList that has the methods get1(), get2(), get3(), get4(), which are the criteria to see if the object is duplicated, but seems it´s not working, I am comparing all items in the array... I have: …

Member Avatar for thekashyap
0
131
Member Avatar for Clawsy

Hello, I build an applet that plays midi files from a server. The problem is when I start playing the file (MidiSystem.getSequencer()).. it gives me this error in the java console and nothing plays: [CODE]SEVERE: null javax.sound.midi.MidiUnavailableException: MIDI OUT transmitter not available at com.sun.media.sound.AbstractMidiDevice.createTransmitter(Unknown Source) at com.sun.media.sound.AbstractMidiDevice.getTransmitter(Unknown Source) at javax.sound.midi.MidiSystem.getSequencer(Unknown …

Member Avatar for Clawsy
0
369
Member Avatar for iamsmooth

So let's say I have an interface called ExitInterface.java. Inside there is only one method declaration, exit(). I have two classes that implement this: 1) first one is named Exit.java which does System.exit(exitCode) in the exit method. 2) second one named ExitMock.java which doesn't exit, and instead keeps track of …

Member Avatar for iamsmooth
0
95
Member Avatar for nickclarson

I'm completely lost on this assignment: [QUOTE]The BNF rules (referred to as a grammar) are stored in a file. Your program is to read and echo the grammar file, and then walk the user through the process of building a sentence. Once the grammar is read, the program will prompt …

0
57
Member Avatar for ronnie30

I'm trying to find the Big O for each of these code fragments, for an ArrayList and a Linked List: [CODE] public static int calc( List<Integer> lst, int N ) { int count = 0; for ( int i=0; i<N; i++) { if (lst.get(i) > 0) sum += lst.get(i); else …

0
40
Member Avatar for houlahan

Hi im wanting to write a simple client server, i want the server to retrieve information from a SQL database by querying it for eg. [CODE]Public String getID(String ID){ SQL Query code return ID; }[/CODE] that bits the easy bit i then want the client to have a simple GUI …

Member Avatar for houlahan
0
128
Member Avatar for fuggles

I am new to Android development. This compiles in Eclipse without any errors, but when I run it in the emulator, it crashes, why? [code=java]package com.buttontest; import android.app.Activity; import android.os.Bundle; import android.view.View; import android.widget.Button; import android.widget.TextView; public class ButtonTest extends Activity { int timesPressed = 0; String timesPressedText = ""; …

Member Avatar for fuggles
0
311
Member Avatar for RavetodaGrave

// A method for finding the longest and shortest string //and a method to split each word so i can see if it is a // palindrome or not thanks for the help { public static void main(String[] args) { String string ; int index ; String sentence; String newSentence; …

Member Avatar for verruckt24
0
97
Member Avatar for RavetodaGrave

[code] // need help with this how do i get the for loop to print out just //the alphabetic words { public static void main(String[] args) { String string ; int index ; String sentence; String newSentence; String word; int startPos; int spacePos; int wordCount; boolean lastWord; boolean alphaWord; char …

Member Avatar for verruckt24
0
196
Member Avatar for sujithy15

1.why isn't java used for [B]system programming[/B] in place of c ? 2. what does the statement 'java is [B]robust[/B] mean'? 3. what does the statement 'java is [B]multiprogramming[/B] mean'? 4. why is the concept of pointers avoided in java? Instead of using [B][I]references[/I][/B] in place of pointers in order …

Member Avatar for peter_budo
0
84
Member Avatar for localp

I need to append to Map to another Map... and this is what i did .. [code] import java.util.HashMap; import java.util.Iterator; import java.util.Map; public class sampl { public static void main(String[] args) { Map<String,String> FileMap =new HashMap<String, String>(); Map<String,String> stateMap =new HashMap<String, String>(); stateMap.put("1", "value0"); stateMap.put("12", "value1"); stateMap.put("13", "value2"); stateMap.put("14", …

Member Avatar for cale.macdonald
0
103

The End.