36,051 Topics

Member Avatar for
Member Avatar for nomemory

Hello, I am a python newbie and I am trying to accommodate to the basics. What's the python equivalent for the following Java snippet ? [B]Java:[/B] [CODE]public class Main { public static void main(String args[]){ int a,b,c; a= (int) (Math.random()*100); c=0; while((b=(int)(Math.random()*100))!=a){ c+=1; } System.out.println(c); } }[/CODE] I was trying …

Member Avatar for woooee
1
217
Member Avatar for xilamei

hi... i do really need your help guys... its about mobile application in netbeans IDE 6.7.1 im a total newbie here... so, im asking for your help... so here it goes, i am planning to create a mobile application with the use of netbeans IDE 6.7.1, and the outcome would …

Member Avatar for Salem
-1
143
Member Avatar for MxDev

Hi guys, Visual studio contains alot of controls which facilitate the development of application using C#. Is there any workaround to use this controls in Netbeans IDE or any plugins to make Netbeans as reach as Visual studio in controls. Thanks in advance

Member Avatar for peter_budo
0
106
Member Avatar for jrosh

I created jar file and it can be run well through comand prompt.. (using java -jar <file name>) How can I make it run by clicking the the .jar file ?????

Member Avatar for peter_budo
0
84
Member Avatar for ceyesuma

[i] Topic The topic of this question is: school_http-Netbeans ex. Of MVC model 2 db connections [/i] [icode] Hello and Thank you in advance for any assistance. [/icode] ……………………………………………………………………………………………………………………………………………………………………………………………… System: System info: Netbeans6.7.1,jsf1.2,MySQL ……………………………………………………………………………………………………………………………………………………………………………………………… Purpose: The purpose of this post is: Understand why attached program compiles but after the initial …

0
89
Member Avatar for moyphus

[B]Is it possible calling struts from EJB (or) not[/B]. please I need an example for this...just calling Struts from EJB part is enough. How to call a DAO class from either Struts (or) EJB...I need an example for this too...Calling part and other configuration such as web.xml part

0
66
Member Avatar for feoperro

Hi, I was wondering if there's a framework that can help me with the following: I currently have regex checks on html input fields that work 100%, I would like to also have a check to the database for duplicate records so that if the user enters an ID that …

Member Avatar for peter_budo
0
121
Member Avatar for cissi

Hi! When I click on h:outputLink after using the browsers back button I get a viewExpiredException. Som info of my setting in web.xml: org.apache.myfaces.SERIALIZE_STATE_IN_SESSION true javax.faces.STATE_SAVING_METHOD client How can I fix this or go around the problem. I am using jsf 1.2.

0
103
Member Avatar for narayanc1

Hai, I am developing an application to send and receive data via bluetooth for Symbian mobiles.We have a scanner with built in linux and some C++ program.A C++ Dll is given to communicate by using Windows Mobile 5 and Windows Mobile 6.When we worked using .Net application when the Serial …

Member Avatar for narayanc1
0
119
Member Avatar for jrosh

I created a jar file using cmd prompt. when i run it using : jar cvfm <filename>.jar manifest.txt *.class gives the error: java.io.IOException : invalid header field.... Please help me to solve this...

Member Avatar for jrosh
0
144
Member Avatar for jrosh

I managed to create a <filename>.bat file using a jar creator . It also creates <filename>.jar file but when i click .bat file it says unsupportedClassVersionError: bad version number in .class file .jar file says could not find the main class... how can I overcome this???

Member Avatar for masijade
0
110
Member Avatar for ishlux

Hi all, I have downloaded mysql, please tell me how to create database, and tables in mysql, .. just forward me the queries for how to create table, database, and how to make database connection in my jsp code...........reply me soon pls.......... give me example code,,,, i wil try to …

Member Avatar for masijade
0
70
Member Avatar for Nithya.G

Iam getting an equation as input in a string example: 3x^2+4x^2=0 I have to split the above equation and i have store numbers, symbols, and operators and power number separately ... am using java language... Plz Help me to solve... Thanx in Advance Nithya

Member Avatar for Nithya.G
0
85
Member Avatar for Rurik16

I'm creating a game where the goal is to roll two dice and if you get a 7 or 11 you win 10 points, otherwise you lose 5. You start with 100 points. I have everything set up so far but I don't know how to keep the program going …

Member Avatar for Rurik16
0
177
Member Avatar for KimJack

Hi all, I have a quick question. Is this a proper way of using blackbox testing to test the stringTokenizer class? If not, would you provide a proper example that displays the pass or fail. [code] string = "cat, dog"; StringTokenizer token = new StringTokenizer(string, ","); if (token.countTokens() == 2) …

Member Avatar for BestJewSinceJC
0
126
Member Avatar for TheWhite

I have 1 package that manages the main JFrame of my application. This JFrame needs to access an image (which is a resource) of another package. I was able to get it to work using: [CODE=JAVA]new ImageIcon(getClass().getResource("../"+packageName+"/icon.jpg"));[/CODE] But this does not work when using a runnable jar (getClass().getResource("../"+packageName+"/icon.jpg")) returns null). …

Member Avatar for majestic0110
0
119
Member Avatar for cssatheesh

Hi, Im working on a POC in velocity. Want to know whether using velocity can we populate a template based on records in a JDBC ResultSet instance?If so kindly provide the link that has document or example. Typically a resultset will be put in the VelocityContext. In vm file we …

0
51
Member Avatar for nope3d

I am having a problem in this program....can anybody help me create a BufferedReader out of this maze problem...then i have to create a text document entitled with maze.txt... well here is my program [code] import java.io.*; import java.util.*; public class Amazing{ public static void main(String[]args){ Scanner console=new Scanner(System.in); FileWriter …

Member Avatar for nope3d
0
127
Member Avatar for iclaat
Member Avatar for eamo27
0
70
Member Avatar for smitamutha

Hi All, I want to run a java command thru java program. Can any one tell me how can i do it. Thanks , Smita

Member Avatar for marutiskutre
0
154
Member Avatar for jrosh
Member Avatar for majestic0110
0
122
Member Avatar for beanboy

hi helper,.... i'm trying to implement meta search engine(java, jsp) for a website. trying to use carrot2 for organising search results and using yahoo search API. pls give me an idea of implementing a meta search engine.i googled but didnot find any material in net. thx beanboy.

0
82
Member Avatar for nicolek808

The program requires an integer input from a user at the command args and prints out the numbers backward. I have this so far, however, it only prints 1 number, which is the number entered into args. [code=java] public class KashiwabaraNicole7 { /******************************************************************************* * Initializes program * @ param commandlineArguments …

Member Avatar for nicolek808
0
124
Member Avatar for shahravi88

Write a Java Program that prompts the user to enter his/her first name and last name, then displays a message to welcome the user into the class CIS 226. If the user hits Cancel on either first or last name, show the error message: [code] import javax.swing.JOptionPane; public class Assign2 …

Member Avatar for javaAddict
0
117
Member Avatar for kahaj

I'm attempting to learn Java. I'm finding it to be frustrating and quite foreign from most other languages. I have something here typed exactly as the book has it. According to the book, it should be working, but it's not. Any tips would be SO great! I really feel like …

Member Avatar for javaAddict
0
121
Member Avatar for jrosh

How do I add a picture as a background to my Jpanel??? please let me knw the easiest way...

Member Avatar for peter_budo
0
50
Member Avatar for jrosh
Member Avatar for msi_333
0
116
Member Avatar for sbhavan

Hello All, I have developed a utility class for my own purpose to do some repeated task for my work. In that I want to do some routine task when ever I call any of the method of the class through its object. For Example, If my class is StringUtil.class …

0
103
Member Avatar for MxDev

Hi guys, Is there any JSP IDE which facilitate the development of webpages as in ASP.NET using Visual studio with minimal written code. Thanks in advance

Member Avatar for qhuwn
0
132
Member Avatar for chitech

plaese i need help.I am trying to design a Fish farm diary using Java. Please i dont know how to go about it.It will have the following:- a) Diary Module This is basically a text editor embedded in the main window. The user should be able to select a date …

0
37
Member Avatar for ishlux
Member Avatar for stephen84s
0
119
Member Avatar for ganesh5155

Input Output Less than 10 “Too Cold” 10-20 “Average” 21-30 “Hot” Bigger than 30 “Too Hot” (i) If the user enter 2, (ii) If the user enter 10 (iii) If the user enter 23, (iv) If the user enter 70, can anybody help me......... thanks......

Member Avatar for javaAddict
-1
89
Member Avatar for Gekke11

Hi, can anyone help me? I am having trouble with an application I have to make, but I recently started with Java, so I am not very good at it. For your information, it is an application, made with JCreator. At lines: 21, 26 ,31 and 36 it states that …

Member Avatar for tha_ratl
0
101
Member Avatar for anna030208

please help me to make a simple payroll application using java programs..please. tnx..in advance..God bless...

Member Avatar for sbhavan
0
141
Member Avatar for fox07

Convert Number to Words Kindly Help me Explain this Line of Codes. Line by Line if possible. It was given to me by my friend. Hoping for Some Help. Thank you very much. [CODE] import java.util.Scanner; public class WordNumber{ public static void main(String[]args){ for(int i = 0; i < 20; …

Member Avatar for sbhavan
0
130
Member Avatar for sbhavan

I have developed an applicatio using RMI to broad cast some messages to the clients from the server. When we send message from the server it will be displayed in the clients in a message box. But the displayed message box is behind all other active windows, and the client …

Member Avatar for sbhavan
0
557
Member Avatar for ZER09

i am a newbe in java can you help about this thig. How to create a class inside a class in net beans? pls help me

Member Avatar for majestic0110
0
44
Member Avatar for bkvijay

I want to know how can we read the texts that are in a webpage and store it in a file in our local disk. i want to read the text line by line and store it in the text file in my local disk. can anyone help me???

Member Avatar for muthu_tek
0
1K
Member Avatar for srinivasaprasad

please can any one help and give some porcedure in develping of an messenger. i what to develop an integrated messenger so i have to staus of different messenges users login status is their any apis for this .if please give me some information

Member Avatar for ithelp
0
93
Member Avatar for jrosh
Member Avatar for demi88

Hi to all! i need help for my program i need to read and write csv file this will be the input in my csv file folder assigned letter depth \a m 0 \b n 0 \b\c n 1 \b\c\d o 2 \b\c\d\e p 3 \b\c\d\e\f n 4 \b\g n …

Member Avatar for masijade
0
181
Member Avatar for carsein

Hello...I have question about thread. Why we have to dispose our thread? What happened if we don't do it? Can I only dispose() method to dispose my thread? Thanx:)

Member Avatar for carsein
0
89
Member Avatar for ishlux

Hi all, I am New to jsp, i want to create database,, i have ms access, but it does not store more data, so i want to mysql database , give me the link , which version wil be better for my jsp application ......reply soon pls...and tel how to …

Member Avatar for Thirusha
0
154
Member Avatar for DeepaKannan

Hi, I want to generate Jasper Report.I'm using the following jar as 1)classes12 2)commons-beanutils-1.5 3)commons-collections-2.1 4)commons-digester-1.7 5)commons-logging-1.0.2 6)jasperreports-1.2.1 I used JDK1.5 ..I successfully Generate the Report but while client side they faces the following exception as java.io.FileNotFoundException: F:\MBSWorkspace\JasperReport\Sample_1252478220359_232342.class (The system cannot find the file specified) at java.io.FileInputStream.open(Native Method) at java.io.FileInputStream.<init>(Unknown …

0
47
Member Avatar for sbhavan

Hi, Everybody, I have to write program to validate the form fields in java to validate in server side. For that I have a form base validater and in that validater is will use the generic validators like StringValidator, NumericValidator, etc. to validate the values retrieved from the form. And …

0
57
Member Avatar for ishlux

Hi all, I am getting this error:java.lang.ClassNotFoundException: sun:jdbc:odbc:JdbcOdbcDriver . when i run my jsp code [code=java] <html> <head><title>registration page</title></head> <body> <%@ page import="javax.sql.*,java.sql.*,javax.servlet.*,javax.servlet.http.*"%> <%! String firstname1;String lastname1;String email1;String address1; String state1; String password1; int phno1;String cpassword1;%> <% String firstname1 = request.getParameter("fname"); %> <% String lastname1 = request.getParameter("lname"); %> <% String …

Member Avatar for ishlux
0
887
Member Avatar for dmonopoly10

I don't understand what this code does. I really just want an explanation for the part between the /**********************************/ /**********************************/ It was predominantly found at the following site: [url]http://www.ch-werner.de/javasqlite/[/url] (the actually code is in the 'test program' link at this site). You'll notice parts are different because I edited/added parts. …

Member Avatar for masijade
0
528
Member Avatar for ceyesuma

[i] Topic The topic of this question is: faces-config not working. [/i] [icode] Hello and Thank you in advance for any assistance. [/icode] ……………………………………………………………………………………………………………………………………………………………………………………………… [u] [b] System: [/b] [/u] [b] System info:netbeans6.7.1,jsf1.2 [/b] ……………………………………………………………………………………………………………………………………………………………………………………………… [u] [b] Purpose: [/b] [/u] [b] The purpose of this post is: understand why the model.java …

Member Avatar for ceyesuma
0
144
Member Avatar for Whilliam

Hello. I'm trying to make a calculator with JFrame. I'm only gonna make the appearance of the calculator (not functioning). The numbers and operators are supposed to be arranged this way: 7 8 9 + 4 5 6 - 1 2 3 x # 0 * / however, I only …

Member Avatar for Whilliam
0
2K
Member Avatar for rainny

I wish to develop a program which used to play the sound file. The problem I face now is I wish can play the sound file when select the userID from mysql database. For example, when I select one of the userID from combobox, then the sound file can automatically …

Member Avatar for rainny
0
173

The End.