| Classpath problems for JDBC for Microsoft SQL 2000 Server |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- 2
- Need Java professionalsDear Mr. / Ms,
Hope you are doing fine.
This is Kumar, from Javaji System Solutions Pvt. Ltd. striving to
assist the IT professionals to meet the better opportunity available
in today's IT world.
Below are the permanent job openings on Web Development With our
client in Germany which are all English speaking positions.
Our client is one of the leading Internet destinations operating a
network of websites in seven languages in Europe and the USA. The
company's combination of search, communication services, online
communities, content channels, Internet access, shopping, homepage
building and domain names registration addresses a wide range of
target groups. Our client in European Network provides an attractive
medium not only for consumers but also for advertisers and e-commerce
partners. With a wide network of websites covering Austria, Denmark,
France, Germany, Great Britain, Italy, the Netherlands, Spain,
Switzerland and the USA, Our client has a large geographical reach in
Europe and Northern America.
1. Senior Technical Manager (Java) Communities
2. Technical Project Manager
3. Technical Project Manager CRM&Billing
4. Senior Software Architect
5. Senior Java-Developer Communities
6. Passionierter Developer Communication Product
Please send your updated profile with the following details.
Latest Photo, Expected Salary (In Euros), Availability date, Contact
No's (telephone/Mobile), willing to relocate (Y/N)
Thanks/Regards
Kumar
Re-source coordinator
Javaji System Solutions Pvt. Ltd.,
+44-208-090 2178
email***@***.com
- 6
- if and else statementsDavid Postill wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> In article <email***@***.com>, on Wed, 10 Dec 2003 15:09:18 -0500, "Dale King"
> <email***@***.com> wrote:
>
> | "Devin Panchal" <email***@***.com> wrote in message
> | news:2uHBb.2124$email***@***.com...
> | > calm down man. i'm not angry.
> | > i reckon u guys r the soundest people ever. if i came across as angry,
> | then
> |
> | Go back and read your posts. You basically cussed out Thomas for simply
> | pointing out very politely that you should cross-post not multi-post.
> |
> | > i'm sorry. i just dont see y evry1 gotta start this big chain of emails,
> | > just cos i did a multi-post. i mean come on man. does it really matter? is
> | > it really worth losing sleep over?
> | > y dont ya'll chill out? yor like a bunch of whining babies. someone else
> | > will do it tomorow. i made a mistake, i'll try not to do it again. ;)
> |
> | Once again everyone is not upset that you multi-posted instead of
> | cross-posted. That is a common occurrence and when it happens someone will
> | very kindly tell the newbie that they should cross-post instead and that it
> | is better for all involved.
> |
> | What everyone is upset about is YOUR reaction to being told that you should
> | cross post and your attitude that basically says have a right to demand
> | help. You receive help as a favor from other people. No one here is getting
> | paid to answer your questions. Therefore you should be respectful of others.
> | You can show that respect by being considerate of their time by not
> | multi-posting. And you also show respect by listening to what they tell you.
> | If someone tells you that it is a bad idea to multi-post you don't cuss them
> | out. As others have said, if you don't respect others in the group, then you
> | are less likely to receive assistance in the future.
>
> Hmm. Well he is only 17 so what do you expect? The youth of today just don't
> have any manners <grin>.
>
> And he can't even get his own name right. It is "Sunit" not "Devin".
>
> He wants to be an airline pilot...
>
> And he lives in Coventry.
Airline pilot?
<shudder>
<images scenario:>
SUNIT: Air traffic control, this iz Sunit 571 coming in 4 landing.
ATC: Sunit 571, you haven't received clearance to land.
SUNIT: I need 2 land!!!!!!!!! I don't give a sh1t about th0se other planes.
ATC: Denied. Go into circling pattern west of approach.
SUNIT: u bunch of whining babies. all i want 2 do is land. I am coming
in2 land now.
[CRUNCH! 700 people die]
SUNIT is led from the smoking wreckage, having a tantrum.
SUNIT: waaaaaaaaaah!
POLICE: I am arresting you for willful negligence and violation of the
aviation act 1937.
SUNIT: whas u'r problem u big baby? i got 2 land! i got 2 laaaaand!!!
thx for u'r help anyway.
SUNIT is led to a police cell and taught the manners his mother forgot.
- 8
- Application wide variables with Tomcat/AxisHello,
I have installed axis on Tomcat and a few WebServices.
My Problem: I want to have a >>APPLICATION WIDE OBJECT<<, which you can
reach from a WebService as well as a Java Application which is running
on this server.
I would like to have something similar to the Session Object on a Web
Page where you can add and remove items.
Scenario:
-------------
The Programm Codes who share a Class called MyQueue, which is a Class
which holdes
all the processes.
WebService1(Pseudo Code)/**Fills Queque with new Datasets*/
public boolean fillQueue(int GUID, String ProcId){
MyQueue myqueue = getLivingQueue(); //This function shell give
me the actual queque,
//NOT a new one!!
MyQueueDataset oneDataSet= myqueue.create() ;//Create a new
DataSet
//in the Queue.
oneDataSet.setProcId(ProcId);
oneDataSet.setGUID(GUID);
oneDataSet.setStatus("InQueue");
...
return true;
}
WebService2:(Pseudo Code)/*Find out Status of certain Queque*/
public String getStatusOfGUID(int GUID){
MyQueue myqueue = getLivingQueue(); //This function shell give
me the actual queque,
//NOT a new one!!
MyQueueDataset oneDataSet = myqueue.getByGUID(GUID);
return oneDataSet .status;
}
A Job:(Pseudo Code)/*Try to proceed DataSets which havent proceede
yet*/
Class Watcher(){
int static main(){
...
MyQueue myqueue = getLivingQueue();
while(1==1){
ArrayList allJobsNotDone =
myqueue.getAllDataSetsWhichAreNotSuccessFullProceedd()
while(allJobsNotDone.hasNext() ){
MyQueueDataset notJetSuccesfullProceedeJob =
allJobsNotDone.next();
//Now we call a function which lets say try to put the values
//of notJetSuccesfullProceedeJob into a database.
proceed(notJetSuccesfullProceedeJob );
}
}
}
}
Is this possible just with Tomcat?
Do I need a Messaging System (JMS) or something?
I would appreciate help very much.
Thanks in advanced,
Peter
- 8
- InvokeLater does not update in timeHi everybody,
I'm working on a small application that scans a lot of files for
information.
To let the user know what is going on, I update the following components:
- a JList containing log messages
- a JProgressBar indicating the progress in the current file
- a JProgressBar indicating global progress
The scan progress is a separate thread. I noticed that the JList was not
getting updated correctly, and after some Googling I found out that this
was because I was not updating it in the Event Dispatching Thread. So I
added the following piece of code:
--- code ---
if (SwingUtilities.isEventDispatchThread())
{
sv.showMessage(message);
}
else
{
Runnable run = new Runnable()
{
public void run()
{
sv.showMessage(message);
}
};
SwingUtilities.invokeLater(run);
}
--- /code ---
"sv" is the JFrame containing the JList. This would ensure that a) the
JList would get updated, and b) that the results would be displayed in
the EDT.
So far so good - but as a result of the amount of files, there will be
thousands and thousands of Runnables, each waiting their turn to get
executed.
The end result is a display in which both JProgressBars are both at 100%,
and the JList still is updating a list of what's going on.
How can I let the update process for the JList keep pace with the
JProgressBars?
Thanks in advance,
Ikke
- 8
- Encrypt Text?What's the best method of text encryption if I wanted to store passwords in
an XML file? Are there any in-built functions of the API which would allow
me to store a key in code and encrypt and decrypt text using this key?
P.S. The project isnt high security so I'm not overly concerned about it
being breakable :)
- 9
- Can javac do macro (conditional) compilation?In C/C++ we can do
for example:
#ifdef VERSION_1
// write version 1 codes here
...
#else
// write version 2 codes here
...
#endif
Then when we compile the code with -D option
gcc -DVERSION_1 input_filename.c -o output_filename
This will compile the codes in version 1
gcc input_filename.c -o output_filename
This will compile the codes in version 2
I am just wonder can I use -J option in javac?
If I can, then how do I write the syntax in java codes?
- 10
- SSL socket in MS SDK 4.0Is there a way to create a an SSL socket using Microsoft SDK 4.0? If
not is it possible to get Suns javax.net.ssl to work with jview?
Any help would be appreciated.
- 10
- Using iframes in java.Hi Everyone
Can anyone tell me why loaded.htm doesn't load in iframe lmenu
<html>
<head>
<title>Gareth Homemade pulse site</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<script language="JavaScript">
<!--
function login(password) {
if (password == "1") {
alert("You have entered the correct password! Click ok to access the
secure section");
document.frames('parent.frames[\'lmenu\']','\loaded.htm');
}
else {
alert("You have entered an invalid password!");
}
}
//-->
</script>
</head>
<body bgcolor="#FFFFFF" text="#000000" leftmargin="0" rightmargin="0"
topmargin="0"scroll="no">
<table width="785" border="0" cellpadding="0" height="320"
cellspacing="0" bgcolor="#003399" align="center"
bordercolor="#FFFFFF">
<tr>
<td bgcolor="#FFFFFF" >
<table width="100%" border="5" cellspacing="0" cellpadding="0"
bgcolor="" bordercolor="#333333" align="center">
<tr >
<td bordercolor="#333333" height="42" bgcolor="#FFFFFF">
<div align="center"><font size="+3">You have entered IT
Secure Site.<br>This Site is for IT Personnel Only </font></div>
<form name="form1" method="post" action="">
<div align="center">Please enter your password:
<input type="text" name="textfield">
<input type="submit" name="Submit" value="Submit"
onClick="login(textfield.value)"></div></form>
</td>
</tr>
<tr >
<td bordercolor="#333333">
<table width="1000" border="0" cellspacing="0"
cellpadding="0" bgcolor="#FFFFFF" align="center"
bordercolor="#FFFFFF">
<tr bordercolor="#000000" bgcolor="#000000">
<td bordercolor="#FFFFFF" bgcolor="#FFFFFF">
<div align="center"></div>
</td>
</tr>
</table>
<iframe name="lmenu" width="30%" height="540"
frameborder="0" src="Blank.htm"><iframe name="main"
width="70%"height="540" frameborder="0" src="blank.htm"></td>
</tr>
</table>
</td>
</tr>
</table>
<br>
<br>
</body>
</html>
- 12
- JSpinner with DateModel, setValue not working ?Hi,
I wrote a JSpinner-based Class that I use as a Time Chooser.
The spinner has a DateModel.
My problem is that the setValue does not work : the content of the
spinner is not updated.
Any clue, any one ?
thanks in advance,
--P
the TimeSpinner Class :
package fr.heartbit.viewer;
import javax.swing.*;
import javax.swing.event.*;
import java.text.*;
import java.awt.*;
import java.util.*;
import java.awt.event.*;
import javax.swing.text.*;
public class TimeSpinner
extends JSpinner {
JFormattedTextField tf;
public TimeSpinner(){
super();
final SpinnerDateModel model = new SpinnerDateModel();
this.setModel(model);
JSpinner.DateEditor editor = new
JSpinner.DateEditor(this,"HH:ss:mm");
this.setEditor(editor);
tf = ((JSpinner.DateEditor)this.getEditor()).getTextField();
tf.setEditable(true);
tf.setBackground(Color.white);
tf.setSelectionColor(Color.blue);
tf.setSelectedTextColor(Color.white);
DefaultFormatterFactory factory =
(DefaultFormatterFactory)tf.getFormatterFactory();
DateFormatter formatter =
(DateFormatter)factory.getDefaultFormatter();
formatter.setAllowsInvalid(false);
}
}
- 12
- Java Bytecode to Native executable to Protect IPHi
Looking for a java bytecode compiler that will compile java byte code to a
windows self executable file. Reason is to protect intellectual property. I
realise that JET may be able to do that, but the full version is not free
and seems too taxing on the hard drive space. So anyone know of a free
bytecode compile that is simple to use.
Thanks in advance
Regards
AaA
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.716 / Virus Database: 472 - Release Date: 5/07/2004
- 13
- unsigned shift confusionHi, I'm testing the unsigned shift operator in Java. Unfortunately, the
value I predicted for the output is 2^17 (131072), not 2^17 - 1
(131071). See below:
"""
class unsignedshift {
public static void main(String args[])
{
int a = -10;
String bs1;
a = a >>> 15;
bs1 = Integer.toBinaryString(a);
System.out.println(bs1);
System.out.println("The length of the binary string is " + bs1.length());
System.out.println("a = " + a);
}
}
"""
Output is:
"""
11111111111111111
The length of the binary string is 17
a = 131071
"""
Where is the difference of one coming from?
Thanks.
--
Mike
- 13
- Connecting to db2/400 of AS400 through java throwing SQLExceptionHello,
I am trying to connect to db2/400 of as400 through java in WDSC.
I am usinf the driver ->
com.ibm.db2.jcc.DB2Driver
I have put the db2jcc.jar and db2jcc_license_c.jar in classpath.
I am not ableto connect with db2/400
The code for connecting to the database is follows-->
******************************************************************************
//Connect to a database
try
{
Connection conn = DriverManager.getConnection
("jdbc:db2:192.168.0.10","SAVITA","SAVITA");
}
catch (SQLException e)
{
System.out.println("SQL Exception: ");
}
*******************************************************************************
I am getting the following run time error
SQL Exception
....................................................................................................
Do I have to use other url apart from jdbc:db2:192.168.0.10
I have used jdbc:db2:S650B66E
where S650B66E=system name
In the actual code instead of 192.168.0.10 they have used databasename.
My requirement is , to call stored procedure from db2/400 of as400.
Firstly how do I connect to db2/400?
Can please any body help me out.
Thanks
Regards
Savita
- 14
- [struts] ActionForm design questionHi,
I've wrote a java application (not a web application) which containg
some bean used extensively in the application.
Now I would like to reuse those bean inside a struts based web
application.
In struts a bean supporting a form must extend ActionForm. I would like
to reuse the beans written for the first application. Is it possible in
some way???
The only way that i saw is to use Bean.Utilis.copyProperties in order
to copy a bean into another.
- 16
|
| Author |
Message |
TstallionP

|
Posted: 2003-8-30 6:19:00 |
Top |
java-programmer, Classpath problems for JDBC for Microsoft SQL 2000 Server
Hello everyone,
Im trying to run a simple program that connects to a local Microsoft
SQL 2000 server which is on my laptop.
I have stored the needed Jar files on my computers enviormental
variables but im still having connectivity issues.
i added this in my catch statements:
System.out.println("My classpath is " +
System.getProperty("java.class.path") );
to show if it is picking up my classpath and it is not.
The actual error i get is:
Driver not found: com.microsoft.jdbc.sqlserver.SQLServerDriver
ill post all the code below. If anyone has any suggestions they would
be greatly appreciated
Thanks for the help everyone.
package thomas;
import java.awt.*;
import java.sql.*;
import java.util.*;
import javax.swing.*;
public class displayAuthors extends JFrame {
public displayAuthors()
{
super( "Authors Table of Books Database" );
try {
Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver"
);
Properties p = new Properties();
p.put("selectMethod","cursor");
p.put("user","tom");
p.put("password","todd");
Connection connection = DriverManager.getConnection(
"jdbc:microsoft:sqlserver://TOMLAP2:1433",p );
Statement statement = connection.createStatement();
ResultSet resultSet =
statement.executeQuery( "SELECT * FROM authors" );
StringBuffer results = new StringBuffer();
ResultSetMetaData metaData = resultSet.getMetaData();
int numberOfColumns = metaData.getColumnCount();
for ( int i = 1; i <= numberOfColumns; i++ ) {
results.append( metaData.getColumnName( i )
+ "\t" );
}
results.append( "\n" );
while ( resultSet.next() ) {
for ( int i = 1; i <= numberOfColumns; i++ ) {
results.append( resultSet.getObject( i )
+ "\t" );
}
results.append( "\n" );
}
statement.close();
connection.close();
JTextArea textArea = new JTextArea(
results.toString() );
Container container = getContentPane();
container.add( new JScrollPane( textArea ) );
setSize( 300, 100 );
setVisible( true );
}
catch ( SQLException sqlException ) {
System.out.println("My classpath is " +
System.getProperty("java.class.path") );
JOptionPane.showMessageDialog( null,
sqlException.getMessage(), "Database Error",
JOptionPane.ERROR_MESSAGE );
System.exit( 1 );
}
catch ( ClassNotFoundException classNotFound ) {
System.out.println("My classpath is " +
System.getProperty("java.class.path") );
JOptionPane.showMessageDialog( null,
classNotFound.getMessage(), "Driver Not Found",
JOptionPane.ERROR_MESSAGE );
System.exit( 1 );
}
}
public static void main( String args[] )
{
displayAuthors window = new displayAuthors();
window.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
}
}
|
| |
|
| |
 |
Joseph Weinstein

|
Posted: 2003-8-30 6:38:00 |
Top |
java-programmer >> Classpath problems for JDBC for Microsoft SQL 2000 Server
Tom wrote:
> Hello everyone,
>
> Im trying to run a simple program that connects to a local Microsoft
> SQL 2000 server which is on my laptop.
> I have stored the needed Jar files on my computers enviormental
> variables but im still having connectivity issues.
>
> i added this in my catch statements:
>
> System.out.println("My classpath is " +
> System.getProperty("java.class.path") );
>
> to show if it is picking up my classpath and it is not.
What does the classpath show?
Joe
>
>
> The actual error i get is:
>
> Driver not found: com.microsoft.jdbc.sqlserver.SQLServerDriver
>
> ill post all the code below. If anyone has any suggestions they would
> be greatly appreciated
> Thanks for the help everyone.
>
> package thomas;
>
> import java.awt.*;
> import java.sql.*;
> import java.util.*;
> import javax.swing.*;
>
> public class displayAuthors extends JFrame {
>
> public displayAuthors()
> {
> super( "Authors Table of Books Database" );
>
> try {
>
> Class.forName( "com.microsoft.jdbc.sqlserver.SQLServerDriver"
> );
>
> Properties p = new Properties();
> p.put("selectMethod","cursor");
> p.put("user","tom");
> p.put("password","todd");
>
> Connection connection = DriverManager.getConnection(
> "jdbc:microsoft:sqlserver://TOMLAP2:1433",p );
>
> Statement statement = connection.createStatement();
>
> ResultSet resultSet =
> statement.executeQuery( "SELECT * FROM authors" );
>
> StringBuffer results = new StringBuffer();
> ResultSetMetaData metaData = resultSet.getMetaData();
> int numberOfColumns = metaData.getColumnCount();
>
> for ( int i = 1; i <= numberOfColumns; i++ ) {
> results.append( metaData.getColumnName( i )
> + "\t" );
> }
>
> results.append( "\n" );
>
> while ( resultSet.next() ) {
>
> for ( int i = 1; i <= numberOfColumns; i++ ) {
> results.append( resultSet.getObject( i )
> + "\t" );
> }
>
> results.append( "\n" );
> }
>
> statement.close();
> connection.close();
>
> JTextArea textArea = new JTextArea(
> results.toString() );
> Container container = getContentPane();
>
> container.add( new JScrollPane( textArea ) );
>
> setSize( 300, 100 );
> setVisible( true );
> }
>
> catch ( SQLException sqlException ) {
> System.out.println("My classpath is " +
> System.getProperty("java.class.path") );
> JOptionPane.showMessageDialog( null,
> sqlException.getMessage(), "Database Error",
> JOptionPane.ERROR_MESSAGE );
>
> System.exit( 1 );
> }
>
> catch ( ClassNotFoundException classNotFound ) {
> System.out.println("My classpath is " +
> System.getProperty("java.class.path") );
> JOptionPane.showMessageDialog( null,
> classNotFound.getMessage(), "Driver Not Found",
> JOptionPane.ERROR_MESSAGE );
>
> System.exit( 1 );
> }
> }
>
> public static void main( String args[] )
> {
> displayAuthors window = new displayAuthors();
>
> window.setDefaultCloseOperation( JFrame.DISPOSE_ON_CLOSE );
> }
> }
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Web-Launched Export to PowerPointIntroduction and Objective
Chalkwaves is a partnership of 240 school districts, Missouri, Kansas
and Illinois public broadcasters and educational service centers. We
offer services that assist teachers in meeting learning objectives and
engaging students in meaningful learning experiences. Our instructional
video collections come in two packages; which can be purchased
separately or bundled together. Chalkwaves provides these services to
the schools via a proprietary software player and a web interface. This
RFP is for additions to the web interface.
The current software player has the ability to do what is called "export
to power point". This is the feature that we require to be programmed
for our web interface.
Goals:
1. To be able to play one of our videos ( which is already working on
the web launcher software) and click a button that will allow the user
to select a start time and end time in hours, min, seconds. Once the end
user has entered this information. A power point page is brought up with
windows media player embedded into a new power point presentation.
2. The use of javascript or the java language to accomplish this task,
rather then active-x controls.
Requirements:
1. The export to power point feature needs to actually embed a windows
media player object and not use the standard power point embedding
function. This is critical since the embedded player does not have some
of the features required to play properly.
2. The use of javascript or the java language to accomplish this task,
rather then active-x controls. Since the web was created to be platform
agnostic, we need to create this using software that is platform
agnostic. Active-x does not meet this requirement.
3. All source code will be delivered to KCPT upon completion.
4. We can send a sample of the player software that shows how this
feature works.
Provided materials:
1. A copy of the software program showing how the feature works.
2. Access to a web site for testing of the features.
3. Access to php programming knowledge about how the current web
launcher works if needed.
Application Process:
Please develop a document containing the following information and send
it to Amy Long (email***@***.com). The length of the proposal should be
three pages or less and include a time and price estimate.
- 2
- Java JDE and Mac?Hello!
I have no experience of macintoch but is just a bit curious weather there is
a JDE for mac? If there is, where do you get it, cos I haven't found it on
sun's homepage?
...and second of all is there JRE for mac?
Thanks in advance!
Marcus
- 3
- Tomcat on Windows XP : Number of Simultaneous ConnectionsHi
I am currently using IIS on Windows XP but I think it allows only 10
simultaneous connection. Does anyone knows whether there is such a
limitation with Tomcat on Windows XP? Unfortunately, the user does not
want Linux. Neither do they want to purchase Windows Server. Any other
limitations?
Thanks in advanced.
ronnie.
- 4
- Your Guru Paul Graham is getting trashed on Slashdot.In message <email***@***.com>, Christopher C. Stacy
<email***@***.com> writes
> Stephen> an 80286 game in my lunch breaks at work at the time, 1988).
>
>I assume you're joking about the lack of an editor in 1988.
No. I had an editor, Brief. I didn't have lisp-syntax supporting editor
in 1988. The first syntax supporting editor I saw was Emacs in '91, I
guess.
Stephen
--
Stephen Kellett
Object Media Limited http://www.objmedia.demon.co.uk
RSI Information: http://www.objmedia.demon.co.uk/rsi.html
- 5
- What happened to all the regulars?i'm gone half a year and all the regulars seem to have gone! I miss
the sniping and all - sniff, sniff...don't we still need a catch-group
for all the nonsense?
Anyways, some interesting numbers of books sold...Java, as usual,
sells vastly more books than anything else out there...
http://radar.oreilly.com/archives/2007/03/programming_lan.html
- 6
- 7
- Opera 8.5 just outOn 23 Sep 2005 10:51:22 GMT, email***@***.com (Stefan Ram) wrote
or quoted :
> I am not aware of the keys that I would press to place the
> cursor in the address bar (using a pointing device would slow
> me down).
If you don't want to use mouse functions, the way you discover
keyboard shortcuts is to click Help | Keyboard and they are all there
for you, including F2.
If you wanted to put F2 on a menu, you can reconfigure the menus.
There is not much point. You can click the address bar with the mouse
faster than you could a menu item.
If you don't like clicking new page to get started, you can configure
some dummy home page.
There are two sorts of problem with a browser -- initial getting
acquainted where every difference from your old browser feels like a
bug, and things that annoy you even after you have used it for month
or two.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Again taking new Java programming contracts.
- 8
- JTable Display doesn't match TableModel ??Hi All,
I have a Jtable & Tablemodel.
When I clear the tablemodel, rows in the JTable are still visible, what
am I missing ?
TIA
Bill
// clear the data
datalist.clear();
fireTableDataChanged();
// rows are still visible in theJTable !!!
.....do lots of processing to get more data....
// at the end of all the processing - change the data in the model
datalist.clear(); // initialize the list
datalist.addAll(list); // add the data
fireTableDataChanged(); // fire the data changed event
// now the JTable matches what is in the Tablemodel..
- 9
- where should i store my data: text file or a database?i'm a jackaroo, sorry 4 my stupid question.
my assignment required to detect data transfer error, as part of it, i need
to store some info, which one is easier to be achieved: a text file or a
database.
i code it with JDK1.3.1+ Win2000, but i have to test it on Linux, if i use
database, how can i configure the environment.
- 10
- java-common_0.27_amd64.changes ACCEPTED
Accepted:
java-common_0.27.dsc
to pool/main/j/java-common/java-common_0.27.dsc
java-common_0.27.tar.gz
to pool/main/j/java-common/java-common_0.27.tar.gz
java-common_0.27_all.deb
to pool/main/j/java-common/java-common_0.27_all.deb
Override entries for your package:
java-common_0.27.dsc - source misc
java-common_0.27_all.deb - optional misc
Announcing to email***@***.com
Closing bugs: 449282
Thank you for your contribution to Debian.
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 11
- Sun JVM and memory requirementsHi everybody,
For maximum separation of environment we want to run multiple java
instances (each running a webserver). now at peak moments I want these
to use the maximum heap, however, if the peak moments are passed, it
should free up the heap it doesn't use. Is this possible? Is it even
nessesary? What are the alternatives. I must be able to shut one JVM
down without it affecting the others.
Thanks in advance,
Vincent
- 12
- 13
- 14
- Width of an imageHi,
what is the easiest way to get the width of an image (png or jpg).
I don't want to show the image or do anything else with it (I not even
have a gui). It's just the width I need.
--
bye Armin
- 15
- help with arraysSam Jervis <email***@***.com> wrote in message news:<YWWFc.17595$email***@***.com>...
> dinesh wrote:
> > I am new to JAVA. I need to create a function f(S,i) where S is a set
> > of elements (whose cardinality changes)and i is just one element.
> >
> > For example,
> >
> > S={1,2,3} , i = {4}
> > S=(2,4,5,4}, i ={6}
> > ....
> >
> > How can i do this in JAVA? can i use vectors?
> >
> > any help will be greatly appreciated. I have tried looking at books
> > but couldn't figure out.
> >
> > thanks
> > dinesh
>
> public class AClass
> {
> public static void main(String[] args)
> {
> AClass a = new AClass();
> a.f(new int[]{1,2,3}, 4);
> a.f(new int[]{2,4,5,4}, 6);
> }
>
> public void f(int[] S, int i)
> {
> // Do whatever you need to do with S and i here. In my
> // example, print them
> for(int j = 0; j < S.length; j++)
> System.out.println("S[" + j + "] = " + S[j]);
> System.out.println("i = " + i);
> System.out.println();
> }
> }
>
> This shows you the syntax for passing an array and an integer to a
> function. Whether or not it is appropriate to use this approach depends
> on what you're doing with the array. When you say that the cardinality
> changes, do you mean that you might want f() to add or remove elements
> from the array? Or did you just mean that f() should be able to accept
> arrays of varying size? If you meant the former, then you would need to
> use a vector type object.
>
> Using a vector object brings with it much more overhead.
> java.util.Vector is thread safe, so for a simple program I'd recommend
> java.util.ArrayList. They both use flat arrays internally to store your
> data. They can only store objects, so you have to box basic types like
> integers as follows:
>
> ArrayList list = new ArrayList();
> list.add(new Integer(2));
> list.add(new Integer(4));
> list.add(new Integer(2));
> list.add(new Integer(5));
>
> You can then unbox the values as follows:
>
> // Get value of 3rd element
> Integer element = (Integer)list.get(2);
> int value = element.intValue();
>
> As you can see, int is a basic data type which is different to Integer,
> which is a class in the standard library that can be used to store an
> integer value.
>
> You can then declare f() as follows:
>
> void f(ArrayList S, int i)
> {
> // ...
> }
>
>
> I hope this gets you started, at least.
> Sam
>
>
> PS: a point of terminology - you used the word "set" but in your example
> {2,4,5,4} there is a duplicate element, so to my mathematical mind that
> is not a set.
Sam,
thanks a lot for ur help.
> PS: a point of terminology - you used the word "set" but in your example
> {2,4,5,4} there is a duplicate element, so to my mathematical mind that
> is not a set.
sorry, that was a typo. it is a set and contains no duplicates. and
also 'i' cannot be a part of S.
I am trying to work with the function u suggested. let me try to
explain a lil more abt what i want to do with S and i.
Let me give an example,
My problem has 'n' stages.
Let n=4
4 elements are : A, B, C, D
Stage 1:
In stage 1, the cardinality of S will be 1
possible 'states' are ({A},B), ({A},C), ({A},D)
I have to compute F({S},i) for each of the above three states. F is a
formula.
After computing each F({S},i), I need to save it depending on a
criterion. If it satisfies the criterion, I need the F({S},i). If it
doesn't, I don't need them. (HOW DO I SAVE ?)
let us assume that ({A},B) and ({A},C) passed the test.
Stage 2:
states of the second stage will be generated from the states in stage
1 that passed the test. S will be generated by adding the existing S
and the i.
Example: ({A},B) state will generate ({A,B},C) and ({A,B},D)
therefore, states in stage 2 are ({A,B},C), ({A,B},D), ({A,C},B) and
({A,C},D)
I will compute F({S},i) for all these states and the process is
similar to stage 1 from now on.
I hope this is understandable.
thanks for ur help again.
dinesh
|
|
|