Can you please close this thread then? If left open it may get unwelcome attention of "want to be members" in reality spammers. Thanx
(Below last post there will something like "Mark this thread solved" or similar so just click on it)
Can you please close this thread then? If left open it may get unwelcome attention of "want to be members" in reality spammers. Thanx
(Below last post there will something like "Mark this thread solved" or similar so just click on it)
E:/oraclexe/app/oracle/product/10.2.0/server/jdbc/lib/ojdbc14.jar
Have nice day.
There is no need for expert. The error spell it out clearly for you
java.lang.[B]ClassNotFound[/B]Exception: oracle.jdbc.OracleDriver
java.lang.[B]ClassNotFound[/B]Exception: oracle.jdbc.OracleDriver
You either do not have connection drivers at all or you did not let application know where to find this driver (either add it through IDE or on compile provide classpath with location of this driver). To download go here
Can you post your updated code please, so we see what you tried and where can be problem?
I can recommend DailyRazor. I'm using it nearly for a year now (since I moved for previous provider, which was less flexible with configurations).
You have option for Tomcat or JBoss, plus they happy to provide with you with version you want
PS: I just hope that you already bought domain name, because without that you have very small chance in accomplishing your task
For single parameter you will use getParameter(java.lang.String name). If you look just few lines below this method in ServletRequest API you will see getParameterValues(java.lang.String name) to get multiple selection
The radio buttons that select/deselect have to by member of same group that is declared through name. As you are giving each radio current value of "i" they cannot be grouped.
Simple example
<form>
<input type="radio" name="moderator" value="~s.o.s~" checked="checked"/>~s.o.s~<br />
<input type="radio" name="moderator" value="peter_budo" />peter_budo<br/>
<input type="radio" name="moderator" value="Ezzaral" />Ezzaral<br />
<input type="radio" name="administrator" value="cscgal"/>cscgal<br />
<input type="radio" name="administrator" value="happygeek" checked="checked"/>happygeek
</form>
Yes, you should be reasonably OK with it. The reason why not say absolutely fine is that everyone of us has its own reading style preference.
I think it can be good book when moving from one language to another, so you do not have to go through basics that are fairly similar across languages.
However if you absolute novice to programming world then Head First Java or Java - How to Program would be more suitable as they took from absolute basics
I guess you wrong as Planet PDF has 3rd edition on their list and they do not publish illegal content as far I know
wait, ur using a netbeans IDE? i cant see a file reader on your code. you must declare a file reader. i can't remember the code cause im not on my pc. www.w3school.org try to get some help there.
If you looked code properly you will find at the start attempt to read file. Secondly I do not see any Java tutorials on w3schools I guess you mistaken Java for Java Script
@rizillion here is some update on your code
import java.io.*;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
import java.util.*;
import javax.swing.border.*;
class HelpGUI
{
JFrame frame = new JFrame("Help GUI"); // YOU FORGOT TO INSTATIATE JFRAME
JPanel panel1, panel2, panel3;
JTextArea txtHelp;
JScrollPane scrollHelp;
JLabel lblImg;
JButton btnOk;
public HelpGUI()
{
/*java.io.BufferedReader reader = new java.io.BufferedReader(new FileReader("help.txt"));
String temp = null;
StringBuffer message = new StringBuffer();
String newLine = System.getProperty("line.separator");*/
//Scroll Panel
panel1 = new JPanel();
panel1.setLayout(new GridBagLayout());
//Options Panel
panel2 = new JPanel();
panel2.setLayout(new FlowLayout(FlowLayout.RIGHT));
//Image Panel
panel3 = new JPanel();
panel3.setLayout(new GridBagLayout());
lblImg = new JLabel(new ImageIcon("helpIMAGE.jpg"));
lblImg.setHorizontalAlignment(JLabel.CENTER);
panel3.add(lblImg);
//Help ScrollPane
txtHelp = new JTextArea(30, 50);
txtHelp.setLineWrap(true);
//txtHelp.setText("QuickData Management System");
try {
//use buffering, reading one line at a time
//FileReader always assumes default encoding is OK!
BufferedReader input = new BufferedReader(new FileReader("food.txt"));
try {
String line = null; //not declared within while loop
while (( line = input.readLine()) != null){
txtHelp.append(line+"\n");
}
}
finally {
input.close();
}
}
catch (IOException ex){
ex.printStackTrace();
}
txtHelp.setEditable(false);
scrollHelp = new JScrollPane(txtHelp);
scrollHelp.setEnabled(false);
panel1.add(scrollHelp, …
hello evryone.
please someone help me. I want to load the data frm sql server database at the button click...how to load the data using resultset rs.getString("column name") in the <option></option> tag using JSP codes??
The answer can be found in sticky post of JSP section
Threads locked as people only demand solution instead of actually trying to work it out.
Thanx a lot bro!!!. It worked out and sorry for the mistake's, im new to JAVA as well as DANIWEB. thanx again for replying to my thread!!
No need to apologies. 3 years back I was in similar position.
You need to evaluate return value from JOptionPane stored in "n" and compare to possible outcomes so in your case only YES.
int n = JOptionPane.showConfirmDialog( frame,
"Are You sure you want to Close?",
"Confirm Log Off",
JOptionPane.YES_NO_OPTION);
if(n == JOptionPane.YES_OPTION){
//CLOSE APPLICATION ACTION HERE
}
Thanks ! Thirusha i solved the prob myself... was so simple
Would you care to share your solution for benefit of others?
As there is no checking before you attempt to read image and ImageIcon will not throw any errors you need to make sure that provided resource does exists. This tutorial should solve your problem.
PS: In the future when posting any code please use code tags
I'm sorry to say, but you have no idea of basic Java-database communication. For general info on Java web application and database communication have look at this example and you should read Head First Servlets & JSP
There is a thread at the very top of this forum called Starting "Java" [Java tutorials / resources / faq] you will find numerous references there
You must be using very old tutorial then as explicit declaration of path in autoexec.bat is not need it since Java 1.4 if I recall correctly. Please check point 4 of these installation instructions
oh shoot. how to post code correctly, sorry for being so very dumb on this,
[code]YOUR CODE HERE[/code]
[code=asp.net]YOUR CODE HERE[/code]
where asp.net can be replaced by various languages (PHP, ASP, Java, C, C++, JSP, JavaScript, SQL, etc)
If I was on chapter 7 of SCJP study guide I would have answered correctly ;) , but I'm only chapter 3 :$
Create method that will take an ArrayList as an agrument and will have ArrayList as return value. Something along the line of this method showed by masijade in this thread
You need to extract this file and you will get 3 JAR files (poi-3.2-FINAL-20081019.jar, poi-contrib-3.2-FINAL-20081019.jar and poi-scratchpad-3.2-FINAL-20081019.jar, most of the times you will need only poi and poi-scratchpad) plus other documentation.
Then you have to attach it to your project like here
Threads merged
You been asked by number of our members to also include any relevant coding. This is missing and without it there is little hope somebody will attempt to help you...
Edit: Ezzaral provided far better implementation so this removed
public void getAccounts () throws IOException
{
int[]array1;
int value1;
int[]array2;
int value2;
int accumulator = 0;
//Open valid_accounts.txt.
File file = new File("valid_accounts.txt");
Scanner inputFile = new Scanner(file);
//Read lines from the file until there are no more to read.
while (inputFile.hasNext())
{
accumulator++;
array1 = new int[accumulator];
Don't you think something is wrong with the red section? You tell your application to open file for reading. You request to read file while there is some token to read. After this you increment accumulator and declare Array. Repeat this two times and more and you effectively overwrite what ever was originally stored in that array. There are basically two solutions:
Before we continue further on let me know if you been touched anything else beside Array. Something like ArrayList, List or Vector so we do not waste the time...
Hmm, that is strange. Would you mind to upload your Flash work project file *.fla and the data file?
PS: To add attachment you need to be in advanced editing option (press Go Advanced, if you did not already do so) and bellow post area you will find Manage Attachments option that will allow you to upload
Did you uploaded your animation on the server or you just trying to run it locally?
In case of server, did you upload animation depended files with relative folder structure (in case files are in sub folders of animation)?
That is option too, but it is not necessary to do as the above suggestion worked for me just few weeks ago and also not everyone is keen to re-install if you ask them:D
Try to re-run MySQL Server Instance Config Wizard (Start >> All Programs >> MySQL >> MySQL Server 5.1 >>MySQL Server Instance Config Wizard) as sometimes configuration may collide with other applications or anti-virus/firewall
As on-screen keyboard do you mean GUI where keys are represented as buttons?
>I am making on-screen keyboard in java.
This makes sense
>All what i want to know is how to get focus into the notepad or any other typing point , I mean when i press a key it type it into the typing point like a keyboard do.
This is non-sense. It doesn't give clear idea what you trying to do. Focus into notepad? Type in typing point?
Have look at this post, we discussed simple sorting of Vector which is very similar to array. masijade provided very neat solution
Okay everyone.... I figured it out. My mistake.. I am a dork. Have a beautiful Memorial Day tomorrow!
No worries, nobody is perfect.
PS: Nice web site layout
Follow the links what James provided.
To create JAR you can either use IDE build-in function for creating JAR or have look at this tutorial, Creating a JAR file, how to do it manually plus more add-on info
for (int i = 0; i < numbers.length; i++) { if (numbers.length >1) { replacement = replacement.append(numbers[i]+","); // need to insert comma after number to send in bulk } else replacement = replacement.append(numbers[i]+","); if (numbers[i] = int test) { replacement = replacement.append(numbers[i]); } // if only one number is seleceted then no comma is needed }
Logic of the above for loop is completely of the hook
Can be done simply as
for (int i = 0; i < numbers.length; i++)
{
if (i+1 == numbers.length){
//DO SOMETHING SPECIAL LIKE PLACE A QUESTION MARK AT THE END
replacement = replacement.append(numbers[i]+"?");
}
else{
replacement = replacement.append(numbers[i]+",");
}
}
replace that code section in "if" statement with what ever you need to do at that point...
Consider that numbers.length returns 5. That stands for
numbers[0]
numbers[1]
numbers[2]
numbers[3]
numbers[4]
Is this enough or you want other explanation?
I have done that now but i need to import somone else's calendar and export mine in iCal/vCal. Im not sure where to find a on iCal or vCal. Any ideas?
Sorry my bad, would be down to that I have no clue what is iCal/vCal. Would be iCal4j any use to you?
I assume that are talking about the application from your other post where you had two rows of drop down (JComboBox) for day, month, year and time. The only think that was missing was some button to initiate data retrieval.
If it is this case, just add a button to your frame. On the button press you need to retrieve data from drop downs and pass it for further processing. Retrieve data you will call JComboBox.getSelectedItem().toString()
that will get you String representation of what user selected
The code is great but it copy just the text.
The pdf doesn´t have the word format and headers :S
That would be because we been discussing just simple example how to get POI and iText talking together. It is on everyone who wish to use it to extend the application functionality to get maximum out of it.
Have look on code bellow, but by checking your code (just few minutes ago) I guess second part with SimpleDateFormat would be more suitable your case
import java.util.Calendar;
import java.util.GregorianCalendar;
import java.util.Date;
import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
public class DateComparison {
public static void main(String[] args) {
GregorianCalendar date1 = new GregorianCalendar(2009,4,11,12,30);
System.out.println(date1.getTime().toString()+ " as long type "+date1.getTimeInMillis());
GregorianCalendar date2 = new GregorianCalendar(2009,4,15,12,30);
System.out.println(date2.getTime().toString()+ " as long type "+date2.getTimeInMillis()+"\n");
DateFormat df = new SimpleDateFormat("dd/MM/yyyy HH:mm");
String strDate1 = "11/05/2009 12:30";
Calendar cal1 = Calendar.getInstance();
try{
Date d1 = df.parse(strDate1);
cal1.setTime(d1);
}
catch(ParseException pe){
System.out.println("Unable to parse");
}
System.out.println(cal1.getTime().toString());
}
}