32,204 Topics

Member Avatar for
Member Avatar for pooja.shinde

I want to verify users using **Active directory**. I have simple code to connect to **LDAP server** from LDAP client. But it is giving "**Naming Exception :- simple bind fail**" msg. Can anyone help with this?

Member Avatar for ejosiah
0
62
Member Avatar for am30568

I new with database and java.I want to show result of the table WHERE USER = USER LOGIN NAME private void query() { try { Class.forName("oracle.jdbc.driver.OracleDriver"); Connection con = DriverManager.getConnection("jdbc:oracle:thin:@andy-lcoyx7gfw:1521:orcl", "andy", "andy"); String sql = "select * from schedules where (userName = @User) "; //'{$_SESSION['username']}' Statement stmt = con.createStatement(); ResultSet …

Member Avatar for ejosiah
0
702
Member Avatar for jdseader

I have written many FORTRAN codes, but am new to Java, which I find much more powerful and more difficult. I have a program that was written several years ago in MS Access. The program consists of a main window with buttons that take you to other windows where you …

Member Avatar for twmgeo
0
848
Member Avatar for trektrak

Hey Guys, I'm playing with android webview.. and I would like to have it running background whenever I press home button... Please let me know if this is possible... Here are the codes, maybe I need to tweak anything .. package trektrak.GeoWebView; import android.app.Activity; import android.os.Bundle; import android.webkit.GeolocationPermissions; import android.webkit.WebChromeClient; …

Member Avatar for ejosiah
0
240
Member Avatar for enakta13

I intend to write a GUI java program which convert a decimal(base 10) to hexadecimal(base 16). Floating point decimals are also valid input. the code of my program private void myEnterButtonActionPerformed(java.awt.event.ActionEvent evt) { float mynum; mynum = Float.parseFloat(this.myNumberField.getText()); Float floatObject = Float.valueOf(mynum); myResultField.setText(Float.toHexString(mynum)); } but when I run the program, …

Member Avatar for enakta13
0
440
Member Avatar for 47pirates

I'm trying to make a search by different option say A, B . what i need is if user provide value of A only then it does the searching using parameter A only , if user provide A and B then it needs to do searching using condition A=value1 AND …

Member Avatar for 47pirates
0
304
Member Avatar for tracydo

Hi I'm writting this code to prepare electricity for as many users as there are input. I don't got when I compile it always shows something where the "if" start. I need a fresh look please. Thanks [code] import java.text.*; // format output import java.util.*; // Scanner class public class …

Member Avatar for Ezzaral
0
1K
Member Avatar for alemojarro
Member Avatar for alemojarro

I can get it to save then load but it does it at the same time and not seperatly public void Load() { try { System.out.println("Where would you like to Load from?"); BufferedReader reader = new BufferedReader(new FileReader(Input.next())); String line; int count = 0; list = new doublyLinkedList(); while ((line …

Member Avatar for stultuske
0
86
Member Avatar for intelnf09

I am not sure if I am doing this correctly since it has been awhile since I last used Daniweb. I need some help with the code that I have submitted and am getting the following two errors. I am new to java and not sure of what to do. …

Member Avatar for NormR1
0
1K
Member Avatar for sameerge

Hi I need the answers one of my two questions which were asked by our teacher in class room. Q1. Languagess are system software or application software? Q2. In which software the languages are written? for example in which software the c++ language is written? plz give your answer with …

Member Avatar for WaltP
0
216
Member Avatar for Valiantangel

Hey after all the fuss about Composition and inheritance and drilling in the fact that Composition is superior,I dont understand why the need to know ploymorphism?Since it is gotten through inheritance.Is this a joke? Whats the industry practice?Are they use **widely**?

Member Avatar for stultuske
0
94
Member Avatar for km2011

Hello everyone, i want to do the summation below: x1= a0*x0 x2= x1+ a1*x1 x3= x1 + x2 + a2*x2 and so on............ supose we know x0 = 2; a0=1 ; a1 = 3; a2 = 2; how do i use for loop to do this? should i keep it …

Member Avatar for km2011
0
189
Member Avatar for javabegginer

Hello, I just needed some help with a code error. When I compile the code below, I keep getting this error: Program2.java:12: error: ';' expected Scanner keyboard = new Scanner(System.in); 1 error Could somebody please let me know what I am doing wrong? Thanks. import java.util.Scanner; // Needed for Scanner …

Member Avatar for poojavb
0
277
Member Avatar for Valiantangel

Can anyone correct my mistake. Provided code: public void testSetBaseSalaryNegative() { final double altBaseSalary = -999.99; try { emp.setBaseSalary(altBaseSalary); // Expecting an IllegalArgumentException fail ("Negative base-salary values should be rejected by setBaseSalary and result in an IllegalArgumentException"); } catch (IllegalArgumentException ex) { // This is the nominal case } catch …

Member Avatar for JamesCherrill
0
94
Member Avatar for ganges

hi how to fix org.hibernate.HibernateException i am using eclipse and oracle 10g thanking you

Member Avatar for rubberman
0
242
Member Avatar for Valiantangel

How can i implement this constructor? I tried replacing commissionEmployee = new CommissionEmployee with this but the complier asked me to create another constructor. public class BasePlusCommissionEmployeeComposition { private double baseSalary; private CommissionEmployee commissionEmployee; // six-argument constructor public BasePlusCommissionEmployeeComposition( String first, String last, String ssn, double sales, double rate, double …

Member Avatar for JamesCherrill
0
210
Member Avatar for 47pirates

there are two panel in one panel there is search button and in the another one there is Jtable for displaying search result. In that jtable initially all the records are displayed. But when i try to search, it works but the problem is that i need to click search …

Member Avatar for 47pirates
0
424
Member Avatar for Valiantangel

Hi, What is for ( : ) in java.i know what a loop is but lately when i am doing excercises these keep coming up Example:** for(Field currentField : emp.getClass().getDeclaredFields())**

Member Avatar for JamesCherrill
0
136
Member Avatar for chudapati09

I created a JTree and also created a class which implements `TreeSelectionListener` then I pass that object into the JTree's function `addTreeSelectionListener`. In the [JavaDocs](http://docs.oracle.com/javase/tutorial/uiswing/examples/components/TreeDemoProject/src/components/TreeDemo.java), there is an example where they implemented the function `public void valueChanged(TreeSelectionEvent e)` within the main class and passed `this` into `addTreeSelectionListener`. I tried to …

Member Avatar for JamesCherrill
0
179
Member Avatar for SuchANewb

Hello everybody! My roommate had a problem and asked me for some help. I do not write in Java so I would need some help translating my code from PHP into Java. Here is the code: <?php mysql_connect ( "someserver", "someusername", "somepassword" ) ; mysql_select_db("somedatabase"); $q = mysql_query ( "SELECT …

Member Avatar for NormR1
0
426
Member Avatar for yavindu

What is the difference between import static java.lang.System; and import static java.lang.System.*;

Member Avatar for poojavb
0
77
Member Avatar for el33t

I'm beginning android development and was going through some guides in which I tumbled across this piece of code : myEditText.setOnKeyListener (new OnKeyListener() { public boolean onKey(View v, int keyCode, KeyEvent event) { if (event.getAction() == KeyEvent.ACTION_DOWN) if (keyCode == KeyEvent.KEYCODE_DPAD_CENTER) { todoItems.add(0, myEditText.getText().toString()); aa.notifyDataSetChanged(); myEditText.setText(“”); return true; } return …

Member Avatar for el33t
0
97
Member Avatar for SuperManofBC

public void findHighestNumber(int timesToLoop) { int highNumber = 0; int counter = 0; int userInput = 0; while(counter < timesToLoop) { System.out.print("Enter a whole number: "); userInput = reader.getInput(); counter++; System.out.println(""); } if(userInput > highNumber) { highNumber = userInput; } if(counter == timesToLoop) { System.out.println("Finished looping! Highest is " +highNumber); …

Member Avatar for SuperManofBC
0
134
Member Avatar for juliermills
Member Avatar for Akill10
0
225
Member Avatar for vilas_tadoori

**Pyramid Pattern** Dear Listers, I am in the process of wrting a java code that prints the following pattern 123454321 1234*4321 123***321 12*****21 1*******1 This is the code that I have written as public class Pyramid { public static void main(String[] args) { int j; for (int i=1; i<5; i++) …

Member Avatar for NormR1
0
995
Member Avatar for Jdan2388

hi all, i am building a squared pyramid calculator and writing all the code from scratch, but I seem to have run into my first problem though. i am giving the user a welcome message and then giving them a dropdown menu asking them what they want to "adjust" for …

Member Avatar for stultuske
0
230
Member Avatar for pritish.kamath

Can Anyone please take a loo at this code and tell me whats wrong??? Sorry.................for the indentation is screwed :( import java.applet.*; import java.awt.*; import java.net.*; import java.awt.event.*; import java.util.*; public class Pritish extends Applet implements ActionListener implements Runnable { Thread t,t1; public void init() { String link1 = "yahoo"; …

Member Avatar for stultuske
0
116
Member Avatar for neti1987

hi! I have 2 columns SWT table. but when I insert data (from Mysql query), it appear only in the first column. for make it show in the second, I have to change the size of the column and then the data appear. so right now, after every query, I …

Member Avatar for stultuske
0
220
Member Avatar for RyMarr475

I want to do something like a high scores list in my game application. I was wondering, if I can load a picture file into my game, why can't I add a text file? How would I go about having my program add text to a text file, and is …

Member Avatar for NormR1
0
104

The End.