35,618 Topics

Member Avatar for
Member Avatar for davewhite

First of all, Happy new year!!! [CODE]import java.io.*; public class Main { public static void main(String[] args) { int input = 0; switch (input) { case 1: System.out.print("one "); break; case 2: System.out.print("two "); break; case 3: System.out.print("three "); break; case 4: System.out.print("four "); break; case 5: System.out.print("five "); break; …

Member Avatar for tux4life
0
124
Member Avatar for tfitz666

Hi, Im new here and to java programming in general. I've been given an assignment to write a sorting algorithm and then test it using JUnit tests. The problem is when I try to compile the tester class i get a ".class expected" errors followed by three "; expected" errors …

Member Avatar for tfitz666
0
218
Member Avatar for anevins

[B]The project :[/B] Deisgn and implement an application that reads an integer value and prints the sum of all even integers between 2 and in the input value, inclusive. Print an error message if the input value is less than 2. Promt accordingly. [B]Query :[/B] I'm not sure how I …

Member Avatar for javaAddict
0
212
Member Avatar for cwarn23

Hi and I am having trouble with one of the very most basics of java applets. That is putting the applet into a webpage and in that webpage specifying some parameters. The below is my code: [CODE=html]<object classid="clsid:8AD9C840-044E-11D1-B3E9-00805F499D93" ARCHIVE="chatroom$1.class, chatroom$2.class, chatroom$3.class, chatroom.class, extender$innerclass.class, extender.class" width="500" height="480"> <PARAM name="archive" value="chatroom$1.class, chatroom$2.class, …

Member Avatar for c_blimey
0
134
Member Avatar for AllyC

Good day! My codes stated don't have errors, it run well, BUT, though this program is saving in notepad as .out and .txt, when i closed the dos console and then run the program again, it is not reading the added items in .out and .txt file. That's the problem, …

Member Avatar for AllyC
0
160
Member Avatar for adams161

Hi, I was playing around last night with having one main frame that contains several windows you can open under the window menu. For example you might have a chat window and you might have a game board window. I want these windows contained by one larger frame that represents …

Member Avatar for adams161
0
119
Member Avatar for mimi4IT

hi everyone, i have been asked to make a basic calculator but my calc only holds two integers like 2+2 it cant do more than 2 operations so id reaaly be glad if someone could take a look at my code and see what the problem is asap.im still a …

Member Avatar for mimi4IT
0
140
Member Avatar for bobscrazy

First off no idea why the title doesn't say the full title, but My problem is getting snum in the main class to transfer over to the sub class, so that the snum in that class = snum from the main class The code is; [code] package workstation; import java.util.Random; …

Member Avatar for Crushyerbones
0
80
Member Avatar for cmh0114

I'm trying to create a game with Java, and it includes a timer, which I did with an extension of Thread. The timer is put in a loop. Effectively: [CODE] public class Game do{ System.out.println("Start"); playGameThread.start(); timerThread.start(); timerThread.join(); playGameThread.allDone = true; playGameThread.join(); System.out.println("Finish"); }while(play_again == 'Y'); } public class playGameThread …

0
54
Member Avatar for Dougnukem

First, I want to thank you for helping if you did, if not, thanks for checking it anyway. Second, I have been working on this for awhile, and I am slowly making progress. I am to make an address book, and for the most part I am getting it done …

Member Avatar for blackeyedanel
0
215
Member Avatar for veerasek

Hi All, I am trying to convert HTML file into XML using java. If anyone of you have sample coding please share with me. Your suggestions greatly appreciated. Thanks, Veera

Member Avatar for ~s.o.s~
0
6K
Member Avatar for sivakaranlk

HI anybody can help me for the coding of user login form with two user name in notepad coding forjava application

Member Avatar for thekashyap
0
30
Member Avatar for shubhang

I am a beginner at Java. I have been given an assignment to make a simple address book(without applets) using Java. It should have the following functions:- 1) search-by name,city. 2)add-name,telephone number,city,address. 3)modify. 4)delete. I am still working on the program.But the problem comes when the screen(black one) becomes too …

Member Avatar for blackeyedanel
0
230
Member Avatar for davecoventry

Hi, I'm trying to run a Java App from PHP. [B]system('java -jar /home/dave/web/drupal/java/dist/emp.jar');[/B] fails. nothing prints out, it just returns FALSE. However, this works: [B]system('java -jar');[/B] Prints out the help info normally associated with incorrect parameters passed to Java. This also works: [B]system("ls -l /home/dave/web/drupal/java/dist/emp.jar");[/B] Prints out a listing of …

0
92
Member Avatar for aladar04
Member Avatar for aladar04
0
531
Member Avatar for RoyaLPearL

Hi everyone, Hi everyone. I'm happy to be here today. actually I need help from u . I'm doing a JAVA program and there is this error that I really tried to fix but couldn't. so can u help me please. the program I'm writing is to accept data from …

Member Avatar for mellowmike
0
159
Member Avatar for 4me@u

hi every body, i was working on my Client-server file hosting system and at this level my program can upload file from client to server but it is also expected to download the files previously uploaded. Now i can browse the filenames from the server with the following code, [code] …

Member Avatar for 4me@u
0
108
Member Avatar for prasannakarthik

hi, I have a requirement to include a website in my jsp file,say [url]http://www.abc.com[/url] . But the problem jsp:include does not support any protocols. how to achieve this functionality?? Thanx, lpk

Member Avatar for ~s.o.s~
0
98
Member Avatar for SgtMe

Hi all. I'm interested in Java ME, so I downloaded Netbeans with the JDK. Here is the story: 1.) I installed the wrong version of Java JDK 2.) I removed the JDK 3.) Accidentally removed JRE as well :( 4.) JDK data still on system 7.) Downloaded and 'installed' Netbeans …

0
53
Member Avatar for happyns

Hi one and all, I am using C#.net language in asp.net framework using visual studio 2008. I have one checkbox as input control and two textboxes named textbox1 and textbox2 as asp controls. First the client needs to type something in textbox1 and after that the client needs to check …

Member Avatar for happyns
0
99
Member Avatar for kilermage

Im trying to make the run.bat file read the .class files from the folder classes/src. But before I didn't package my .java files and the created .class files were found in /classes. But now that I packaged my .java files, the newly created .class files are being read from inside …

Member Avatar for kilermage
0
72
Member Avatar for shayacov

Hi, I'm building a snakes&ladders game in java. so far i have the model ready, i'd like to make the UI in swing. my problem is to paint the dynamic board using swing, i need to paint a snake/ladder from one square to another, the problem is that so far …

Member Avatar for cale.macdonald
0
91
Member Avatar for Clawsy

Hello, I desperately need a good and fast image encoder and/or compressor for files like jpeg or png. I need this for [B]internet image transfer[/B]. I have to transfer an images from server to client very fast - every second, even milisecond. I'm interested in an encorder that can [I]lower …

0
130
Member Avatar for jakethesnake86

I'm completely new to java and am trying to get some experience with programming java applets that can be opened from a browser. I was able to successfully open a simple "hello world" applet from a browser using the below javascript: [CODE]<script src="http://www.java.com/js/deployJava.js"></script> <script> var attributes = { code:'HelloWorld.class'} ; …

Member Avatar for jakethesnake86
0
699
Member Avatar for countercoder

I get the error 'orphaned case'. So here's the problem: [IMG]http://img385.imageshack.us/img385/6424/errorqg4.png[/img] Here's my case 218 and the case before it, can you help? [code] case 192: // Use an item on an object junk = inStream.readSignedWordBigEndianA(); int UsedOnObjectID = inStream.readUnsignedWordBigEndian(); int UsedOnY = inStream.readSignedWordBigEndianA(); int ItemSlot = (inStream.readSignedWordBigEndianA() - 128); …

Member Avatar for lieni
0
2K
Member Avatar for emmas4impact

my task is to create a gui for a list of cars, bus,bicycle etc. and the program should be able to add and remove to the car in store. so i wrote this code below using netbeans IDE. [CODE]package vehicleregister; import java.awt.*; import java.awt.event.*; public class VehicleRegister extends Frame implements …

Member Avatar for emmas4impact
0
232
Member Avatar for aladar04

[CODE]/*manimbo_mp5*/ import java.io.*; public class manimbo_mp5{ public static void main (String[]args) throws IOException{ BufferedReader br=new BufferedReader (new InputStreamReader (System.in)); Integer x=8,y=1,heads=0,tails=0; String ht=""; while (x>0){ System.out.print ("Enter toss #" + y + " result: "); ht=br.readLine(); if (ht=="h"){ heads++; } else if (ht=="t"){ tails++; } x--; y++; System.out.println ("Tails: " …

Member Avatar for aladar04
0
104
Member Avatar for Clawsy

Hello, I have to take a snapshot of my screen and send the image to a client using Datagrams. I think my problem is at the client part. The image is null, and I don't know why. Here is the server part. I tried to send 534 byte packets (bigger …

Member Avatar for Clawsy
0
3K
Member Avatar for Justin12345

This is due in 2 days its supposed to be simple but i just cant get it. Write a program that will print out statistics for a user-specified number of coin tosses. First the user should be asked about the total number of coin tosses possible. For this project, the …

Member Avatar for aladar04
0
502
Member Avatar for Clawsy

I'm am trying to send over socket a very big array - length about 1300000 .... and I use ObjectInputStream and ObjectOutputStream. The problem is when I read the input stream... I get this exception: java.io.StreamCorruptedException: invalid type code: FF at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1356) at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351) at objectThread.run(objectThread.java:27) [CODE] //ois is the …

Member Avatar for Clawsy
0
1K

The End.