35,618 Topics

Member Avatar for
Member Avatar for ozrayleigh

Hi, I've been giving this little problem of mine a lot of thought and I cant seem to figure out a way to solve it. I'm creating an information system (for a college assignment). The system I've created uses java, and it is able to generate reports (which I use …

Member Avatar for peter_budo
0
128
Member Avatar for aditya_22cent

[B]amru.java :--[/B] [code=java]package test; public class amru { public static void fa() { System.out.println("ADitya"); //return; } }[/code] -------------------------------- [B]INDEX .jsp[/B] [code=jsp]<%@page contentType="text/html" pageEncoding="UTF-8"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <%@page import="test.amru"%> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8"> <title>JSP Page</title> </head> <body> <h1>Hello World!</h1> <% amru adi = new …

Member Avatar for peter_budo
0
85
Member Avatar for systemsbiology

Hello Everyone, I am an intermediate developer in programming languages. I have developed some python script and some java applications. In my project, I need to integrate the python script with a java application to put all the tools in a single pipeline to function as a continuous workflow. This …

Member Avatar for ~s.o.s~
0
980
Member Avatar for jtodd

Hey guys! I am new to java and have a newbie question. In a linked list, if I wanted to set the int first = to the first node in the linked list how would I do that. Thank you all in advance for your help!!

Member Avatar for tiny7415
0
86
Member Avatar for SCoder1

what's wrong with my java code? NullPointerException was found by my compiler.... [code] import java.awt.event.*; import java.awt.*; import javax.swing.*; import javax.swing.event.*; class WheelCalc extends JFrame implements ActionListener { public static final int WIDTH = 400; public static final int HEIGHT = 400; public JLabel NewTire; public JLabel OldTire; public JTextField …

Member Avatar for stultuske
0
151
Member Avatar for rpineres

I'm currently working on a small text game project as an exercise in Java. Just recently, I've come to a point where I am having difficulty with the logic behind the flow of the program. It had started out as a console application with a very sequential series of events …

Member Avatar for stultuske
0
121
Member Avatar for David22

Hi guys. I'm having a bit of a 'mare trying to return some ResultSet results. Basically, my method gets the results from a database and builds a String of the information and returns it. However, I can only get the method to return the LAST constructed String, as the "result" …

Member Avatar for vchandra
0
118
Member Avatar for annazpereira

Hi Guys, I know loads of ppl hv seen similar problems but I just can't figure out whats wrong with my code. I keep getting the following error: Upgrade.java:133: unreported exception java.lang.Exception; must be caught or declared to be thrown new SpFwUpgrade(sp, UrlPath); SpFwUpgrade is called in Upgrade.java as follows: …

Member Avatar for annazpereira
0
215
Member Avatar for rowdyboudy

I need to write a method that returns true if all the values in two int arrays are in the range 0-10, otherwise the method returns false. The code I have written is below but is there a better/more effient way to do this? [CODE] private int[] myArray1; private int[] …

Member Avatar for Zetlin
0
85
Member Avatar for johndoe444

from here: [url]http://weblogs.java.net/blog/emcmanus/archive/2007/04/cloning_java_ob.html[/url] [CODE]package serialclone; import java.io.ByteArrayInputStream; import java.io.ByteArrayOutputStream; import java.io.IOException; import java.io.InputStream; import java.io.InvalidClassException; import java.io.ObjectInputStream; import java.io.ObjectOutputStream; import java.io.ObjectStreamClass; import java.io.OutputStream; import java.util.LinkedList; import java.util.Queue; public class SerialClone { public static <T> T clone(T x) { try { return cloneX(x); } catch (IOException e) { throw new IllegalArgumentException(e); …

0
69
Member Avatar for Zetlin

Ok so I'm learning from the book Head First Java, second edition, and I'm having a little trouble with some code. The code I'm working with compiles just fine and gives the output that I want(sort of) but whenever I run the code is doesn't stop, as if it was …

Member Avatar for Zetlin
0
216
Member Avatar for simplyflawless

hey I'm trying to write a method that converts milliseconds to hours, minutes, and seconds using the following header: public static String convertMillis(long millis) My method needs to return a string as hours:minutes:seconds. For example, convertMillis(5500) returns a string 0:0:5. this is what i have so far, can someone please …

Member Avatar for Zetlin
0
5K
Member Avatar for BEBELINDO

[code]import java.applet.*; import javax.swing.*; import java.io.*; import java.net.*; public class Audioapp extends JApplet { public class Sound // Holds one audio file { private AudioClip song; // Sound player private URL songPath; // Sound path Sound(String filename) { try { songPath = new URL(getCodeBase(),filename); // Get the Sound URL song …

0
52
Member Avatar for emteez

I am Linux server with cPanel. My problem is that i keep getting PermGenSpace error; even though i have set the -Xms and -Xmx attributes in starttomcat under /usr/sbin. I have searched thru the net, but I am not been able to find any solution to my problem. Any suggestions?

Member Avatar for ~s.o.s~
0
66
Member Avatar for benasour

[CODE]private List list(int... ints) { List result = new ArrayList(); for (int i : ints) { result.add(i); } return result; }[/CODE] I got this method from one of my friends and wondered what it does? I have never seen int... ints construct before but am assuming it is an array …

Member Avatar for BestJewSinceJC
0
83
Member Avatar for jfAdik

Hello Coders out there... I posted my code for a binary search tree assignment and the code is a working code... :::::DETAILS TO KNOW ABOUT THE CODE:::::: the program is required to 1. ask user the HEIGHT OF THE TREE which will determine the length of the array.. 2.and then …

0
45
Member Avatar for Lokeshmsit

i m creating a Client/Server application in which my server and client can be on the same or on different machines but both are under ISP. [B]My RMI programs[/B]:- -Remote Interface:- [CODE]//Calculator.java public interface Calculator extends java.rmi.Remote { public long add(long a, long b) throws java.rmi.RemoteException; public long sub(long a, …

0
170
Member Avatar for cool_jatish

Hi everybody..................... how to read a unicode characters (arabic characters) form ResultSet object which appears after extraction as question marks like this(?????) ................. I want to display the fetched UNICODE word from the database and display it in JTextArea............... but getting the same output..............[??????] If anyone knows method to display …

Member Avatar for cool_jatish
0
145
Member Avatar for gayatrib

Hey i have a problem with jsp can anybody help me plz? I want to fetch the data stored on server from the client. If anybody has any solution plz let me know... Basically i want to run the project stored on server from client.... what are the steps for …

-1
59
Member Avatar for bertyhell

I'm looking for a package that can convert a phone number to its country code i know how to write it myself but beter to check the net first anybody ever heard of something like this? eg: 0032586987 > Belgium please give me a link it would save me enormous …

Member Avatar for bertyhell
0
4K
Member Avatar for halluc1nati0n

Aight. I have a query regarding File I/O : [CODE]// Keep reading the file in a loop for some 100 seconds.. for (int x=0; x<100; x++) { // Code for reading file - say readFile() Thread.currentThread().sleep(1000); /* sleep for one second */ }[/CODE] Now, I need to read a file …

Member Avatar for halluc1nati0n
0
621
Member Avatar for JSPnewbie

I have a problem I hope someone can help me with in JSP. Whenever I write code in the JSP page, netbeans underlines it as illegal saying "The content of elements must contain well formed character data" E.g [CODE]<% System.out.println(request.getParameter("user")); %>[/CODE] Why is this wrong? I haven't been able to …

Member Avatar for peter_budo
0
87
Member Avatar for doha786

hi, i am looking for simple method to copy more than 2/3 arrays into one array.. so far i just learn to copy only two arrays at a time.. [CODE]String[][] data=new String [10][]; String[] column={"Name", "Age", "Sex"}; String[][] first={{"Calvin", "male", "23"}, {"Kathy","female","21"}}; String[][] second={{"Ravi","male","26"},{"Jesan","male","25"}}; String[][] third={{"Jacky", "male", "32"}, {"Jami","female", "23"}}; …

0
73
Member Avatar for gigsniper

[CODE]client.java:18803: orphaned case case 130: // Clicking some stuff in game ^ client.java:24856: illegal start of expression private int somejunk; ^ client.java:24948: illegal start of expression public int EssenceMineX[] = { 2893, 2921, 2911, 2926, 2899}; ^ client.java:24949: illegal start of expression public int EssenceMineY[] = { 4846, 4846, 4832, …

Member Avatar for masijade
0
140
Member Avatar for BobbieJean

Hi, I'm having trouble with...I don't know, either choosing the correct loop to use or maybe using the one I need but having it incorrectly placed. Right now, the program will give the "Invalid item number" message from my else statement if I enter an invalid value in the first …

Member Avatar for BobbieJean
0
98
Member Avatar for BobbieJean

Hi, I've been working on this program for nearly two days straight and I just can't get it quite right. So it's supposed to get input from the user and apply it to a switch statement. There are 5 cases that represent the cost per item for each case. Then …

Member Avatar for BobbieJean
0
102
Member Avatar for sirtrucker

I have my calculator GUI to display as I want it too. When I put in my mortgage amount and choose an option from the drop down box and hit calculate everything works as it should but when I try to manually put in the terms and interest rate and …

Member Avatar for jwenting
0
200
Member Avatar for chico9

Hi all, I'm working on a Hanjie solver and this is part of the code. Everything else seems okay but I always get an error when I run it. Eclipse (i'm using Galileo version) points the exception to be at: [CODE] char a = combo1.get(i).charAt(i);[/CODE] combo1 ...refers to a List<String> …

0
94
Member Avatar for iamsmooth

So I have junit tests, let's pretend this is my code: [CODE] @Test public void test1() { Object o = new Object("123"); AssertTrue(o.string == "123"); } @Test public void test2() { Object o = new Object("456"); AssertTrue(o.string == "456"); } [/CODE] Let's pretend the code has a public string field …

Member Avatar for iamsmooth
0
99
Member Avatar for chaos123456

Hi all [CODE]import java.io.*; public class POManager { private static String posFname = "C:/ITM200/OOP-Advanced-Topics/src/po.txt"; private static String taxposFname = "C:/ITM200/OOP-Advanced-Topics/src/tax.txt"; public static void main(String [] args) throws IOException { PO[] pos = readPOFile(); writePOTaxFile(pos); } public static PO[] readPOFile() throws IOException { BufferedReader in = new BufferedReader(new FileReader(posFname)); in.readLine(); String …

Member Avatar for chaos123456
0
632

The End.