36,051 Topics
![]() | |
Hi i install openJDK on fedora 12 , after run eclipse this message shown : [QUOTE]JVM terminated. Exit code=-1 -Xms40m -Xmx256m -XX:MaxPermSize=256m -Djava.class.path=/home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -os linux -ws gtk -arch x86 -showsplash /home/mahdi/App/eclipse//plugins/org.eclipse.platform_3.3.201.v200909170800/splash.bmp -launcher /home/mahdi/App/eclipse/eclipse -name Eclipse --launcher.library /home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher.gtk.linux.x86_1.0.200.v20090520/eclipse_1206.so -startup /home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar -vm /usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0/jre/bin/../lib/i386/client/libjvm.so -vmargs -Xms40m -Xmx256m -XX:MaxPermSize=256m -Djava.class.path=/home/mahdi/App/eclipse//plugins/org.eclipse.equinox.launcher_1.0.201.R35x_v20090715.jar[/QUOTE] please help me what … | |
I'm working on a Java program that is calling sqlcmd. It works perfectly on a computer with SQL server installed, but not at all on a computer that doesn't. I want to include the necessary exe and dll files to run this command in my jar. Anyone know which ones … | |
I need to create a JApplet containing a JLabel and a Jbutton. a JButton should automatically change font typeface, style and size when clicked. I have this coding so far : import javax.swing.*; import java.awt.*; import java.awt.event.*; public class JChangeFont extends JFrame implements ActionListener { JLabel name = new JLabel … | |
Hi friends, This is not java technical question. I am doing project java thats why i am posting here. I am doing project for SUMMARIZATION OF DOCUMENT. I finished 90 percent of my project. To test my project i need Data Set ( That means, Document with summarization ) . … | |
I am faced this Problem that I can't print display parent's content. Please help: [CODE] import javax.swing.JOptionPane; public class BinaryTree { private Node root; BinaryTree() { root = null; } //------------------------------------------------------------------ void buildTree() { String n=JOptionPane.showInputDialog("Root Information:\nEnter Name: "); int a=Integer.parseInt(JOptionPane.showInputDialog("Root Information:\nEnter Age of Root:")); String s=JOptionPane.showInputDialog("Root Information:\nAlive or Dead?"); … | |
i coding these line ... it is working fine.... but what i need is compress that [COLOR="Red"]Bufferedimage [/COLOR] before getting it as [COLOR="Green"]Raster[/COLOR] i tried jpeg compreesion but it return bytestream instead of int.. so i got exception "can't cast BufferdByte as BufferedInt"... [CODE] [COLOR="Red"]Bufferedimage [/COLOR]image=robot.createScreenCapture(new Rectangle(width, height)); ////here i … | |
I am attempting to stream accelerometer data from a Python script to a Java midlet via a socket connection on a Nokia N97, using the following code. Unfortunately, this code (which previously worked fine on a N95 8GB) doesn't seem to send any data to the midlet, and I have … | |
Hi all, I want to say first of all that I'm a beginner with jsp. Now I explain my issue: I have a page (called A) where I want to execute some code if user come from page B and other code if user came from page C. How could … | |
Hi, I'm writing a small program to simulate a projectile moving through air in a gravitational field. I have several classes for vectors, the gravitational field, and the projectile itsself. However, when constructing any of these objects in the main method, I get a "cannot find symbol" error, despite the … | |
hi, please give some information regarding dialog box, conformation box in jsf2.0. In my login screen, how to show the success or failed message through dialog box thanks. | |
jsp is a good language or php/mysql for web devlopment process by<FAKE SIGNATURE> | |
Hi, I am developing web application using jsf2.0. In this case, I wish to validate the email field with the help of import org.hibernate.validator.Email; But it is not working, How to validate the email fileld... Thank.:) | |
Hey everyone. i am stuck with some work kindly help A.S.A.P!! Its for Java. Thanx!! 1. Write an application that reads an integer and determines and prints whether it is odd or even. Hint use the remainder operator 2. Write an application that reads two integers, determines whether the first … | |
Hi all, In my program I need to create 2 log files, success and error. But I need to create either one of them, depending on the out come of the program execution. In other words, if program fails for any reason, I need to create the error log file … | |
I'm trying to get a square on a checkerboard to become highlighted when the user clicks on the rectangle. I created all my squares using fillRectangle methods. I'm not sure how to begin implementing this in the mouse adapter. Only the border of the square needs to be highlighted. Would … | |
Hello! I am about to load details from a file and save it to a node. I am having an error regarding to a certain code. Here's the code:: [CODE]boolean loadFromFile(String filename) throws Exception{ boolean b = false; try{ FileInputStream myfile = new FileInputStream(filename); ObjectInputStream in = new ObjectInputStream(myfile); do{ … | |
HI, Can any one know how to convert byte array into char array. For example : byte buf[]=teststr.getBytes(); Note: buf is byte array. I need to convert this into char array. | |
Hi all, I have a java swing based client server application. The GUI is in swing and I am using glass fish as my server. Is there a way or any software available to create an environment where I can test my application by creating virtual user connections so that … | |
Hello I am learning Java at my spare time as a hobby. It only been a week and at the moment I am trying to get my head around the following things fields, constructor, accessors etc. There is an exercise which I ma having trouble with: [U]Human [/U] 1. Create … | |
I wanted to create a java program usig arrays. The program uses the file to input student name, city, grades scores and gender information. From this information the percent and letter grade should be calculated. how do i start? | |
I am trying to figure out how to check for carriage returns in a string. I am reading file contents into a string variable, and need to check if x0D is present (carriage return). I have tried indexOf and matcher so far with no results. Any input would be helpful. … | |
Hi there, I recently added some new code to an existing jsp page, but I don't know why I ma getting this exception. I double ckecked for common errors but I am not sure the reason for this exception. Can anyone help. Thanks. Here is the exception: type Exception report … | |
hey guys, new to gui java. i found some code and have no idea what it does could somebody explain it to me please and help me understand how it could be changed it something more readable [CODE] try { URL url = this.getClass().getClassLoader().getResource(ref); sourceImage = ImageIO.read(url); } catch (IOException … | |
So I have to create a method that creates a custom arrow object and then returns it. No drawing is to be done in the method, it will be drawn once it's returned. I think I'm utilizing GeneralPath the correct way and then casting it to a shape properly but … | |
Hi all, I am pretty much new to Java (I've had experience in C++) and have been working on a "simple" FTP client. I pretty much ended up with the code below. Problem is I get a lot of errors mostly related to the IOException in each method. The errors … | |
hey guys, i am trying to create a simple menu using canvas for example [CODE] class Name extends Canvas{ MenuItem menuitem; public Name(){ JPanel panel = (JPanel) container.getContentPane(); panel.setPreferredSize(new Dimension(800,620)); panel.setLayout(null); setBounds(0,0,900,600); panel.add(this); setLocation( 0, 20 ); MenuBar menuBar = new MenuBar( ); Menu menuFarm = new Menu( "About" ); … | |
Hi, I'm trying to create a program that reads in a line of text. For some reasons, when I try to run the program, "Your input has ---- non-blank characters." comes up under every words. I want it to just come up once at the end. Any help will be … | |
I am trying to get a simple program to work were a image moves across the window. When my program gets to the void hop(int iStart, int iStop) method, repaint does not invoke a new paint. So all I get is a blank screen. How can I get repaint to … | |
hey everyone, i just started working with java graphical user interface, i found some source codes from the web and trying to play around with them and i am just unable to understand it fully, the code is well commented and easy to understand it is a simple game called … | |
branch between three sets of statements: One to display the numbers in descending order from the upper bound down to the lower bound (executed on character input 'd' or 'D'), one to display the numbers in ascending order from the lower bound up to the upper bound (executed on character … | |
I have 2 frames (classes exactly) customer & items... when a button clicked (button 'BUY') on customer frame it navigates to items frame. mean time i made customer frame [B]customer.setEnabled(false) [/B]. i called to item frame by simply creating an object of item class. then , when i coming back … | |
Hello again. :) I am comparing two nodes (some of my other methods need this method). I am having a problem with this method because it returns false even though both nodes have the same content. What are the problems of this code? Any suggestions? This is the critical part … | |
Hi, When I want to run a simple project in NetBeans, I receive an error : [quote] ! was unexpected at this time. c:\MinGW\bin\make.exe: *** [.validate-impl] Error 255 BUILD FAILED (exit value 2, total time: 219ms) [/quote] My eclipse is working properly with this MinGW installed on my computer . … | |
k..but how to write a insert query.. In my project...see below [code] <% try { ResultSet rs=null; Connection con=null; PreparedStatement st=null; Class.forName("org.gjt.mm.mysql.Driver").newInstance(); con = DriverManager.getConnection("jdbc:mysql://localhost/enrollment","root","root1"); st=con.prepareStatement("select f.tot,f.fcid from formcollection f where f.employername='"+empID+"'and f.flag=0"); rs=st.executeQuery(); %> <table width="713" border="1"> <tr> <th width="93" scope="row">Total Form Collected </th> <td width="70"><strong>DE Done </strong></td> <td … | |
Hi all, I am working on a very simple EJB application in Netbeans 6.8 and EJB 3.0. Somethng wierd with the deployment.. I created a new Enterprise Application. But apparantly Build works fine but when i deploy it i get MODULE HAS NOT BEEN DEPLOYED MESSAGE and It Fails.. Am … | |
This is what I'm gonna do and I know I havnt got far, but have been searching on google for 5 hours and dont have the solution yet, Your little sister / brother asks you to help her/him with the multiplication, and you decide to write a java application that … | |
Hey i have a program thats due sunday and my teacher doesn't really teach that well....so i'm kinda confused and need help. problem: read a file of positive intergers and then print each lin and then print each number in the line (i've done this part) this is where i … | |
HI. I am going to store Enumeration in test file(notepad). After each sentence is over one rectangle box is coming. If any one have idea, how to remove that rectangle box. FOR EXAMPLE : [code]// twords is vector //tsenum is Enumeation //wstr3 is string FileOutputStream fw = new FileOutputStream(fileName); tsenum … | |
Hi All, I am writing a script which opens a popup window & then creates a table dynamically (data is coming from sqlquery) I am able to generate the table successfully. Problem - I want to click on any row & select a cell data, the moment I do this, … | |
Which is the most efficient way of creating a string object in java? [icode]String s="helo";[/icode] or [icode]String s=new String("helo");[/icode] in terms of memory usage? Thanks in advance... | |
Hey everyone~! I am pretty new to threading but I'm trying to figure it out by playing around with its possibilities. I wrote a program where 2 threads are supposed to "race" to count to 10 and then the first one there says "I win!" and the second says "I … | |
i have a problem in my code when i go to the method add i successfully go there but i cant go back to the main method someone who can help about this. sorry for my bad english. here is the code: [CODE] package project; import java.util.*; import java.lang.String; /** … | |
Hey everyone~! I have been studying for the AP Computer Science exam, and I have a question where I think Barron's is wrong, so if someone could confirm whether I am correct or not please let me know! The following code snippets are given: [CODE=Java] public interface Player { /* … | |
Hi, I have an urgent ugly problem. I have a php file on a server that reads the name of the files of a directory from the server and POST them to my java application. When I try to read it, i get [CODE]Server returned HTTP response code: 400 for … | |
I'm not sure if this is the best way but I would like to display a list of addresses in a combo box where the columns come from different tables such as Countries, Cities and Types (work and home). I don't want to display the countryID or cityID, etc. but … | |
For Example: java is an object oriented language. it has many feature including 1.1 robust 1.2 inheritance. java is a interesting language. I need output as follows: java is an object oriented language. it has many feature including 1.1 robust 1.2 inheritance. java is a interesting language. Note: I need … | |
Hi, I have a project for Uni, It is to create a system which will allow fingerprint recognition which will allow a user to access a created database and download information to a screen. I have implemented what i want it to look like, now im working on 3 main … | |
Hi guys, why wont this work. I'm still learning and have no experience with graphics of any kind. Just trying to put the image onto the background. The link directory is right i think. [CODE] import java.awt.Color; import java.awt.Graphics; import java.awt.Graphics2D; import java.awt.Image; import javax.swing.*; //inc javax.swing.ImageIcon public class TheArea … | |
My assignement is to write a mortgage caclulator that displays x number of lines pauses then continues to dsiplay another x lines of data. Below is my code and I can not get it to work properly. It slowly prints the first 12 lines then displays everything else at once. … | |
suppose that Box is a class now Box mybox = new Box(); this first creates a reference variable and then mybox is dynamically allocated memory but what difference does it create in allocating memory to a class instance dynamically or during compile time? here what is the advantage of such … |
The End.