| Jars built with JDK 1.3 and JDK 1.4 interoperating |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- Simple question for those who understand recursion well. Please help.I have a tree represented as a linked list of simple objects
(nodeId/parentId pairs) where the root node is the 1st element in the
list. The other nodes are in somewhat random order. The parentId refers
to the parent node.
I want to convert it into a list where the values are in pre-order.
I.e., I want to get this list as follows: ABCDEFGHIJ (see graph below).
I.e., get the 1st node, put in in the list. If it has children, go
through them one by one, get their child nodes, then put the parent in
the list, then the leftmost first, and go from there. I.e., so that
it's ordered in my linked list like this by (letters represent nodeId):
A
/ \
B J
/ | \
C H I
|
D
/|\
E F G
I created the following recursive method but it does not work
correctly. For example, it places the nodes A then B and then J into
the list first, rather than getting to J after adding all the child
nodes. "isOnTheList" checkes whether the item is already in the list.
"getImmediateChildren" returns the list of immediate child nodes
ordered by nodeId
Note: the empty list is passed to the method and is populated with the
result:
public static void orderTree(List list, List treeList) {
if(treeList == null || treeList.size() == 0)
return;
Node child = null; List children = null;
for(int i = 0; i < treeList.size(); i++) {
node = (Node) treeList.get(i);
// get list of children for this node
children = getImmediateChildren(node, treeList);
// if the node is not yet on the list, add it
if(! isOnTheList(node, list) )
list.add(cat);
// if it has children, recurse to add all other nodes
if(children.size() > 0) {
orderTree(list, children);
}
}
}
Any idea what the problem is?
Thanks.
- 3
- struts form population from an object model...flangelli wrote:
<snip>
> I have a business object model with attributes throughout that are
> mapped to different form beans. Every time that a form bean (jsp) is
> returned to the user's browser, I need to have a place to access my
> object model to retrieve the data from and populate the bean before it
> is displayed. So far it seems that the only time an action class is
> given "command" is AFTER the form submission, I need control on a page
> by page basis to retrieve the values from the object model into the
> bean so the jsp can render the beans values.....anyone had a problem
> similar to this? Thanks in advance - Flangelli
There's nothing which "requires" you to forward to a JSP; you could
just as easily forward to an action. The hitch here is that the
ActionForm will be populated according to the request parameters if
you just perform a forward. The solution is simply to specify
redirect="true" in the forwarding action so that the request
parameters get lost.
Just be careful in your validate method when using this mechanism:
you're users will be irked if the first time they see a page it
contains all manner of error messages. Since you often provide a
reset button on a form, the smart way to approach the situation is
to hold off generating errors if all form fields are blank (or
have the default value).
If this doesn't make perfect sense then repost and I'll dig up
some sample code. Or contact me off-line.
- 4
- package and jar filesHi,
I am new to Java. I hope someone can give me a hint.
What is the difference between package and jar files and do you use them ?
thanks
John
- 6
- extract numbers from picture?is this called pattern matching or AI in java? how can you extract a number
that is on a jpeg or bmp/gif/tiff ? is there any java package doing this?
thanks
- 7
- Re:Correct use of exceptionsWhen we talk about exception, it means that in some situation which we think
that it should works this way, but it isn't. For example, when we write
something to connect to remote SMTP server, we assume that the remote server
should be available but actually it is down... In this case, the exception
happened... So we need the exception handling to show our error message to
user and log the error.
Hope this helps!
Guoqi Zheng
http://www.big8reader.com
- 7
- Ant Javadoc failure when building help.I'm getting this error when trying to compile javadoc in ant from my
buildxml:
Any ideas?
C:\umg\java\web\dbtest\WEB-INF\src\build.xml:64: Javadoc failed:
java.io.IOException: CreateProcess: javadoc.exe -d
C:\umg\java\web\dbtest\WEB-INF\doc\api -classpath
C:\umg\java\web\lib\servlet-api.jar;C:\umg\java\web\lib\struts.jar;C:\umg\ja
va\lib\umg-db.jar -sourcepath
C:\umg\java\web\dbtest\WEB-INF\src -version -author
java.com.umusic.ecrm.web.test error=2
what's error=2????
this is in my build.xml:
<!-- Build Javadoc documentation -->
<target name="javadoc"
description="Generate JavaDoc API docs">
<delete dir="./doc"/>
<mkdir dir="./doc"/>
<javadoc sourcepath="./src"
destdir="./doc/api"
packagenames="*"
author="true"
private="true"
useexternalfile="yes"
version="true"
windowtitle="${project.title} API Documentation"
doctitle="<h1>${project.title} Documentation (Version
${project.version})</h1>"
bottom="Copyright © 2003">
<classpath refid="compile.classpath"/>
</javadoc>
</target>
- 7
- My bean doesn't APPEAR on my JSP page!Hi, All!
I have this simple bean (below), and i make the .class using JBuilder 7.0.
I tryed to insert this bean into my JSP page:
<%@ page contentType="text/html; charset=windows-1251" %>
<html>
<head>
<title>
Jsp1
</title>
</head>
<jsp:useBean id="bean0" scope="session" class="bean1.KivaHanTester" />
<jsp:setProperty name="bean0" property="*" />
<body>
<h1>
JBuilder Generated JSP
</h1>
</body>
</html>
BUT I CAN't see this bean, when i open my JSP (IExplorer + Apache).
May be i need to init this bean, like init() or show() i don't know.
Thanks.
SOURCE CODE:
package bean1;
import java.awt.*;
public class KivaHan extends Canvas {
private String msg;
private int width, height;
public KivaHan () {
this ("Coffee: 10 lira");
}
public KivaHan (String s) {
this (s, 200, 200);
}
public KivaHan (String s, int width, int height) {
msg = s;
this.width = width;
this.height = height;
setForeground (Color.cyan);
setFont (new Font ("Serif", Font.ITALIC, 24));
setSize (getPreferredSize());
}
public void paint (Graphics g) {
Dimension d = getSize();
FontMetrics fm = g.getFontMetrics();
int len = fm.stringWidth (msg);
int x = Math.max (((d.width - len) / 2), 0);
int y = d.height / 2;
g.drawString (msg, x, y);
}
public Dimension getPreferredSize () {
return new Dimension (width, height);
}
}
package bean1;
public class KivaHanTester extends java.applet.Applet {
public void init () {
add (new KivaHan());
}
}
- 7
- batch update as a single transactionHi,
I'm doing a JDBC batch update, writing several thousand rows to a single
table. As I understand it a batch update can partially succeed, so some of
my rows might get written and some not. I'd like the batch update to either
fully succeed or completely fail, commit or rollback in other words. Is that
easy to do? I'm pretty new at this.
Thanks,
John
- 10
- How do i do if-else condition in Struts ?How do i do if-else condition in Struts ?
logic:equal does not do it . how struts tag could be used in the JSP
page for an if-else condition ?
how to do it ?
Can anybody provide an example ?
- 12
- Eclipse vs NetBeans vs Jbuilder under LinuxHello everyone,
I've tried the above 3 IDEs in the last year and thought I might make some
comments and ask for your thoughts. Just for interest sake and please don't
start a Holy War ;-)
I originally used netBeans for development, but switched over to Jbuilder
because we where doing tomcat/struts development and my boss said it had
better support. I didn't really get to use netBeans struts stuff but it did
seem a bit weak in comparision.
I would have thought Borland would have a great editor, but I find it very
buggy in comparison to netBeans. Some of the things I have had problems
with include the cursor not being moved when you click in the text area
(this tends to screw up click and drag rearrangement of text or do it when
you don't mean too), auto-formatting of code rearranging it until it won't
compile, method parameter popups not always accessable, method parameter
popups not able to show the names of parameters - only the type, and some
others I can't remember right now.
However, the struts support in JBuilder does seem to be better than netBeans
and runs quite well. Over all the IDE also seems a little quicker and I
quite like the way that you can have multiple projects open and flip
between then with ease. netBeans doesn't seem to handle multiple projects
as smoothly as JBuilder.
I also tried Eclipse at home a couple of time in the last 6 months and at
the moment I can't see why many people are using it. On both occasions I
found also sorts of nasty bugs which tended to simple drive me nuts. The
last time time I used it for example, I found that it would not run the
code I had just edited. I.e. if I could load a project, made some changes
and hit the run button, it would run the code without the changes included.
In order to get the changes it, I had to explicitly do a save before each
run. This sounds trivial but can get very annoying, both netBeans and
JBuilder run the code you are editing, not the last saved code.
Eclipse also seemed to have a strange concept of projects. It looked rather
good with being able to see multiple project trees at the same time until
it came to running them. Then it appeared to separate the concept of
running a projects from the projects themselves and I had to effectively
re-setup again. I also found that if I had en error in one project, it
would fail the compile even if I was in another project. So whilst I could
have multiple projects open at a single time, it seemed to have trouble
understanding which projects I was in and what it was to compile. This
resulted in me having to unload/reload projects on a regular basis. I also
remember not being that happy with it's editor either, I can't remember
exactly why right now.
So, I would have to say that at the moment, I would tend to use netBeans for
general development, JBuilder for struts and Eclipse not at all.
--
cio
Derek
- 12
- Mp3 converter to WavHi,
I just need to convert a mp3 file to the Wav format.
Is there any free package existing, or do i have to write my own program ?
In that case, do you know any link that could help me to understand how to
do this ?
Thanks !
- 13
- Java GSM encoding from micHi
I'm trying to encode a microphone stream into GSM using
org.tritonus.lowlevel.gsm.Encoder but I am receiving just static noise -
I've checked the raw PCM output and it's fine. Is there anything obvious
that's missing here?
Thanks
__________________________
The mic is opened as:
AudioInputStream ais=null;
DataLine.Info info_mic = new DataLine.Info(TargetDataLine.class,
new AudioFormat(AudioFormat.Encoding.PCM_SIGNED, 8000.0f, 16, 1, 2,
8000.0f, false)
);
TargetDataLine mic = (TargetDataLine) AudioSystem.getLine(info_mic);
mic.open();
mic.start();
ais = new AudioInputStream(mic);
_____________________
And the GSM frame encoder is:
/*------*/
byte [] gsmframe(AudioInputStream ais){
byte [] encd = new byte[33];
try{
byte [] b = new byte[320];
ais.read(b,0,b.length);
DataInputStream di = new DataInputStream(new ByteArrayInputStream(b));
short [] buf = new short[160];
short j=0;
for(int k=0; k<buf.length; k++){
j=di.readShort();
buf[k]=j;
}
org.tritonus.lowlevel.gsm.Encoder enc = new
org.tritonus.lowlevel.gsm.Encoder();
enc.encode(buf, encd);
}catch(Exception e){
System.out.println("error with microphone reading "+e);
return null;
}
return encd;
}
/*-------*/
- 13
- jtreetabledear java professional,
i want to create a grid using jtreetable. i find the sample code in
the java.sun.com. but it is trickly to understand for me. do you
have any code
(simple code) for using the jtreetable ? i want to simple jtreetable
example program with sample data. do you have the code please send me
to my mail id
email***@***.com.
i also search in the net. but i only very less no. sample code related
to jtreetable. that code also so tricky. do you know any link that
contains simple
jtreetable program?
with regards,
balamurugan se
- 14
- [Q] Saving imageI am looking for a solution to how to make a background image
permanent in a Java application.
My application can have a background image, but when it saves its
file, the background image is not included in the saved file. Is there
a convenient (or right) way to save a gif (or jpeg or png) image into
an application file?
Thanks in advance.
Young-Jin
- 15
- Struts and AA based on a database
Hello:)
I have a question concerning authentification/authorization and
elements visibility on a Web page in Struts. How to manage the
visibility of control elements in a Struts-based application? The
information about users should be stored in a database and not in XML
configuration files. How to use role based or/and function based
authorization system and how to retrieve the rights from a database and
store them in the Principal object? The application is mantained within
Tomcat application server. So, how to do this? Or, being more precise,
is there any open-source library which provides such a functionality or
should I develop everything from scratch? Do you have some examples for
such stuff?
best regards,
Ania
|
| Author |
Message |
JS

|
Posted: 2005-4-5 21:40:00 |
Top |
java-programmer, Jars built with JDK 1.3 and JDK 1.4 interoperating
The Runtime Environment is JRE 1.4. The latest code I have written has
been compiled with JDK 1.4. However it depends on some packages written
and compiled with JDK 1.3. Is there anything to look out for in this
kind of setup or should I have to recompile the older code with 1.4? I
have tested the whole thing and it works, but I wanted some more
information. It is a swing code and I need the JProgressBar's
indeterminate state which is available only in JDK 1.4.
Any update is welcome. If there is any document explaining the above,
that would be perfect. I searched but I was not able to find any
reference.
Thanks
JS
|
| |
|
| |
 |
Andy Flowers

|
Posted: 2005-4-6 1:20:00 |
Top |
java-programmer >> Jars built with JDK 1.3 and JDK 1.4 interoperating
JS wrote:
> The Runtime Environment is JRE 1.4. The latest code I have written has
> been compiled with JDK 1.4. However it depends on some packages
> written and compiled with JDK 1.3. Is there anything to look out for
> in this kind of setup or should I have to recompile the older code
> with 1.4? I have tested the whole thing and it works, but I wanted
> some more information. It is a swing code and I need the
> JProgressBar's indeterminate state which is available only in JDK 1.4.
>
> Any update is welcome. If there is any document explaining the above,
> that would be perfect. I searched but I was not able to find any
> reference.
>
> Thanks
> JS
This might help http://java.sun.com/j2se/1.4/compatibility.html but it
should be totally upwards compatible.
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Drawing ImageHi,
I am developing a login application in which i need to have an image
put on to a JFrame which has several internal frames. (The main frame)
when I use the graphics object, it draws up the image and it disappears
in a few seconds.
I tried to change the background color, but i see only a flash of the
color and it disappears.
It would be extremely helpful is someone could sort this problem for
me.
Thank you,
Sumit
import javax.swing.*;
import java.awt.*;
import java.io.*;
import java.awt.event.*;
import javax.imageio.*;
import java.awt.Graphics.*;
public class Login extends JPanel implements KeyListener ,
ActionListener
{
JFrame mainFrame;
JDesktopPane desktop, background;
JInternalFrame user;
JButton ok, cancel;
JTextField userName;
TextField pass;
JLabel lname,lpass,message,ms;
JMenuBar mb;
JMenu start,view,options,insert,help;
JMenuItem ocm,ccm,print,exit,about;
Boolean connectionManagerStatus;
Image img;
Login()
{
/*
* Basic Theme
*/
try
{
UIManager.setLookAndFeel(UIManager.getCrossPlatformLookAndFeelClassName());
//UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
}
catch (Exception e)
{
System.out.println(e.toString());
}
/*
* Initializations and addition to the program
*/
mb = new JMenuBar();
desktop = new JDesktopPane();
background = new JDesktopPane();
mainFrame = new JFrame (".:: I . C . E ::. Application");
mainFrame.setJMenuBar(mb);
start = new JMenu ("Start");
view = new JMenu ("View");
options = new JMenu ("Options");
insert = new JMenu ("Insert");
help=new JMenu("help");
start.setMnemonic(KeyEvent.VK_S);
view.setMnemonic(KeyEvent.VK_V);
options.setMnemonic(KeyEvent.VK_O);
insert.setMnemonic(KeyEvent.VK_I);
help.setMnemonic(KeyEvent.VK_H);
mb.add(start);
mb.add(view);
mb.add(options);
mb.add(insert);
mb.add(help);
background.setVisible(true);
background.setSize(640,640);
ocm=new JMenuItem("Open Connection Manager",KeyEvent.VK_O);
ccm = new JMenuItem("Close Connection",KeyEvent.VK_C);
print = new JMenuItem("Print",KeyEvent.VK_P);
exit = new JMenuItem("Exit",KeyEvent.VK_X);
about = new JMenuItem("About Us",KeyEvent.VK_A);
start.add(ocm);
start.add(ccm);
start.addSeparator();
start.add(print);
start.add(exit);
help.add(about);
user = new JInternalFrame("Connection Manager");
lname = new JLabel("USERNAME:");
userName = new JTextField (50);
lpass = new JLabel("PASSWORD:");
pass = new TextField(50);
pass.setEchoChar('*');
ms = new JLabel ("Message From Server: ");
message = new JLabel("3 Wrong attempts and account freezes");
ok = new JButton ("Login");
cancel = new JButton ("Cancel");
ok.setBounds(20,180,100,20);
cancel.setBounds(130,180,100,20);
mainFrame.setUndecorated(false);
mainFrame.add(desktop);
mainFrame.setFocusable(true);
options.setEnabled(false);
insert.setEnabled(false);
view.setEnabled(false);
print.setEnabled(false);
ocm.setEnabled(false);
ccm.setEnabled(false);
connectionManagerStatus=true;
mainFrame.setSize(Toolkit.getDefaultToolkit().getScreenSize());
desktop.setSize(640,480);
lname.setBounds(10,40,70,20);
userName.setBounds(100,40,130,20);
lpass.setBounds(10,100,100,20);
pass.setBounds(100,100,130,20);
ms.setBounds(15,270,140,20);
message.setBounds(10,320,240,20);
message.setForeground(Color.darkGray);
user.setLayout(null);
user.getContentPane().add(lname);
user.getContentPane().add(userName);
user.getContentPane().add(lpass);
user.getContentPane().add(pass);
user.getContentPane().add(ok);
user.getContentPane().add(cancel);
user.getContentPane().add(ms);
user.getContentPane().add(message);
user.setResizable(false);
//JLabel s = new JLabel("XXXXXXXXXXXXXXx");
ok.setEnabled(false);
user.setVisible(true);
user.setSize(340,480);
desktop.setLocation(30,200);
desktop.add(user);
user.setLocation(30,200);
//user.setBorder(BorderFactory.createRaisedBevelBorder());
// adding listeners
userName.addKeyListener(this);
exit.addActionListener(this);
cancel.addActionListener(this);
ocm.addActionListener(this);
pass.addKeyListener(this);
ok.addActionListener(this);
mainFrame.setVisible(true);
mainFrame.validate();
l();
}
public void actionPerformed (ActionEvent ae)
{
if ((ae.getSource())==exit)
{
System.exit(0);
}
else if ((ae.getSource())==cancel)
{
user.setVisible(false);
userName.setText(null);
pass.setText(null);
ocm.setEnabled(true);
}
else if ((ae.getSource())==ocm)
{
user.setVisible(true);
ocm.setEnabled(false);
}
else if ((ae.getSource())==ok)
{
user.setVisible(false);
ocm.setEnabled(false);
ccm.setEnabled(true);
System.out.println(pass.getText());
}
}
public void keyPressed (KeyEvent ke)
{
if ((ke.getComponent())==userName)
{
if (userName.getText()!=null)
{
ok.setEnabled(true);
}
else
{
ok.setEnabled(false);
}
}
else if ((ke.getComponent())==pass)
{
}
}
public void keyReleased (KeyEvent ke1)
{
}
public void keyTyped (KeyEvent ke2)
{
}
public static void main (String args [])
{
Login obj = new Login ();
}
public void l()
{
Graphics g = mainFrame.getGraphics();
try
{
img = Toolkit.getDefaultToolkit().getImage("d:\\loge.bmp");
g.drawImage(img,1024,800,null);
System.out.println("Image drawn");
}
catch (Exception e)
{
System.out.println(e.toString());
}
}
}
- 2
- Snake Sex 1827email***@***.com wrote:
> I like to masterbate with my pet python, i hope you enjoy the pics i posted here of me having a wonerfull snakey time !
>
> http://superbabes.sexpartnerbd.com
> cvgixlemtdskrblgjgfeitxfscjzhrcppyxghjowcxfo
>
leave it out! this is a java programming news group!
try comp.lang.python
W'ell just hang here having a wonderful erm.... "Classy" time! [groan]
- 3
- JDOM stringsHi All !
I have some xml file that contain next tag:
<text>ÐоÑ</text>
I get Element text = ... on this tag and want get string that it contain:
String myText = text.getText();
I hope to see in the myText : 0xD09D 0xD0BE .....
but get next set:
0xC390 0xC29D 0xC390 0xC2BE 0xC391 0xC280 0xC390 .... ?????
what is it 0xC390 ??? And how can I get that I want :) ???
--dima
- 4
- Forcing System.gc()I have an app that, at one point, really bogs down as so many objects are
created and released in a lengthy process.
I am wondering if I may not be able to improve performance by System.gc() in
some "right" places in my code (wherever those might be!). It seems to me
though, that the gc facilities in Java are so good, that this is something
best left up to the JVM, and NOT mess with putting System.gc() in anyplace?
I am on WinXP / Vista and JRE 1.6.x. TIA, R. Vince
- 5
- popupmenu for a cell in a JTableHello
I want to have a popupmenu when I right click on a selected cell in a JTable
(using with a AbtractTableModel). What are steps I should do, please help.
Thank you
S.Hoa
- 6
- JSP Include IssuesI have a web page using an include file. I am passing params to the
include page using jsp:param but am having some difficulty.
Locally (Windows PC/Tomcat Server, JBuilder) I can include ™ in
the heading1 param - when I put this live (Linux/Tomcat Server) the
heading1 text is cut off after the &. There is no error message from
Java (unless it is a System.out.print type error).
Does anyone have any suggestions as to why this is not working and how
I can resolve it?
<jsp:include flush="true" page="/inc/nav.jsp">
<jsp:param name="heading1" value="Business Web Design:
<em>Functional, Findable, Accessible ™</em>" />
<jsp:param name="pageTitle" value="Home" />
</jsp:include>
Regards,
Rick
www.e-connected.com
- 7
- Communicating with a servlet using NIO?Is it possible for a client applet to communicate with a servlet using NIO?
I know it's possible using standard IO but I would like to implement a
servlet that accepts NIO connections from clients and interacts with them.
Is this possible? I don't want to use a special port because of firewall
considerations.
--
And loving it,
-Q
_________________________________________________
email***@***.com
(Replace the "SixFour" with numbers to email me)
- 8
- Corba java apllet client communication problemI hava a problem with communication between Java/Corba server based on JDK
ORB with Java/Corba client (applet)
based on the same ORB. I`m using IOR to localize server.
client`s ORB i initialize like that:
Dane proxy = null;
ORB orb = ORB.init(parent, null);
org.omg.CORBA.Object obj = orb.string_to_object(sIOR);
proxy = DaneHelper.narrow(obj);
server`s ORB i initialize like that:
ORB orb = ORB.init(args, null);
POA rootpoa = POAHelper.narrow(orb.resolve_initial_references("RootPOA"));
rootpoa.the_POAManager().activate();
DaneImpl oDane = new DaneImpl();
org.omg.CORBA.Object ref = rootpoa.servant_to_reference(oDane);
String ior = orb.object_to_string(ref);
It looks like that:
- if i`m trying to run applet throught web site from the same (192.168.0.1)
computer where Corba sever works
everything works fine, i write it in the browser->
http://192.168.0.1//TestCoraba.html
- if i`m trying to run applet throught web site from an other (192.168.0.2)
computer server receive method call
from client but client can`t receive server`s answer and stops, i write it
in the browser-> http://192.168.0.1//TestCoraba.html
Maybe you what i`m doing wrong.
Thanks form any help.
Best Regards - gRabbi
- 9
- Need to know ASAPOur educational counselors are recruiting new people for our home degree program.
We are running this program as an experiment and we feel you may qualify. This program will earn you a fully qualified degree, with transcripts. Currently we are recruiting people with vast knowledge or experience in the field/trade of their choice.
Give our recruiting office a call when you have time.
Thanks
Alexander Piper
Office Number: 1-773-509-4920
We hope to be talking to you soon.
*We are taking calls at anytime in the day or evening.
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 10
- CeWolf and JSPHi, I'm Claudio, I'm a student and I want to use ceWolf for my graphs
in JSP pages. I visited the web site http://cewolf.sourceforge.net/
and i followed each pass of the tutorial but I don't visualize the
chart, there is an exeption: NullPointerException in cewolf_jsp.java
row 202:
int _jspx_eval_cewolf_img_0 = _jspx_th_cewolf_img_0.doStartTag();
In the JSP, if I delete this row:
<cewolf:img chartid="line" renderer="cewolf" width="400"
height="300"/>
all go ok, but obviously there isn't the chart.
Could you help me, please!
Thanks, Claudio
- 11
- Vendor independent data sourceI have an application that I deployed to WebSphere using the default
Struts datasource from it's action. I've been reading about this now
and it sounds like this is not the prefered way to make a database
connection pool. They suggest using the containers, but I want to
remain vendor independent and be able to deploy my application in any
container with little or no changes.
I know there must be a standard non-vendor specific way to create a
connection pool. Can someone tell me what that standard is? Searching
the web just provided me with about 100 different ways to do it, but I
want the "Java Standard" way to do this.
Thanks,
Smitty
- 12
- Java inherited annotationsHello all!
Some times ago the problem was raised... I and my collegs started to
use Java annotations and noticed that our annotations those was made
for java interfaces and their methods didn't accessible in inherited
classes and interfaces... I tried to use the metatag @Inherited but IMHO
it doesn't work correctly. Anyway we have made our own realization of
inherited Java annotations and shared it. So u can use it if you want.
It is free and open source. Can be downloaded from here:
http://www.fusionsoft-online.com/annotation.php
Best Regards,
Michael Milonov
- 13
- Why jdk-1.5.0 and diablo-jdk-1.5.0 does not containOn Tue, Jan 08, 2008 at 01:04:22PM +0300, Alex Pivovarov wrote:
> Could you tell me why jdk-1.5.0 and diablo-jdk-1.5.0 does not contain
> sunpkcs11.jar in jre/lib/ext?
> Or I was doing something wrong when I install them. I use default options --
> the only think I uncheck is browser plugin.
Because the source code and build infrastructure aren't included for either
the JAR or the native library in the source that Sun distributes(*). You
could copy the included Linux/Solaris JARs over, but then you need to build
the corresponding native library somehow.
* - Actually, the source is there, but its bundled up and there is no
build infrastructure.
Thats my recollection at least.
--
Greg Lewis Email : email***@***.com
Eyes Beyond Web : http://www.eyesbeyond.com
Information Technology FreeBSD : email***@***.com
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
- 14
- Tomcat, Oracle, connection pooling, BLOBsI have a rather strange problem with Tomcat's connection pooling and
the Oracle JDBC driver when using BLOBs that seems to be related to
class loading.
My configuration:
Tomcat 5.0.27
Oracle 9i
ojdbc14.jar is in $CATALINA_HOME/common/lib (and nowhere else)
The datasource is configured in server.xml
Everything works perfectly as long as I don't configure the datasource
in the server.xml file (including reading/writing BLOBs).
Once I use the datasource configuration in server.xml everything
except Oracle's BLOB implementation works (means: I can access the
tables, insert, select etc., but I can't read/write BLOBs)).
The problem is with class loading:
System.out.println(getConnection() instanceof
oracle.jdbc.driver.OracleConnection);
System.out.println(getConnection().getClass().getName());
results in:
false
oracle.jdbc.driver.OracleConnection
So the connection is of the expected type, but the type has been
loaded with the wrong class loader. This leads to a ClassCastException
in the Oracle JDBC driver (createTemporary()).
As I told you the JDBC driver is in common/lib and nowhere else, so
the class should be available in the application code.
Any hints ?
- 15
- Why is creating a simple component with Netbeans IDE fails with an exceptionHi
steps:
using a mounted sub-directory named TESTING
Template: In the Explorer, select the TESTING node and choose File New "Java
Gui Form" Bean Form. click next
Target Location: In Name enter TargetName. click next
Basic Class definition: Superclass select javx.swing.JComponent. click
finish
Why do you get an exception :
Cannot determine form type (javax.swing.JComponent)
Please make sure the class is a JavaBean
The form cannot be opened.
I am trying to build a component similar to a JLabel which is a JavaBean
derived directly from a JComponent.
Which step is missing or am I completly out to lunch.
Thanks in advance
Andre
|
|
|