35,618 Topics

Member Avatar for
Member Avatar for P00dle

[CODE]try { File realFile = new File(file); boolean rename = realFile.renameTo(new File("C:\\Dummy Files 2\\" + file)); if (rename) { System.out.println(file + " was moved succesfully"); boolean delete = realFile.delete(); if (delete) { System.out.println(realFile.getAbsolutePath() + " was deleted"); } else { System.out.println(realFile.getAbsolutePath() + " could not be deleted"); } } else …

Member Avatar for P00dle
0
332
Member Avatar for sukritiboo11
Member Avatar for kishore sy
-1
65
Member Avatar for angellove40

//I am just practing java in vacation.So i tried to create JFrame with Events Handling //But getting error .Also i want to know that when i click submit button the new frame //appear and the old frame must get disappear .PLS help import java.awt.*; import java.awt.event.*; import javax.swing.*; public class …

Member Avatar for NormR1
0
216
Member Avatar for kefeir

[code]import java.awt.*; import java.awt.event.*; import javax.swing.*; public class fahrenheitPanel extends JFrame { { } private JLabel JLCelsius, JLFahrenheit; private JTextField JTFahrenheit,JTCelsius; private JButton Convert; private ConvertButtonHandler cHandler; public fahrenheitPanel() {//the constructor JLCelsius=new JLabel("fahrenheit",SwingConstants.LEFT);//creating the JLabels for celsius JLFahrenheit=new JLabel("Celsius",SwingConstants.LEFT);//creating the JLabels for fahrenheit JTFahrenheit=new JTextField("0");//crealting the textfield for fahrenheit JTCelsius=new …

Member Avatar for NormR1
0
252
Member Avatar for hazeeel

I have to read the co-ordinates of a 3D object from the txt file and store it in an array. But I need to store it in a JAR file so that I can view the final product in my visualizer (Jmol). How do I get about in doing that?

Member Avatar for NormR1
0
155
Member Avatar for P00dle

I'm trying to move a file to a different directory using .renameTo() This isn't working, as the file is still in the original dir after the code has completed, and there is a copy of the file in the target directory. I tried deleting the original file, which doesn't work. …

Member Avatar for P00dle
0
255
Member Avatar for ttchiwandire

Hie guys, I'm very glad to forward my burden to you, because I know I can consider it solved already. Right, I've been developing a website in java(netbeans IDE) using Hibernate and Java Server Faces. Now I've reached the stage of reporting. One tool I have researched about is Jasper …

0
40
Member Avatar for Sidharth Agarwa

Hi I have a small issue with displaying xml document when tried retriving in jsp page. This is the complete code: [code]<%@ page import="java.io.*" %> <%@ page import=" org.xmldb.api.base.*" %> <%@ page import=" org.xmldb.api.modules.*" %> <%@ page import=" org.xmldb.api.*" %> <%@ page import=" javax.xml.transform.OutputKeys" %> <%@ page import=" javax.servlet.jsp.*" %> …

Member Avatar for ~s.o.s~
0
162
Member Avatar for SeanC

I am familiar with the differences between public and private. However, I read many online explanations about 'protected'. What I gather is that a protected field can be viewed and manipulated by all classes within the package, and all subsequent subclasses, ragardless of what package they are in right? Well …

Member Avatar for bulger2503
0
125
Member Avatar for Asian_shalicool

hi,i am it student,ineed to help to have a simple java of an on reservation system using jsp.i just need java souse code how to connect access data base using jsp,please can any help me

Member Avatar for musthafa.aj
0
75
Member Avatar for mavs123

Create a program with this problem using the “Observer pattern”, STRICTLY When a Message is sent to a Mailing List, the Mailing List sends a copy of the Message to every Inbox that has subscribed to the List. When an Inbox receives a message, it displays this notification: New Message …

Member Avatar for mavs123
0
124
Member Avatar for raghujosh

I am trying to connect to SQL SERVER 2008 using a JDBC connection. I have read some older posts on this topic(SQL server 2000, SQL server 2005) and I feel there may be some minor variations and so am posting on this forum. I am running win XP with SP …

Member Avatar for raghujosh
0
495
Member Avatar for ahmedshayan

I have been trying to connect Database in Java for a quit time now. Following is the code. I have worked with .mdb extension, but this time I am using .accdb extension. Database File. [icode] import java.sql.*; class DB{ static Connection con; static Statement sta; static void getDBConnection(String path) { …

Member Avatar for NormR1
0
106
Member Avatar for sauravmakkar

hello evry1 my name is saurav and i'm doing my 3rd yr computer engg in diploma and as evry1 knw dat we hav to make a project in the last yr. so can u plzz suggest me some topics in java and .net bcas i'm a diploma student. plzz suggest …

Member Avatar for NormR1
-2
86
Member Avatar for thr

Hello there is an easy way to install eclipse plugins on eclipse IDE that explained at below link but i can't use it in linux ubuntu!! this way work properly under windows and mac osx please help me to use this way in my ubuntu lucid lynx linux [url]http://www.venukb.com/2006/08/20/install-eclipse-plugins-the-easy-way[/url] In …

Member Avatar for masijade
0
137
Member Avatar for hidash_in

hi all, i need help from you. i want to upload multiple files to the server. pls tell me how to do this. if anybody has the code pls paste and send without fail. advance thanks hidash

Member Avatar for masijade
-1
639
Member Avatar for prashantharbola

hi, i have checked that the modem i am using is a voice modem. the problem i am facing is while making or receiving call using modem,the sound from the other side i.e the telephone line is clear in the modem ports for headphone ,but the sound from modem to …

0
43
Member Avatar for coroll

Hi!, when im trying to execute following code.i get this error.can any one help me to make it correct. java.sql.SQLException: [Microsoft][ODBC Microsoft Access Driver] Data type mismatch in criteria expression. at sun.jdbc.odbc.JdbcOdbc.createSQLException(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.standardError(Unknown Source) at sun.jdbc.odbc.JdbcOdbc.SQLExecDirect(Unknown Source) at sun.jdbc.odbc.JdbcOdbcStatement.execute(Unknown Source) at sun.jdbc.odbc.JdbcOdbcStatement.executeQuery(Unknown Source) at SelectApp.main(SelectApp.java:18) this is my …

Member Avatar for java_programmer
0
199
Member Avatar for greenman626

I would like to know how to write code for a right circular shift aka lazy susan. Its an array with 10 elements let me show you and example first time throw array it prints 1,2,3,4,5,6,7,8,9,10 second time throw after right circular shift of 3 places for example it prints …

Member Avatar for jon.kiparsky
0
274
Member Avatar for sivaprakashm

how to retaining the value of combo box after page got refreshed Please give me any idea Need help thanks in advance

Member Avatar for NormR1
0
59
Member Avatar for charat

[CODE]import java.util.Scanner; public class FutureInvestment { public static void main(String[] args) { // Display name System.out.println("Programmed by "); Scanner input = new Scanner(System.in); // Prompt user to input investment amount System.out.print("Enter an investment amount: "); double investment = input.nextInt(); // Prompt user to input interest amount System.out.print("Enter an interest rate: …

Member Avatar for WargRider
1
144
Member Avatar for Xessa

[code] String host = host_adress SshClient ssh = new SshClient(); ssh.connect(host,10022); System.out.println("ssh is connected--->"+ssh.isConnected()); PasswordAuthenticationClient passwordAuthenticationClient = new PasswordAuthenticationClient(); passwordAuthenticationClient.setPassword(password); passwordAuthenticationClient.setUsername(username); int result = ssh.authenticate(passwordAuthenticationClient); if(result != AuthenticationProtocolState.COMPLETE){ throw new Exception("Login to host failed"); } ssh.disconnect(); [/code] Above i just want to connect to an FTP server. We gave them …

0
59
Member Avatar for kerek2

Hi all... i need to do some study regarding how to count the multiple int that keep in by user like this :- "Please enter the integer : 1 3 5 66 88 (1+3=4+5=9+66=75+88=163 - the program will terminted cause exceed than 100) how to do ?...i stuck very long …

Member Avatar for stephen84s
0
106
Member Avatar for dahaka

Hi I was using the tutorial in the website [URL="http://jellebeuselinck.wordpress.com/2009/03/05/setting-up-smartgwt/"]http://jellebeuselinck.wordpress.com/2009/03/05/setting-up-smartgwt/[/URL] but when I run the application, the html page comes out blank. I am using GWT 2.0.3 and smartgwt 2.1 . Could it be a compatibility issue? Thank you

0
38
Member Avatar for shilpajmensi

Hi, I have created a Hello servlet , compiled it and deployed the Hello.class in the folder C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\test\WEB-INF\classes manually. In the C:\Program Files\Apache Software Foundation\Tomcat 6.0\webapps\test\WEB-INF folder i have created a web.xml like: [code=xml]<web-app xmlns="http://java.sun.com/xml/ns/j2ee" version="2.4" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http:/java.sun.com/dtd/web-app_2_3.dtd"> <servlet> <servlet-name>Hello</servlet-name> <servlet-class>test.Hello</servlet-class> </servlet> <servlet-mapping> <servlet-name>Hello</servlet-name> <url-pattern>/Hello</url-pattern> </servlet-mapping> …

Member Avatar for ~s.o.s~
0
126
Member Avatar for kerek2

Hi, I need ur help regarding to do this program in java....i need to do program where user can input any number n this program will count until reach 100...if reach then the program will print out :---bla bla bla.....if not user can keep input the integer..how to to?...i'm dizzy …

Member Avatar for kerek2
0
144
Member Avatar for sweetyDoll

Hi! I'm a IT student. I need to have an simple java application of an online reservation system developed by using JSP, Servlets,Beans,JDBC, and Session Handling etc. I just need the java source codes. Please can anyone help me

-3
33
Member Avatar for swati29
Member Avatar for darkocean

Hello everybody, I am c# developer but I have c# application and want to change it with Java because sometimes I have problem. I have 7 modems and my clients send package to my application and I want to listen it with thread ans produce an answer to them. I …

Member Avatar for Jayavardhan
0
120
Member Avatar for Dokka

Hi! I need [B]create a class[/B] to represent a "rock". When a rock object is created it should have print out a message to the console saying: "Rock 1 created". I should have a field that contains the rock's [B]weight[/B], methods to [I]set[/I] and [I]get[/I] the weight and method to …

Member Avatar for tong1
0
270

The End.