Click here to Skip to main content
15,901,122 members
Home / Discussions / Java
   

Java

 
GeneralRe: why i cant save the image? [modified] Pin
aelynne3-Jun-12 20:13
aelynne3-Jun-12 20:13 
GeneralRe: why i cant save the image? [modified] Pin
Richard MacCutchan3-Jun-12 22:18
mveRichard MacCutchan3-Jun-12 22:18 
AnswerRe: why i cant save the image? Pin
exposed1219-Jun-12 5:00
exposed1219-Jun-12 5:00 
QuestionWeb Request in Android failing Pin
Peter Hawke30-May-12 10:45
Peter Hawke30-May-12 10:45 
AnswerRe: Web Request in Android failing Pin
CodingLover10-Jun-12 17:44
CodingLover10-Jun-12 17:44 
AnswerRe: Web Request in Android failing Pin
User 742933812-Jun-12 8:54
professionalUser 742933812-Jun-12 8:54 
GeneralRe: Web Request in Android failing Pin
Peter Hawke22-Jun-12 11:05
Peter Hawke22-Jun-12 11:05 
QuestionHow to solve this, always get error Pin
tan87328-May-12 21:08
tan87328-May-12 21:08 
I have a problem when i get value from another class, the error message show
"unreported exception java.io.FileNotFoundException; must be caught or declared to be thrown"

This is my main code

package testtimer;

import testing.testing_1234;

import java.util.logging.Level;
import java.util.logging.Logger;
import javax.swing.Timer;
import java.util.Date;
import java.io.*;
import java.text.*;
import java.util.*;
import java.sql.*;
import javax.swing.*;

import javax.swing.JTable;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.Connection;
import java.util.Iterator;
/**
*
* @author tan
*/
public class testing_page extends javax.swing.JFrame {

testing_1234 appsetting = new testing_1234();


String strc=appsetting.getcname();


public rxpooltesting() {
initComponents();

}

@SuppressWarnings("unchecked")

private void initComponents() {

setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);

javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 400, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGap(0, 300, Short.MAX_VALUE)
);

pack();
}


public static void main(String args[]) {
java.awt.EventQueue.invokeLater(new Runnable() {
public void run() {
new testing_page().setVisible(true);
}
});
}


}


This is my class:



package testing;


import java.io.*;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.io.FileWriter;
import java.io.BufferedWriter;
import java.util.Properties;
import java.io.FileNotFoundException;

public class readsetting {
private String PropertiesPath = "C:TestTimer/src/testtimer/setting.properties";

private String strcname;



public readsetting()
{

}

public readsetting(String strurl,String struname,String strpword,String strcname,String strxpool,
String stridcounter,String strtemppol,String strxlog,String strlogfile,String strDB,
String strservice)
{}


public String getcname() throws FileNotFoundException, IOException{

FileInputStream is = new FileInputStream( PropertiesPath );

Properties dbProps = new Properties();
dbProps.load(is);

strcname=dbProps.getProperty("classnames");

return strcname;
}



public void setcname(String cname){

this.strcname = cname;
}


}

Thanks.
AnswerRe: How to solve this, always get error Pin
BobJanova28-May-12 23:29
BobJanova28-May-12 23:29 
QuestionHow to decrypt Pin
kmkmahesh22-May-12 22:59
professionalkmkmahesh22-May-12 22:59 
AnswerRe: How to decrypt Pin
TorstenH.23-May-12 0:00
TorstenH.23-May-12 0:00 
GeneralRe: How to decrypt Pin
kmkmahesh23-May-12 14:53
professionalkmkmahesh23-May-12 14:53 
GeneralRe: How to decrypt Pin
Richard MacCutchan23-May-12 22:13
mveRichard MacCutchan23-May-12 22:13 
GeneralRe: How to decrypt Pin
TorstenH.23-May-12 23:17
TorstenH.23-May-12 23:17 
AnswerRe: How to decrypt Pin
BobJanova24-May-12 0:54
BobJanova24-May-12 0:54 
GeneralRe: How to decrypt Pin
Richard MacCutchan24-May-12 3:14
mveRichard MacCutchan24-May-12 3:14 
QuestionKindly help me with this Pin
adeelgr8one20-May-12 2:52
adeelgr8one20-May-12 2:52 
AnswerRe: Kindly help me with this PinPopular
Luc Pattyn20-May-12 3:53
sitebuilderLuc Pattyn20-May-12 3:53 
GeneralRe: Kindly help me with this Pin
V.24-May-12 3:08
professionalV.24-May-12 3:08 
GeneralRe: Kindly help me with this Pin
Luc Pattyn24-May-12 3:22
sitebuilderLuc Pattyn24-May-12 3:22 
AnswerRe: Kindly help me with this Pin
jschell20-May-12 6:03
jschell20-May-12 6:03 
AnswerRe: Kindly help me with this Pin
Bernhard Hiller20-May-12 20:41
Bernhard Hiller20-May-12 20:41 
AnswerRe: Kindly help me with this Pin
adeelgr8one20-May-12 21:35
adeelgr8one20-May-12 21:35 
GeneralRe: Kindly help me with this Pin
TorstenH.20-May-12 22:54
TorstenH.20-May-12 22:54 
AnswerRe: Kindly help me with this Pin
adeelgr8one21-May-12 4:30
adeelgr8one21-May-12 4:30 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.