| Anyone have any experience with WebLogic 8? |
|
 |
Index ‹ java-programmer
|
- Previous
- 4
- Figure out DST start and end date/timeIs their a mechanism to determine what the start date / time and
end date / time of Daylight Savings Time is for a given TimeZone
if the time zone supports Daylights Savings ?
Thanks
Jeff
- 5
- Shootout: the benchmarks game ... continues.On Wed, 30 Apr 2008 08:00:38 -0700 (PDT), Isaac Gouy
<email***@***.com> wrote:
>You've spent 10 days making untrue claims:
No, you are wrong. There is no -Xms when you click on show tab from
the main page. You know that very well. Why waste time on quibbling?
>Why don't you go through all...
Let's continue. The only thing changed is my OS (Vista) and computer
which is now 3 core phenom. Also, instead of > /dev/null on cygwin, I
will use > \Null (since that seems to be 200 times faster on windows).
benchmark: fasta
java version:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=fasta&lang=java&id=2
C++ version
http://shootout.alioth.debian.org/gp4/benchmark.php?test=fasta&lang=gpp&id=4
As a great example of c++ portability, this doesn't even compile with
my version of g++ (mingw), so I will use cygwin to compile. gcc
version 3.4.4 (cygming special)
g++ -pipe -O3 -fomit-frame-pointer -mfpmath=sse -msse2 fasta.cpp -o
fasta.exe
jc -inline+ fasta (jet)
N 250,000 2,500,000 25,000,000
g++ 0.166s 0.954s 8.884s
java 0.297s 1.347s 11.699s (-Xms64m -server)
jet 0.420s 1.701s 14.602s
(note this guy uses -Xbatch flag everywhere. I have to see how that
helps anywhere. It's just slightly slower with -Xbatch flag if
anything).
HotSpot VM is faster than native Jet compiler once again? That's three
in a row. g++ is only slightly faster, not 50 or 100 times as some
think.
- 8
- Maven / Torque Generator ClasspathHello,
I try to make an XML dump of a oracle database schema with the Torque
Generator jakarta api.
But, I cannot find how use Torque Generator without Maven and I connot find
how to put the "classes12.jar" oracle JDBC Driver in the Maven classpath.
So, I get the following exception :
C:\JavaLib\jakarta\torque-gen\torque-gen-3.1.1\projectTest>maven
torque:datadump
__ __
| \/ |__ _Apache__ ___
| |\/| / _` \ V / -_) ' \ ~ intelligent projects ~
|_| |_\__,_|\_/\___|_||_| v. 1.0.1
build:start:
torque:init:
torque:datadump:
[torque-data-dump] Using classpath
[torque-data-dump] Generating to file
C:\JavaLib\jakarta\torque-gen\torque-gen-3.1.1\projectTest\target\report.bug.datadump.generation
[torque-data-dump] Torque - TorqueDataDump starting
[torque-data-dump] Your DB settings are:
[torque-data-dump] driver: oracle.jdbc.driver.OracleDriver
[torque-data-dump] URL: jdbc:oracle:thin:@192.168.0.101:1521:ORCL
[torque-data-dump] user: BUG
cannot load driver:
java.lang.ClassNotFoundException: oracle.jdbc.driver.OracleDriver
at
org.apache.tools.ant.AntClassLoader.findClassInComponents(AntClassLoader.java:1075)
at
org.apache.tools.ant.AntClassLoader.findClass(AntClassLoader.java:1036)
at
org.apache.tools.ant.AntClassLoader.loadClass(AntClassLoader.java:925)
at java.lang.ClassLoader.loadClass(ClassLoader.java:235)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:302)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:141)
at
org.apache.torque.task.TorqueDataDumpTask.initControlContext(TorqueDataDumpTask.java:197)
at
org.apache.velocity.texen.ant.TexenTask.execute(TexenTask.java:480)
at org.apache.tools.ant.Task.perform(Task.java:341)
at org.apache.commons.jelly.tags.ant.AntTag.doTag(AntTag.java:185)
at org.apache.commons.jelly.impl.TagScript.run(TagScript.java:279)
at
org.apache.commons.jelly.impl.ScriptBlock.run(ScriptBlock.java:135)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag.runBodyTag(MavenGoalTag.java:79)
at
org.apache.maven.jelly.tags.werkz.MavenGoalTag$MavenGoalAction.performAction(MavenGoalTag.java:110)
at com.werken.werkz.Goal.fire(Goal.java:639)
at com.werken.werkz.Goal.attain(Goal.java:575)
at
org.apache.maven.plugin.PluginManager.attainGoals(PluginManager.java:671)
at org.apache.maven.MavenSession.attainGoals(MavenSession.java:263)
at org.apache.maven.cli.App.doMain(App.java:488)
at org.apache.maven.cli.App.main(App.java:1239)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:324)
at com.werken.forehead.Forehead.run(Forehead.java:551)
at com.werken.forehead.Forehead.main(Forehead.java:581)
BUILD SUCCESSFUL
Total time: 6 seconds
Finished at: Mon Nov 22 12:20:01 CET 2004
Could someone help ?
Thank you.
- 11
- How to get address of a Java object?Hi
Is there a way to get address of a Java object?
I believe hashCode function in Object class do gives the object
reference, but this is specific to JVM implementation.
thanks,
Naresh Agarwal
- 12
- JavaMail: MimeMessage customer headersHow to add custom headers to a MimeMessage object?
The problem I'am having is reading from POP3 account and getting the
MimeMessage object. Before I want to save the message content to disk,
I want to add a few headers.
The error I'am getting is
POP3 messages are read-only
I've open the inbox folder as READ_WRITE but still no luck.
Anyone know how to add customer headers to the MimeMessage object when
reading from a POP3 account?
Thanks
- 12
- Corrupt String or bytearray transport over RMIHello,
I have a strange problem when transporting a String and it's byteArray
between 2 JVM's on the same machine. The JVMs are seperately started
instances of IBM's 1.3.1 JVM which also comes with Websphere 4.5.
On JVM1, I have something along the lines of:
String jvm1String = "Some nice String";
byte[] jvm1bytes = jvm1String.getBytes("ISO-8859-1");
Now, I transport the string and the array through RMI toto JVM2. In
JVM2 I do the following:
jvm2bytes = jvm1String.getBytes("ISO-8859-1");
for (int i = 0; i < jvm2bytes.length; i++) {
if (jvm2bytes[i] != jvm1bytes[i]) return false;
}
This allways returns false. Manually checking the arrays shows that the
two byte arrays only differ somewhere in the middle, and only for about
2 bytes, regardless the content of the String. I have no idea what
would cause java to behave differently between the two jvm's.
My question is: Is this likely to be a bug in:
a) the transportation of Strings over RMI
b) the transportation of byte arrays over RMI
c) the way String.getBytes("ISO-8859-1") is implemented
d) the way I am using rmi or the getBytes() method
Due to requirements, I can not change the JVM, so I need to find a way
around this. I am using the bytearrays to verify data integrity.
Thanks in advance,
Rolf
- 12
- Masters project suggession> all suggestions appreciated. if you are a company, it is possible for
> me to work for you (for no salary if necessary) in relation to the
> project that u suggest.
Doing a Computer Science MSc-project for a company for free? How bad is
the economical situation around there?
- 12
- draw on JPanel from other classHI,
I need to draw string to subclass of JPanel from subclass of JFrame.
But I don't know how. Here is a sample. Another problem is the
Thread tt does not run.
Thank you for help.
import java.awt.*;
import javax.swing.*;
import java.awt.geom.*;
public class TryFont1 extends JFrame {
RectPanel r = new RectPanel();
public TryFont1() {
super("Rectangles");
setSize(410, 430);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
Container content = getContentPane();
content.add(r);
setContentPane(content);
setVisible(true);
}
public void run() {
for ( int i = 0; i < 10; i++ ) {
System.out.println("New thread");
}
}
public static void main(String[] arguments) {
TryFont1 rect = new TryFont1();
Thread tt = new Thread();
tt.start();
tt.run();
rect.r.comp2D.setColor(Color.blue);
for ( int i = 0; i < 10; i++ ) {
rect.r.comp2D.drawString("Main thread",250,150 + i*10);
//rect.r.repaint();
System.out.println("1 thread");
}
}
}
class RectPanel extends JPanel {
public Graphics2D comp2D;
public void paintComponent(Graphics comp) {
super.paintComponent(comp);
comp2D = (Graphics2D) comp;
setBackground(Color.white);
comp2D.rotate(-.4,200,200);
Font f = new Font("Garbage",Font.BOLD,40);
Font f1 = new Font("Times New Roman",Font.BOLD,40);
comp2D.setColor(Color.green);
comp2D.setFont(f);
comp2D.drawString("Happy", 50,150);
comp2D.setColor(Color.red);
comp2D.setFont(f1);
comp2D.drawString("Birthday!", 50,200);
}}
- 12
- Get the real type of columns from MS Access databases(OLEObject, text, memo, numeric)Hello,
I made one application that opens MS Access databases.And I have one
problem.How can I find the real data type of columns(text, memo,
OLEObject, numeric) like it is into Access.I tried with
resultSetMetaData.getColumnType(columnIndex) but I receive
java.sql.Types.I have two columns that contains OLEObjects(images).But
I receive two different types for columns : VARCHAR once, and for
second column SMALLINT.I only want to see the types like in
Access(OLEObjects, Text, Numeric, Memo...).Thanks in advance!
Best regards,
Calin Pop
- 12
- About Sun Developer Network SubscriptionHello,
I have downloaded the Sun Java Studio Creator from sun.com.
Now I am having a trial subscription of Sun Developer Network for 30
days.
But what are the advantages of it?
It seems that I can post queries about Sun Java Creator or Java Server
Faces technology only.
Can I have access to other technology documentation or it is meant for
some restricted technologies only?
PLease guide.
-Sameer
- 12
- How to re-asign a value to a variable in XSLTSorry Dudes,
I couldn't find an appropriate group to post about XML/XSLT issues.
I can only post to these close groups.
In most of programming languages are VERY easy to do:
int i = 0;
i = 3;
i = i + 1;
i += 2;
i++;
But how can I do these in XSLT?
I got error when I do
<xsl:variable name="i" select='0' />
<xsl:variable name="i" select="$i + '1' />
Can dudes (American West Coast's Term) out there can help?
Thank Q!
- 12
- Jar file exploringHi,
I want to read files and direcotories under a specific directory in a jar
file. In this way I can explore
the jar file interactively. The jar file contains thousands of files and has
no index.
So it is impractical to enumerate entries then filter them.
How can I do this? Thanks.
- 13
- EasyMock, JUnit, Java5 and generics...I'm trying to create a unit test. In the unit test I need to create a
mock java.util.List object. The List is going to be a collection of
WebForm objects, so the way it's declared using generics as
List<WebForm>. For my unit test I want to mock this List, but cannot
find a way to declare the mock object in my code. The declaration is as
follows:
private MockControl<List<WebForm>> controlWebforms;
private List<WebForm> webforms;
When I try to create the mock object, the following code is invalid:
controlWebforms = MockControl.createControl(List.class);
webforms = controlWebforms.getMock();
I get the error message "Type mismatch: cannot convert from
MockControl<List> to MockControl<List<WebForm>>" However, the following
declaration:
controlWebforms = MockControl.createControl(List<WebForm>.class);
webforms = controlWebforms.getMock();
is invalid. How do I reference the class for List<WebForm> to create my
mock object? Any ideas?
--
Darryl L. Pierce <email***@***.com>
Homepage: http://mcpierce.multiply.com/
"McVeigh's lawyer got him the death penalty, which, quite frankly,
I could have done." - Jon Stewart
- 13
- ANN: VRMLmagic - New Interactive 3D VRML Web/World Authoring ToolHi All,
We at Scintillating Graphics would like to announce the release of
VRMLmagic, our Interactive 3D Web Development Tool.
VRMLmagic is an easy to use tool for creating interactive 3D (Virtual
Reality) web pages in the VRML/X3D format(s). With its interactive 3D
development environment and a range of powerful tools, you'll find
yourself building interactive 3D worlds in no time. Take a look at our
web site for more info:
http://www.scintillatinggraphics.com.au/VRMLmagic/
Initially developed as part of a research project with the aim of
making a rapid development environment for the construction of 3D user
interfaces. It was clear that VRMLmagic's features (which enabled us
to quickly build interactive 3D interfaces) had enormous potential for
the mainstream web development industry, and in particular its ability
to bring 3D content to the web. We now hope this tool will enable you
to begin developing the potential of interactive 3D content for the
web.
The initial release is for the Windows (98 and above) platforms.
However we will soon be releasing versions for Mac OS X and other Unix
variants.
If you have any questions or would like additional information, email
us at email***@***.com
- 15
- Call for Papers: World Congress on Engineering and Computer Science WCECS 2008CFP: World Congress on Engineering and Computer Science WCECS 2008
From: International Association of Engineers (IAENG)
WCECS 2008: San Francisco, USA, 22-24 October, 2008
http://www.iaeng.org/WCECS2008
The WCECS 2008 is organized by the International Association of
Engineers (IAENG), a non-profit international association for the
engineers and the computer scientists. The congress has the focus on
the frontier topics in the theoretical and applied engineering and
computer science subjects. The WCECS conferences serve as good
platforms for our members and the entire engineering community to meet
with each other and to exchange ideas. Our last IAENG conference has
attracted more than one thousand participants from over 30 countries,
and our conference committees have been formed with over two hundred
and sixty committee members who are mainly research center heads,
faculty deans, department heads, professors, and research scientists
from over 20 countries.
All submitted papers will be under peer review and accepted papers
will be published in the conference proceeding (ISBN:
978-988-98671-0-2). The abstracts will be indexed and available at
major academic databases. The accepted papers will also be considered
for publication in the special issues of the journal Engineering
Letters, in IAENG journals and in edited books. Revised and expanded
version of the selected papers may also be included as book chapters
in the standalone edited books under the framework of cooperation
between IAENG and Springer, and between IAENG and America Institute of
Physics. For reference, the following post conference edited books of
our recent IAENG 2007 conferences have been scheduled to be published
by Springer in early 2008: Trends in Intelligent Systems and Computer
Engineering, Advances in Communication Systems and Electrical
Engineering, Advances in Industrial Engineering and Operations
Research, and Advances in Computational Algorithms and Data Analysis.
WCECS Congress Co-chairs
Prof. Craig Douglas (WCECS Keynote Speaker & Co-chair)
Professor of Computer Science & Professor of Mechanical Engineering,
University of Kentucky
Senior Research Scientist (corresponding to nonteaching full
professor)
Computer Science Department, Yale University, USA
Prof. Warren S. Grundfest, Fellow, AIMBE, SPIE (WCECS co-chair)
Co-Chair, Biomedical Engineering IDP
Professor of Electrical Engineering and Professor of Surgery
The Henry Samueli School of Engineering & Applied Science
University of California, Los Angeles, USA
Former Chair, SPIE Health Care Engineering & Technology Policy
Former Vice Chair, Health Care Engineering Policy Committee, IEEE
Prof. Lee Schruben, Ph.D. Yale (WCECS & ICMSC co-chair)
Professor and Former Department Chairman
Department of Industrial Engineering and Operations Research
University of California, Berkeley, USA
Prof. Jon Burgstone (ICIMT honorary co-chair)
Faculty Chair
Center for Entrepreneurship & Technology
College of Engineering
University of California, Berkeley, USA
Board Member of the Rock Center for Entrepreneurship at Harvard
Business School, Harvard University
Prof. Su-Shing Chen, Fellow, SPIE (ICCB honorary co-chair)
Emeritus Professor, Department of Computer Information Science &
Engineering, University of Florida, USA;
Principal Investigator of Systems Biology Laboratory,
CAS-MPG Partner Institute for Computational Biology (PICB);
Shanghai Institutes for Biological Sciences; Chinese Academy of
Sciences
Prof. Benjamin Friedlander, FIEEE (ICCST honorary co-chair)
Professor of Electrical Engineering
Department of Electrical Engineering, Jack Baskin School of
Engineering,
University of California, Santa Cruz, USA
The IEEE Third Millennium Medal (2000)
Former Vice Chairman of the Bay Area Chapter of the Acoustics, Speech
and Signal Processing Society
Former Associate Editor of the IEEE Transaction on Automatic Control
Prof. Burghard B. Rieger (ICMLDA honorary co-chair)
Professor of Computational Linguistics
Former Dean (1999-2001) of Faculty of Languages and Literature
Former Head of Department of Linguistic Computing, University of
Trier, Germany
President (1989-93) of the German Society for Linguistic Computing
(GLDV)
Vice-President (1990-94) of the International Society for Terminoly
and Knowledge Engineering (GTW)
Prof. Lei Xu (ICSCA honorary co-chair)
IEEE Fellow and IAPR Fellow,
Member of European Academy of Sciences,
Chair Professor, Department of Computer Science and Engineering,
The Chinese University of Hong Kong, Hong Kong
The WCECS 2008 is composed of the following 15 conferences (all will
be held at the same location and date):
ICCB'08
International Conference on Computational Biology 2008
ICCE'08
International Conference on Chemical Engineering 2008
ICCS'08
International Conference on Circuits and Systems 2008
ICCSA'08
International Conference on Computer Science and Applications 2008
ICCST'08
International Conference on Communications Systems and Technologies
2008
ICEEA'08
International Conference on Electrical Engineering and Applications
2008
ICEIT'08
International Conference on Education and Information Technology 2008
ICIAR'08
International Conference on Intelligent Automation and Robotics 2008
ICIMT'08
International Conference on Internet and Multimedia Technologies 2008
ICMHA'08
International Conference in Modeling Health Advances 2008
ICMLDA'08
International Conference on Machine Learning and Data Analysis 2008
ICMSC'08
International Conference on Modeling, Simulation and Control 2008
ICSCA'08
International Conference on Soft Computing and Applications 2008
ICSEEM'08
International Conference on Systems Engineering and Engineering
Management 2008
ICSPIE'08
International Conference on Signal Processing and Imaging Engineering
2008
=============
Important Dates:
Draft Paper Submission Deadline: 2 July, 2008
Camera-Ready Papers Due & Registration Deadline: 30 July, 2008
WCECS 2008: 22-24 October, 2008
=========
Submission:
WCECS 2008 is now accepting manuscript submissions. Prospective
authors are invited to submit their draft paper in full paper (any
appropriate style) to WCECS{at}iaeng.org by 2 July, 2008. The
submitted file can be in MS Word format, PS format, or PDF formats.
The first page of the draft paper should include:
(1) Title of the paper;
(2) Name, affiliation and e-mail address for each author;
(3) A maximum of 5 keywords of the paper.
Also, the name of the conference that the paper is being submitted to
should be stated in the email.
It is our target that the reviewing process and the result
notification for each submitted manuscript can be completed within one
month from its submission. The reviewing process is to ensure the
quality of the accepted papers in the WCE congress. The conferences
have enjoyed high reputation among many research colleagues (for
example, see the http://cs.conference-ranking.net/ or
http://www.conference-ranking.com/).
More details about the WCECS 2008 can be found at:
http://www.iaeng.org/WCECS2008/index.html
More details about the International Association of Engineers, and the
IAENG International Journal of Computer Science, and the IAENG
International Journal of Applied Mathematics can be found at:
http://www.iaeng.org/about_IAENG.html
http://www.iaeng.org/IJCS/index.html
http://www.iaeng.org/IJAM/index.html
The official journal web site of Engineering Letters at:
http://www.engineeringletters.com
Other Engineering Letters web sites at:
http://www.engineeringletters.net
http://www.engineeringletter.com
********
It will be highly appreciated if you can circulate these calls for
papers to your colleagues.
|
| Author |
Message |
laredotornado

|
Posted: 2004-12-8 6:05:00 |
Top |
java-programmer, Anyone have any experience with WebLogic 8?
Hello, I have just installed WebLogic 814 for Solaris 8. The machine
is in a remote location, so I did all the installation remotely. My
question is, how do I create a data source? I am used to WL 5 with the
weblogic.properties file, but WL 8 seems different.
Any help is greatly apprciated, - Dave
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Help needed on the Java policyHi,
Michael Koch said:
> I'm currently working on a proposal for cleaning up the virtual package
> chaos. Please give me some more days for this.
Fair enough, let's consider as a warm up for the discussion that will come
once you'll show your proposal ;-)
Thanks, Eric
--
You don't need to CC me on debian-java, debian-mentors and
pkg-java-maintainers.
Please CC me on other Debian lists.
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 2
- 3
- generate private key from a exist fileHi
i want to generate a private key from a exist file. i tried this but it
dosen't works!
---------Code--------------
FileInputStream keyfis = new FileInputStream("keyCarlaSchaffner.pem");
//"keyCarlaSchaffner.der"
byte[] encKey = new byte[keyfis.available()];
keyfis.read(encKey);
keyfis.close();
X509EncodedKeySpec privKeySpec = new X509EncodedKeySpec(encKey);
KeyFactory kf = KeyFactory.getInstance("RSA");
PrivateKey pk = kf.generatePrivate(privKeySpec);
---------Code end ----------
i have the private key file in pem and der encoded version, but both didn't
work.
PEM :
-----BEGIN RSA PRIVATE KEY-----
Proc-Type: 4,ENCRYPTED
DEK-Info: DES-EDE3-CBC,F836EA29BA0C7925
....
...
...
-----END RSA PRIVATE KEY-----
DER: no readable
the exception is:
--------------------------------
java.security.spec.InvalidKeySpecException: Key spec not RSA.
at
com.sun.net.ssl.internal.ssl.JSA_RSAKeyFactory.getPrivateKeyData(DashoA6275)
at
com.sun.net.ssl.internal.ssl.JS_KeyFactory.engineGeneratePrivate(DashoA6275)
at java.security.KeyFactory.generatePrivate(KeyFactory.java:237)
--------------------------------
has anyone a idea?
thanks carla
- 4
- mailing.database.mysql-internals, mailing.database.mysql, mailing.database.mysql-java, comp.lang.java.programmerif you check the store requirements of column types in mysql,
http://mysql.azc.uam.mx/doc/en/Storage_requirements.html
You will see advertised that, for example, for storing a TINYINT they
use a byte, but when you create a table using the different types of
data:
CREATE TABLE mysql_data_types (
iTINYI TINYINT,
iTINYINTU TINYINT UNSIGNED,
iSMALLI SMALLINT,
iSMALLIU SMALLINT UNSIGNED,
iMEDIUMI MEDIUMINT,
iMEDIUMIU MEDIUMINT UNSIGNED,
iI INT,
iIU INT UNSIGNED,
lBIGINT BIGINT,
lBIGINTU BIGINT UNSIGNED,
fFLOAT FLOAT,
fFLOATX24 FLOAT(24),
fFLOATX25 FLOAT(25),
dDOUBLE DOUBLE,
dDOUBLEP DOUBLE PRECISION,
dREAL REAL,
dDECIMALM1D0 DECIMAL(1,0),
dDECIMALM1D1 DECIMAL(1,1),
dDECIMALM1D2 DECIMAL(1,2),
dNUMERICM1D0 NUMERIC(1,0),
dNUMERICM1D1 NUMERIC(1,1),
dNUMERICM1D2 NUMERIC(1,2),
CHARM16 CHAR(16),
CHARM16B CHAR(16) BINARY,
aVARCHARM255 VARCHAR(255),
aTINYTEXT TINYTEXT,
aTEXT TEXT,
aMEDIUMTEXT MEDIUMTEXT,
aLONGTEXT LONGTEXT,
bVARCHARM255 VARCHAR(255) BINARY,
bTINYBLOB TINYBLOB,
bBLOB BLOB,
bMEDIUMBLOB MEDIUMBLOB,
bLONGBLOB LONGBLOB,
tYEAR YEAR,
tTIME TIME,
tDATE DATE,
tTIMESTAMP TIMESTAMP,
tDATETIME DATETIME);
However when you use JDBC to query the column definitions, see:
http://java.sun.com/j2se/1.4.2/docs/api/java/sql/DatabaseMetaData.html#getColumns
with code like:
Cx = DriverManager.getConnection(aJDBCP + aTblDB, aUsr, aPW);
DBMD = Cx.getMetaData();
// __
RSFlds = DBMD.getColumns(aTblDB, null, aTblNm, "%");
// __
while(RSFlds.next()){
++itFldIx;
aFldNm = RSFlds.getString(4);
// __
iFTp = RSFlds.getInt(5); // java.sql.Types
aFTpS = RSFlds.getString(6); // TYPE_NAME
iFSz = RSFlds.getInt(7); // COLUMN_SIZE
iDecDigs = RSFlds.getInt(9);
iFNull = RSFlds.getInt(11);
iOrdPos = RSFlds.getInt(17);
...
}
// __
You will for example see that for a tinyint 4 bytes are being used
and that the column type in string format, does not return the
'unsigned' type specifier. Also, apparenly MySQL uses one byte less
for 'unsigned' variables.
Which is a little fishy to me. Both 'signed' and 'unsigned' variables
should use the same storage they are just interpreted differently,
since just one bit is used for the sign.
MySQL returns the same DATA_TYPE in the form of an java.sql.Types int
and TYPE_NAME as a String for 'signed' and 'unsigned' variables
Trying to use the difference in the COLUMN_SIZE specifier does not
work for example for 'BIGINT' and 'BIGINT UNSIGNED'.
How can you tell from the Data Type Definition/specifiers which
fields are unsigned ones?
There should be a 'descriptive' way right? (Other than going the
monkey way, inserting some data, retrieving it, comparing it and
deleting the test record, with which, well . . ., should be definitely
safe)
Do you know of standard or none standard ways to do that?
- 5
- JTable size adjustment after addrow(), JScrollPaneHi all.
Basically I'm doing the following:
--snip--
DefaultTableModel myTableModel=
new DefaultTableModel(new String[] {"header1","header2"},0);
JTable myTable=new JTable();
myTable.setModel(myTableModel);
TableScrollPane.setViewportView(myTable);
--snap--
When I do some myTable.addrow(...)s, the table is not resizing istself
appropriately, resulting in data being "cut off" at the bottom.
Does anyone know how to correctly adjust a table's preferred size (or
whatever) after changing its contents to fit the new row count and thus
making it usable in a ScrollPane?
Many thanks in advance,
Maximilian
- 6
- java code compressioni'm writing an applet which is growing a little out of control, and i'm
trying to cut down on the size of the final applet without reducing
functionality. is there a way to strip all excess symbols out of the applet
at compile time, or munge the internal names so that they're shorter?
coming from a C++ background, i have all of these nice, long explanatory
names for my constants - which end up taking an absurd amount of space.
any help would be appreciated!
daniel
- 7
- Thanks again sincerely Senator Barack Obama for your TagFrom: "Craig Oral Somerford" <email***@***.com>
Date: Jul 20, 1:16 pm
Subject: Fwd: Thank you Wal-mart... & From 2Barter's Google.Org
To:"Mr Barack Obama {On YouTube?}" <email***@***.com>,
Thank you Sincerely For you Tag Mr BarackObama
http://my.barackobama.com/page/community/post/craigoralsomerford/CXWz
"{2Barter's Google.Org}" http://my.barackobama.com
From: 2Barter.net <email***@***.com>
Date: Jul 7, 2007 10:58 PM http://www.2Barter.net
Subject: Calling all Contractors
To: "Mr Barack Obama" <email***@***.com>,
From:"{2Barter's Google.Org}" <email***@***.com>
Date: Jul 20, 2007 1:08 PM
Subject: Thank you Wal-mart... & From 2Barter's Google.Org
To:"{Steve Capus}" <email***@***.com>,
Cc:http://www.youtube.com/watch?v=wFGG6AjzZI4
Cc: Lee Scott Jr <email***@***.com>
Bcc: DONALD J. TRUMP
Welcome to Googlies new Jukebox
http://www.youtube.com/watch?v=7reY8OyYmLI
From: Craig oral Somerford <[email address]>
Date: Jul 20, 2007 12:31 PM
Subject: " Working in Faith is Fun "
To: Mayor Rey Nagin <[email address]>, Lee Scott Jr <privacy@wal-
mart.com>
Cc:http://mail.google.com/mail/?
disp=imgs&view=att&th=113e47b965b7b3b6
From: [email address] <[email address]>
Date: Jul 20, 2007 12:26 PM
Subject: " Working in Faith is Fun "
To: "2Barter's Google.Org" <[email address]>
Cc: "{2Barter's Google.Org}" <[email address]>
Friday July 19Th 2007
Thank you
Sincerely:
For CLICKING in
2Barter's Google.Org
"{United States Contractors Offering Service}" <[email address]>,
This Non-profit Is a A Non-profit for the
" PEOPLE "
><> ><> ><>
Enjoyhttp://groups.google.com/groups/search?q=2Barter's+Google.Org&qt_s=Se...
And Join today it's free and fun.
" Working in Faith is Fun "
Thank you
and may GOD Bless you.
As HE has this Non-profit in-which was given to HIM in Faith ><>
Sincerely:
Craig Oral Somerford
Founder of uscos2Barter
Welcome
"2Barter's Google.Org"
United States Contractors Offering Service email***@***.com A
Non-profit for the.
http://www.youtube.com/watch?v=uYtnNk7xCRE
" PEOPLE "
In following my hearts calling it leads me to tell you to say
welcome
I see some-thing that i guess allot of people do not see.
And that is a blessing from the storm.
Let me tell you a little bit about me self if i may.
You see all i have i gave up to GOD to this vary day.
For all i had is now in GOD'S hands i have nothing left but HIM.
No Car , ID , Income , House ,Wife Every-Thing is gone.
Plus i have never been happier living in faith totally.
>as i make my bed in SHEOL thou art with me .
For in Not knowing what i will be doing up until the time i do it
gives GOD all the time HE needs to work through me.
And in doing so giving HIM all the GLORY found in it as well.
The truth found in a Ethereal world we all live in
And my faith in him is growing faster and faster on a daily bases.
For HE is giving me guidance from my prayers through is SON.
To show you ; and the world.
That with out doughy HE is real.
And have that doughty cast into the Ocean for good.
Just like you see that HELL washed away.
Right from the boat you see me on in this site in-which i gave back
to
HIM
HIM who GOD.
Are Father in Heaven who it be thy name.
So to get back to what i mean ; in i see something that i feel allot
of you don't see.
and that being the blessing found in the wood laying all a muck down
south in the Gulf Coast of are Country. For Behold it is overlaid
with
Gold and silver.
Look in the Bible to see some answers to just what can happen when
you
wait on HIM for the answer
A CKICK Away
http://www.biblegateway.com/passage/?search=Habakkuk%202:19,20%20;&ve...
" Behold, it is overlaid with gold and silver,
Yet in it there is no breath at all.
20 " But the LORD is in His holy temple.
Let all the earth keep silence before Him."
What we do is simple we pick up all the little pieces that are laying
every were. And stock pile it for Manufacture.
say at all the Libraries to start. And just a shoe box full.
For then theo's well off or well to do people who wish to give Money
to these Paper-weight-pen-holders.
Ones lets say that are made just for these Donates in the Gluf Coast
and New Orleans area in-which were they were made our collected
at.People then who pay for them with this program could go through
its
fruition creating something of value big time for its monetary Value.
Plus everyone who helped from the people how picked it up to the
driver who drove it plus the plant.
Who made particle board out of it.
And with the scraps left over sent it then to have it then in-cased
in plex-glass and made into that paper weight pen holder thanking the
Donation given from that person who bought it and in faith allow
blessing to come from it when being seen to all who see it on there
desk.
Plus they then can write there vision like i wrote mine.
>From this blessing found in the storm and are Country's biggest
natural disaster.
Thank you GOD for this vision
In " Jesus the Christ "
Name ipray.
Craig Oral Somerford
17 July 2007
Right Mr Google?
THANK YOU
SINCERELY
Googlies new jukebox
" Is lots ans lots of fun " the ABCs?
&
Enjoy http://i56.photobucket.com/albums/g173/Krazjays4209/SHIPPINGGUY.gif
#1
http://www.youtube.com/watch?v=5xfWBM6wS1U
#2
http://www.entheosweb.com/photoshop_templates/architecture.asp
#3
http://my.barackobama.com/page/community/post/craigoralsomerford/CXWz
Thanks again sincerely Senator Barack Obama for your Tag
Reply Reply to author Forward
2Barter's Google.Org
View profile
More options Jul 21, 12:34 am
From: "Craig Oral Somerford" <email***@***.com>
Date: Jul 20, 1:16 pm
Subject: Fwd: Thank you Wal-mart... & From 2Barter's Google.Org
To:"Mr Barack Obama {On YouTube?}" <email***@***.com>,
Thank you
Sincerely
For you Tag
Mr BarackObama
http://my.barackobama.com/page/community/post/craigoralsomerford/CXWz
"{2Barter's Google.Org}" http://my.barackobama.com
From: 2Barter.net <email***@***.com>
Date: Jul 7, 2007 10:58 PM http://www.2Barter.net
Subject: Calling all Contractors
To: "Mr Barack Obama" <email***@***.com>,
From:"{2Barter's Google.Org}" <email***@***.com>
Date: Jul 20, 2007 1:08 PM
Subject: Thank you Wal-mart... & From 2Barter's Google.Org
To:"{Steve Capus}" <email***@***.com>,
Cc:http://www.youtube.com/watch?v=wFGG6AjzZI4
Cc: Lee Scott Jr <email***@***.com>
Bcc: DONALD J. TRUMP
Welcome to Googlies new Jukebox
http://www.youtube.com/watch?v=7reY8OyYmLI
From: Craig oral Somerford <[email address]>
Date: Jul 20, 2007 12:31 PM
Subject: " Working in Faith is Fun "
To: Mayor Rey Nagin <[email address]>, Lee Scott Jr <privacy@wal-
mart.com>
Cc:http://mail.google.com/mail/?
disp=imgs&view=att&th=113e47b965b7b3b6
From: [email address] <[email address]>
Date: Jul 20, 2007 12:26 PM
Subject: " Working in Faith is Fun "
To: "2Barter's Google.Org" <[email address]>
Cc: "{2Barter's Google.Org}" <[email address]>
Friday July 19Th 2007
Thank you
Sincerely:
For CLICKING in
2Barter's Google.Org
"{United States Contractors Offering Service}" <[email address]>,
This Non-profit Is a A Non-profit for the
" PEOPLE "
><> ><> ><>
Enjoyhttp://groups.google.com/groups/search?q=2Barter's+Google.Org&qt_s=Se...
And Join today it's free and fun.
" Working in Faith is Fun "
Thank you
and may GOD Bless you.
As HE has this Non-profit in-which was given to HIM in Faith ><>
Sincerely:
Craig Oral Somerford
Founder of uscos2Barter
Welcome
"2Barter's Google.Org"
United States Contractors Offering Service email***@***.com A
Non-profit for the.
http://www.youtube.com/watch?v=uYtnNk7xCRE
" PEOPLE "
In following my hearts calling it leads me to tell you to say
welcome
I see some-thing that i guess allot of people do not see.
And that is a blessing from the storm.
Let me tell you a little bit about me self if i may.
You see all i have i gave up to GOD to this vary day.
For all i had is now in GOD'S hands i have nothing left but HIM.
No Car , ID , Income , House ,Wife Every-Thing is gone.
Plus i have never been happier living in faith totally.
>as i make my bed in SHEOL thou art with me .
For in Not knowing what i will be doing up until the time i do it
gives GOD all the time HE needs to work through me.
And in doing so giving HIM all the GLORY found in it as well.
The truth found in a Ethereal world we all live in
And my faith in him is growing faster and faster on a daily bases.
For HE is giving me guidance from my prayers through is SON.
To show you ; and the world.
That with out doughy HE is real.
And have that doughty cast into the Ocean for good.
Just like you see that HELL washed away.
Right from the boat you see me on in this site in-which i gave back
to
HIM
HIM who GOD.
Are Father in Heaven who it be thy name.
So to get back to what i mean ; in i see something that i feel allot
of you don't see.
and that being the blessing found in the wood laying all a muck down
south in the Gulf Coast of are Country. For Behold it is overlaid
with
Gold and silver.
Look in the Bible to see some answers to just what can happen when
you
wait on HIM for the answer
A CKICK Away
http://www.biblegateway.com/passage/?search=Habakkuk%202:19,20%20;&ve...
" Behold, it is overlaid with gold and silver,
Yet in it there is no breath at all.
20 " But the LORD is in His holy temple.
Let all the earth keep silence before Him."
What we do is simple we pick up all the little pieces that are laying
every were. And stock pile it for Manufacture.
say at all the Libraries to start. And just a shoe box full.
For then theo's well off or well to do people who wish to give Money
to these Paper-weight-pen-holders.
Ones lets say that are made just for these Donates in the Gluf Coast
and New Orleans area in-which were they were made our collected
at.People then who pay for them with this program could go through
its
fruition creating something of value big time for its monetary Value.
Plus everyone who helped from the people how picked it up to the
driver who drove it plus the plant.
Who made particle board out of it.
And with the scraps left over sent it then to have it then in-cased
in plex-glass and made into that paper weight pen holder thanking the
Donation given from that person who bought it and in faith allow
blessing to come from it when being seen to all who see it on there
desk.
Plus they then can write there vision like i wrote mine.
>From this blessing found in the storm and are Country's biggest
natural disaster.
Thank you GOD for this vision
In " Jesus the Christ "
Name ipray.
Craig Oral Somerford
17 July 2007
Right Mr Google?
THANK YOU
SINCERELY
Googlies new jukebox
" Is lots ans lots of fun " the ABCs?
&
Enjoy http://i56.photobucket.com/albums/g173/Krazjays4209/SHIPPINGGUY.gif
#1
http://www.youtube.com/watch?v=5xfWBM6wS1U
#2
http://www.entheosweb.com/photoshop_templates/architecture.asp
#3
http://my.barackobama.com/page/community/post/craigoralsomerford/CXWz
Thanks again sincerely Senator Barack Obama for your Tag
- 8
- Add ActionListener to an Action
Okay so Action is fine for centralising event handling for multiple controls
of the same function. But I want to add a plain ActionListener for this
event. Seems reasonable. If I was just using ActionListeners I would add
as many as I like to a component. And they'd all be notified, but if I use
Action then I need to add the ActionListener to the Action, I can't.
Do I really need to get my subclassed AbstractAction to manage
ActionListeners and propagate the ActionEvent by calling
super.actionPerformed ?
Is there a better way? Other than abusing PropertyChangeListener ?
--
Mike W
- 9
- launch java(swing) applications from c/c++ on mac os xI want to launch a java application, which has lots of swing stuff in
it, as also underlying algorithms running. I work on Mac OS X 10.3.8,
and have Java 1.4.2_05(latest). I tried to launch AWT components like
Frame,Panel, etc and it worked fine, but swing won't. I discovered that
the code by default loads Java 1.3.1, and JNI 1.2, and hence no swing
is supported. Can someone help me out? Thanks in advance. Here is a
snippet of the native(c) code:
JNIEnv* create_vm() {
JavaVM* jvm;
JNIEnv* env;
JavaVMInitArgs args;
jint jintVMStartupReturnValue;
//JavaVMOption options[1];
JavaVMOption options[15];
args.version = JNI_VERSION_1_4;
args.nOptions = 15;
options[0].optionString =
"-Djava.class.path=/Users/avisere12/Desktop";
options[1].optionString =
"-Dsun.boot.library.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Libraries";
options[2].optionString = "-Xms16M";
options[3].optionString = "-Xmx512M";
options[4].optionString = "-Duser.dir=/Users/avisere12/Desktop";
options[5].optionString =
"-Djava.home=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home";
options[6].optionString =
"-Djava.ext.dirs=/Library/Java/Extensions:/System/Library/Java/Extensions:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/ext";
options[7].optionString =
"-Dsun.boot.class.path=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/classes.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/ui.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/laf.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/sunrsasign.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jsse.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/jce.jar:/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Classes/charsets.jar";
options[8].optionString = "-Djava.runtime.version=1.4.2_05-141.4";
options[9].optionString =
"-Djava.awt.graphicsenv=apple.awt.CGraphicsEnvironment";
options[10].optionString =
"-Djava.endorsed.dirs=/System/Library/Frameworks/JavaVM.framework/Versions/1.4.2/Home/lib/endorsed";
options[11].optionString = "-Djava.vm.info=mixed mode";
options[12].optionString = "-Djava.version=1.4.2_05";
options[13].optionString = "-Djava.vm.version=1.4.2-38";
options[14].optionString = "-Dawt.nativeDoubleBuffering=true";
args.options = options;
args.ignoreUnrecognized = JNI_TRUE;
jintVMStartupReturnValue = JNI_CreateJavaVM(&jvm, &env, &args);
return env;
}
void invoke_class(JNIEnv* env) {
jclass helloWorldClass;
jmethodID mainMethod;
jobjectArray applicationArgs;
jstring applicationArg0;
helloWorldClass = env->FindClass("com/mypack/pack/MyJava");
if(helloWorldClass == 0){
printf("Class not found\n");
fflush(stdout);
}
else{
printf("Class found and about to be loaded\n");
fflush(stdout);
}
mainMethod = env->GetStaticMethodID(helloWorldClass, "main",
"([Ljava/lang/String;)V");
applicationArgs = env->NewObjectArray(1,
env->FindClass("java/lang/String"), NULL);
applicationArg0 = env->NewStringUTF("yahoooooooo");
env->SetObjectArrayElement(applicationArgs, 0, applicationArg0);
env->CallStaticVoidMethod(helloWorldClass, mainMethod,
applicationArgs);
}
int main(int argc, char **argv) {
JNIEnv* env = create_vm();
invoke_class( env );
}
Here is the error which I get, more so when i try to run JNI 1.4:
2005-03-22 11:24:56.399 myapp[628] Apple AWT Java VM was loaded on
first thread -- can't start AWT.
Class not found
Bus error
I tried providing various optons as vm arguments, but got the same
errors as above.
- 10
- Servlet as JMS Sender/Receiver ?
Can a Servlet act as both a JMS Message Sender and Receiver?
Clients who call on this servlet would be BLOCKING for a response.
The servlet itself upon receival of client request sends the message to
the request MQ queue. This message will be picked up by a standalone
app(JMS client), after processing would write to the response queue.
Meanwhile the servlet would be polling onto the response JMS queue with
receive(timeOutPeriod) with the appropriate msg-selector.
Is there any other approach to avoid the blocking receive. I have read
that server side polling would use lot of sys resources and block the
threads. What other feasible approach is possible?
Having an asynch imple. is a NO in this case because clients cannot
write messages to the Queue.
The appln is hosted on WebSphere5 ND.
Any feedback would be very helpful. Thanks.
- Guru.
- 11
- DAO - best practicesHi All,
I know this is a little bit OT
Suppose I have 2 tables customers and products, customer can buy many
products, product can be bought by many customers - typical n:m
relationship so 3rd table is a must: i.e. purchases
So I need 3 DAO: ProductDAO, CustomerDAO and PurchaseDAO.
How do you deal with i.e. reports - table joins, left joins or
statistics (group by, max, min etc)?
do you create DAOs for that? (especially table joins - probably not)
raports and statistics from i.e. 7 tables can be only read-only, so
insert, update, delete methods
are inadequate.
thanks in advance for shedding some light on this
best regards
R
- 12
- getting hostname from NT machine via CitrixHi All,
I don't know if any one can help or has any ideas about this.
We are writing a web based application which will run on a Unix box. It will
be accessible only via a login to Citrix from client machines. We have
achieved a transparent login to the application (running in Tomcat) using an
LDAP lookup. What we are stuck on is the following. We would like to be able
to get the hostname of the NT machine which is logging on. Someone has
suggested that we may be able to do this using a signed applet. I have no
experience with Applets at all & wondered if any one knows if this is
achievable or has accomplished anything similar? Any other ideas on how we
might do this?
Many thanks
--
-P
"Programs that are hard to read are hard to modify.
Programs that have duplicated logic are hard to modify.
Programs with complex conditional logic are hard to modify"
( Kent Beck)
- 13
- Final field & custom serialized formatI have a class which has a single field:
private final File nameFile;
When serializing it, I want to save it as a String, rather than a File.
This will allow me to better check for platform incompatibilities during
deserialization.
I can serialize it like so:
private transient final File nameFile;
private void writeObject(ObjectOutputStream out) throws IOException
{
out.defaultWriteObject();
out.writeObject(nameFile.getPath());
}
A straightforward approach to deserialization won't work, however, for
the obvious reason that I won't be able to set nameFile to the File I
construct from my deserialized String.
I can't be the first person to run into this. What have others done in
this situation?
Thanks!
--
========================================================================
Ian Pilcher email***@***.com
========================================================================
- 14
- changing Reader midstreami have what seems to be a fairly common problem, but i can't seem to find an
answer... i have a java program which opens a connection to a webpage and
seeks to read the webpage in. if the charset is defined in the header, then
no problem - i simply set up my InputStreamReader using the correct Charset
and away i go. but if the charset is defined in a META tag, then i want to
be able to recognize that.
a good example of why this is important: Yahoo! Japan uses EUC-JP encoding,
and specifies it in the header. Excite Japan uses Shift_JIS encoding, and
specifies it in the META tag.
here's some pseudocode:
URL url = new URL(webpage);
URLConnection conn = url.openConnection();
if (conn.contentType() != null)
charset = getCharset(conn.contentType()); // yay!
else
charset = ISO-8859-1; // default
InputStream = conn.getInputStream();
BufferedReader reader = new BufferedReader(new
InputStreamReader(in,charset));
while (get data from reader) {
if (data is META tag && content-type specifies a new charset) {
reader = new BufferedReader(new InputStreamReader(in,newCharset));
// this is the problem
}
}
this, unfortunately, does not seem to work. is there a better (i.e.,
standard) way to do this?
thanks!
daniel
- 15
- Plottin a pixel...Hei!
How to write a single pixel with Java applet and OPENGL...
JariTapio/Helsinki/24may2005
www.EuroJari.com
|
|
|