179 Topics
|
|
Hey, iv been working on a fairly simple part of my program but it throws a null pointer exception. The error i recieve is : Exception in thread "main" java.lang.NullPointerException at FillStyle.<init>(FillStyle.java:12) at compiler.main(Builder.java:43 The code causing the error is : public FillStyle(int type) { if (type >= 0) { … |
|
I'm trying to write a string out to a file using File.AppendAllText, but I need to do it several times over the course of the program. I'm not using threading, and to give the file time to close, I'm letting my program sleep for a couple of seconds after it … |
|
protected void Button1_Click(object sender, EventArgs e) { try { SqlAddGroup.InsertParameters["mem_email"].DefaultValue = Session["User"].ToString(); SqlAddGroup.InsertParameters["groupname"].DefaultValue = Txtgroup.Text; SqlAddGroup.Insert(); Label1.Text = "Group has been added"; } catch (Exception ex) { Label1.Text = ex.Message; } } <asp:SqlDataSource ID="SqlAddGroup" runat="server" ConflictDetection="CompareAllValues" ConnectionString="<%$ ConnectionStrings:PadmaSMSConnectionString %>" DeleteCommand="DELETE FROM [group] WHERE [sno] = @original_sno AND [mem_email] = @original_mem_email … |
|
I'm trying to load a PNG file into a BufferedImage like so: BufferedImage image = ImageIO.read(new File("smile.png")); When I use this line of code alone, it produes the error: Unhandled Exception Type IOException... I can fix this by surrounding the statement with try/catch like so: BufferedImage image = null; try … |
|
public class Thread8 implements Runnable { Demo d; public static void main(String r[]) { new Thread8().disp(); } void disp() { d = new Demo(); new Thread(new Thread8()).start(); new Thread(new Thread8()).start(); } public void run() { d.fun(Thread.currentThread().getId()); } } class Demo { static long f=0; synchronized void fun(long id) { for(int … |
|
Good morning, I'm coding a game which ovject is to capture the feed of a webcam, then apply some filters to detect movement, so far i've managed to get the webcam to work but when i apply the filters it says "Bitmap locked" i've managed to solve that error, right … |
|
Hello all, I am using Windows server 2008 OS as domain controller. When user's request comes, his id & password are verified across Active directory. If his id & password are already present in active directory then java program returns as valid user or otherwise returns as invalid user. Now, … |
|
i am new to android. While i am running my application, it is running well in landscape mode, but in portrait mode, application is forcefully closed giving the following in log 05-31 16:48:30.958: W/KeyCharacterMap(428): No keyboard for id 0 05-31 16:48:30.958: W/KeyCharacterMap(428): Using default keymap: /system/usr/keychars/qwerty.kcm.bin 05-31 16:50:45.728: D/AndroidRuntime(484): Shutting … |
|
Hai I developed project in visual stdio2005, in this project i used htmlprinter for print a document. using some dlls like Interop.SHDocVw,Interop.DHTMLEDLib, HtmlPrinter, its run well in windows XP. If i will run in windows 7 that make error like **class not registered exception from hresult:0x80040154** I changed target machine … |
|
Heloo,this wil be my first post here, the reason for that is I can't figure this one out by myself public class Client extends Thread{ Socket socket = null; ServerResponse sr = null; private class serverResponse extends Thread{ InputStream in = null; public serverResponse(Socket socket) throws IOException{ if (socket == … |
|
I am trying to create a 2d table that asks for user input to create table size, adds all the numbers across each row, and creates the next row by multiplying by the first row. Here's what I have and it's now giving me an "Exception in thread "main" java.lang.NullPointerException" … |
|
Hey guys im new to java in the process of learning how would i go buy adding exceptions to my code with a try/catch when i divide by zero or enter a word instead of and integer. package errorapp; /** * * @author Brandon */ import javax.swing.JOptionPane; import java.util.InputMismatchException; public … |
|
Hi, I have read something on IBM's site about exception specification and pointers to functions: void (*f)(); void (*g)(); void (*h)() throw (int); void i() { f = h; // h = g; This is an error. } IBM says: > The compiler allows the assignment f = h because … |
|
Hello, I'm in my first year in software development program and need help with the following program. I've spent hours working on it. Any help is greatly appreciated. Write a java program that will open a file, read each of the records from the file, use that data to populate … |
|
Hi, I am having a code which fetches say 200 records,after 6 records i got an exception..So after my exception is caught in catch block i have 2 call a method which can help continuing the exception starting from the 7th object. Can anyone help with some piece of code … |
|
Write a java program that will open a file, read each of the records from the file, use that data to populate a two dimensional array and write the sorted data out to a new text file. Define a class named [B]Munge[/B] which will do all the 'heavy lifting' in … |
|
I created a function that saves a file with a custom extention ".nra" however each time that i enter a file name, it throws ArrayIndexOutOfBoundsException public static void SaveFileNra() throws Exception { if(gl.DataStack.isEmpty()) { System.out.println("There is nothing to save!\n"); Menu(); } else { System.out.print("Enter the directory you wish to save … |
|
I'm trying to write a program that allows a user controlled character to move around a maze. That problem i'm having is having it determine when it runs into a wall. I have a code done up to handle it. I'm just running into some errors i need help cleaning … |
|
I am using two ResultSet in a single statement..this code is a part of servlet.. [CODE] String temp=request.getParameter("cid"); int cid= Integer.parseInt(temp); Class.forName("sun.jdbc.odbc.JdbcOdbcDriver"); Connection con = DriverManager.getConnection("jdbc:odbc:Mydatasource"); PreparedStatement ps = con.prepareStatement("select * from Products where cid=?"); ps.setInt(1, cid); ResultSet rs = ps.executeQuery(); while(rs.next()) { out.println("<a href = 's_BikeServlet?pid="+ rs.getInt(1) + "'>" … |
|
Hey everyone, I am lost on the exception that I have getting thrown at me right now. SqlDateTime overflow. Must be between 1/1/1753 12:00:00 AM and 12/31/9999 11:59:59 PM. What I am trying to do on my site, which is Windows Authenticated on an internal network, is capture the users … |
|
hey, im getting the exception [CODE]Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com.sun.media.jai.codec.SeekableStream at javax.media.jai.operator.BMPDescriptor.class$(BMPDescriptor.java:65) at javax.media.jai.operator.BMPDescriptor.<clinit>(BMPDescriptor.java:87) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java:186) at javax.media.jai.RegistryFileParser.getInstance(RegistryFileParser.java:224) at javax.media.jai.RegistryFileParser.registerDescriptor(RegistryFileParser.java:360) at javax.media.jai.RegistryFileParser.parseFile(RegistryFileParser.java:295) at javax.media.jai.RegistryFileParser.loadOperationRegistry(RegistryFileParser.java:55) at javax.media.jai.OperationRegistry.initializeRegistry(OperationRegistry.java:369) at javax.media.jai.JAI.<clinit>(JAI.java:382) at cbir.window1.ColorHistogram.<init>(ColorHistogram.java:61) at cbir.window1.SearchWindow.jButton1ActionPerformed(SearchWindow.java:92) at cbir.window1.SearchWindow.access$000(SearchWindow.java:22) at cbir.window1.SearchWindow$1.actionPerformed(SearchWindow.java:47) at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:2018) at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2341) at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:402) at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:259) at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:252) … |
|
when i compiple this using rmiregistry, javac for HelloServer2 and HelloClient it says: I've attached all files as well java.rmi.NotBoundException: ReceiveMessageInterface <<No stacktrace available>> [CODE] import java.rmi.*; import java.rmi.registry.*; import java.rmi.server.*; import java.net.*; import java.util.Random; public class HelloServer2 extends java.rmi.server.UnicastRemoteObject implements ReceiveMessageInterface { String address; Registry registry; int a[]=new int[6]; … |
|
Can anyone please help me out in removing this error Exception in thread "main" java.lang.NullPointerException at java.awt.Container.addImpl(Container.java:1045) at java.awt.Container.add(Container.java:365) at Client.<init>(Client.java:33) at Client.main(Client.java:17) [CODE=java] import javax.swing.*; import java.awt.*; import java.awt.event.*; import java.io.*; import java.net.*; public class Client { JFrame frame1; JList list; JList list1; JTextField tf; JButton send; JButton lout; … |
|
Hi All! I'm trying to call a method defined in a jsp that is in my webcontent web application. I placed [CODE] <%@include file="method.jsp"%>[/CODE] in the jsp from where I want to call the method. I get an exception saying: [CODE]org.apache.jasper.JasperException: Unable to compile class for JSP: An error occurred … |
|
I started writing this code as practice for my Computer Science class. The goal was to help with structs and arrays. But I have come to a problem. The file will compile, but returns a message saying "floating point exception." Doing research I see there could a few reasons, but … |
|
Hi, I want to get information from each session set, EXCEPT when the session name is 'navigation': So basically: Create an exception for the session called 'navigation'.. [CODE] foreach ($_SESSION as $name => $value) // $name = navn på session: f.eks. 1 eller 2 - $value indeholder antallet der er … |
|
I am learning directx from [URL="http://www.directxtutorial.com"]directxtutorial.com[/URL] and when I have compiled one of the samples and run it then close it I get an error message saying "Unhandled exception at 0x010a1883 in test.exe: 0xC0000005: Access violation reading location 0x00000000.". What does this mean? I have checked that I have typed … |
|
Hi! My project has two text file:input and output java.util.NoSuchElementException: No line foundread exception Exception in thread "main" java.lang.NullPointerException at java.io.Writer.write(Writer.java:140) at nfa2dfa.NfaToDfa.OutputFile(NfaToDfa.java:217) at nfa2dfa.Main.main(Main.java:30) I don't know what they mean?! |
|
Hello guys, I've newly joined this forum since I want to enhance my knowledge in Programming specially in Visual Basic. So for the important part, right now I'm planning on creating a word detector somehow and there are specific rules I was to set in the textbox in relation with … |
|
While looking into [URL="http://www.had2know.com/academics/gaussian-prime-factorization-calculator.html?blankone=2&result="]Gaussian primes [/URL]I came to think additional ways to check for is number integer or not, what you think is best way? [CODE]epsilon = 1e-11 def is_integer(n): """ traditional abs, epsilon check for near integer """ return abs(n-round(n)) < epsilon def is_integer2(n): return (float(n)- int(n)).as_integer_ratio()[1] == 1 … |
The End.