| Need some assistance please |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- instanceof strange behaviourHi there.
I have a problem that consists of the following.
In my class, I have a method named getNativePreparedStatement that
receives a parameter of the type PreparedStatement:
private PreparedStatement getNativePreparedStatement(PreparedStatement
ps)
I pass to this method a non null object of the type:
org.apache.commons.dbcp.DelegatingPreparedStatement
Inside this method, I do a conditional instruction like this:
if(ps instanceof DelegatingPreparedStatement){
//some code here
}
What happens is that in the if instruction the instanceof operator does
not recognize the object ps as a DelegatingPreparedStatement object.
Now, I am sure ps is of the type DelegatingPreparedStatement.
Does anyone have some clue why this happens?
I am running this application under the Apache Tomcat application
server and I am using struts.
Regards,
LA
- 3
- ports/81272: JDK 1.5 port doesn't build.Synopsis: JDK 1.5 port doesn't build.
Responsible-Changed-From-To: freebsd-amd64->freebsd-java
Responsible-Changed-By: arved
Responsible-Changed-When: Fri Nov 25 16:57:03 GMT 2005
Responsible-Changed-Why:
Refile, this looks like a ports issue.
Assign to port maintainers
http://www.freebsd.org/cgi/query-pr.cgi?pr=81272
- 5
- Is this a ZipInputStream Bug?
I just got thru tracking down what was happening, but I still don't know
WHY.
Im using ZipInput & Output Stream classes to make a compressed file
(actually it's an image). I create it via ZipOutputStream using a 1K
buffer for writing i.e.:
...
try { // Create the ZIP file
zos = new ZipOutputStream(new FileOutputStream(zipfname)); }
catch (IOException e) {
System.out.println("ZipOutputStream error on open.");
return null; }
try { zos.putNextEntry(new ZipEntry(imgfname)); }
catch (IOException e) {
System.out.println("ZipOutputStream error on put-entry.");
return null; }
...
try { zos.write(bbuf, 0, bix); }
catch(IOException e) {
System.out.println("ZipOutputStream error on write.");
error = true;
break;
}
...
Here bbuf is 1K.
All is ok - WinZip can extract it and the image is fine. Then I try to
read it back via ZipInputStream - i.e.:
...
try { zis = new ZipInputStream(new FileInputStream(filespec)); }
catch (IOException e) {
System.out.println("ZipInputStream error on open.");
return pixels; }
try { zent = zis.getNextEntry(); }
catch (IOException e) {
System.out.println("ZipInputStream error on get-entry.");
return pixels; }
...
while ( cnt > 0 ) {
try { rcnt = zis.read(bbuf, rcnt, cnt); }
catch(IOException ex) {
System.out.println("ex: " +ex.getMessage());
error = true; }
cnt -= rcnt;
}
...
Here is where the problem occurs. If bbuf is 128 or 256 bytes the image
returns just like it should. But if I increase it to 1K junk starts to
show up within the picture at 4K the picture is barely viewable because
of the junk and at 32K I get ArrayOutOfBounds exception during the read
(NOT related to my code). I've verified that the "junk" is data that did
not come out of the zip, the way it went in.
I'm running JDK 1.3.1 on an NT4.0 platform.
Have others seen this behavior ?
Any ideas on why ?
TIA
Don Sykes
- 6
- Null pointer exception while trying to repaint the component that displays a buffered image when the component is scrolled using scroll barI am trying to repaint a component that displays a buffered image when
the component is scrolled. I get the following error:
[java] java.lang.NullPointerException: NullSD does not handle
this operation
[java] at sun.java2d.NullSurfaceData.getRaster(Unknown Source)
[java] at sun.java2d.loops.OpaqueCopyAnyToArgb.Blit(Unknown
Source)
[java] at sun.java2d.loops.GraphicsPrimitive.convertFrom(Unknown
Source)
[java] at sun.java2d.loops.MaskBlit$General.MaskBlit(Unknown
Source)
[java] at sun.java2d.loops.Blit$GeneralMaskBlit.Blit(Unknown
Source)
[java] at sun.java2d.pipe.AlphaPaintPipe.renderPathTile(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer
$Composite.renderBox(Unknown Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.spanClipLoop(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.renderSpans(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.renderPath(Unknown
Source)
[java] at sun.java2d.pipe.SpanShapeRenderer.fill(Unknown Source)
[java] at sun.java2d.pipe.ValidatePipe.fill(Unknown Source)
[java] at sun.java2d.SunGraphics2D.fill(Unknown Source)
[java] at
i3dea.ditto.DocumentImageDisplay.paintZone(DocumentImageDisplay.java:
256)
[java] at
i3dea.ditto.DocumentImageDisplay.paintComponent(DocumentImageDisplay.java:
467)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JComponent.paintChildren(Unknown Source)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JViewport.paint(Unknown Source)
[java] at javax.swing.JComponent.paintChildren(Unknown Source)
[java] at javax.swing.JComponent.paint(Unknown Source)
[java] at javax.swing.JComponent.paintWithOffscreenBuffer(Unknown
Source)
[java] at javax.swing.JComponent.paintDoubleBuffered(Unknown
Source)
[java] at javax.swing.JComponent._paintImmediately(Unknown
Source)
[java] at javax.swing.JComponent.paintImmediately(Unknown Source)
[java] at javax.swing.RepaintManager.paintDirtyRegions(Unknown
Source)
[java] at javax.swing.SystemEventQueueUtilities
$ComponentWorkRequest.run(Unknown Source)
[java] at java.awt.event.InvocationEvent.dispatch(Unknown Source)
[java] at java.awt.EventQueue.dispatchEvent(Unknown Source)
[java] at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
[java] at
java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[java] at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
[java] at java.awt.EventDispatchThread.run(Unknown Source)
Thanks
Mangai
- 9
- pornn piictures!
contentt!
http://thecowboyfft.com
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 10
- programming the JVMHi,
I'm wanting to program the JVM independant of a compiler by
emitting bytecodes directly and I have orderd the book by J Engel
'Programming for the JVM'.
The lead on this book from amazon is 4-6 weeks which (may?) turn
into never. Does anyone here have recommendations for alternate
texts (that are introductory/tutorial in nature, rather than
reference texts) and websites that may help me with this - so
I don't just sit kicking my heels while it possibly doesn't arrive?
I've hunted in most of the obvious places but nothing seems to
fit the need or cover the topics that the Engel book does
sensibly.
TIA
Chris
- 10
- java vs ircHi
Im at a crossroad as to how to implement a webchat. I have the option of
building a chat using a standard IRC server saving me the trouble of
implementing it myself, OR i can write the server myself in Java giving me
full customizability. I would tend to go with the latter approach however im
rather concerned about performance. By performance im thinking bandwidth and
server load. So my question is: is it possible to build a chat server in
Java that is
a) better or equal to an IRC server utilizing bandwidth, and
b) better or equal to an IRC servers server load?
Im thinking performance wise that IRC would be better, but im not sure
whether this is true so im asking if anyone can give me some input as to why
one solution would be better than the other.
Thanx
Mike
- 11
- sysdeo plugin for tomcat/eclipse gone?Hello,
does anybody still have a copy of the latest pluging of sysdeo for
tomcat/eclipse integration? The link to
http://www.sysdeo.com/eclipse/tomcatPlugin.html
does not work anymore...
And I really liked this integration.
Thanks for hints.
- 11
- AXIS attachment problemHi,
Currently i tried to make attachment with AXIS .
I have following error message
Exception in thread "main" AxisFault
faultCode: {http://xml.apache.org/axis/}Server.NoService
faultSubcode:
faultString: The AXIS engine could not find a target service to invoke! target
Service is null
faultActor:
faultNode:
faultDetail:
I think i could resolve my problem if i found a little attachment sample ?
Where could i found it, or a tutorial ?
Regards
Philippe
- 11
- static reference in a non-static methodI'm trying to run a simple program that read info from a file and
displays it on the screen. However, I am constantly getting the
following error.
==================================================================================
Exception in thread "main" java.lang.Error: Unresolved compilation
problems:
Cannot make a static reference to the non-static field tokenizer
Cannot make a static reference to the non-static field tokenizer
==================================================================================
I don't want to declare any variables static since I don't think I
need to. My code is given below.
================================================================
File myFile = new File("Info.txt");
Scanner tokenizer = new Scanner(myFile);
String str = null;
public static void main(String[] args)
{
while (tokenizer.hasNextLine())
{
System.out.println(tokenizer.next());
}
}
=========================================================================
I was getting a similar error when I was trying to read in standard
input from the user i.e. using input stream reader and buffer
reader.
Can anyone please help?
- 12
- model to xmlHi,
We have "Objects" that relate to each other in a parent-child
relationship. Also these objects can have references to ther objects
that is not a parent. Let me give you all an example.
I have the following parent-child relationship between objects,
Object A=1
|
-------------
| |
Object B=1 Object C=1
|
-------------
| |
Object D=1 Object D=2
Note: The number is the identity when we have more than one object of
the same type.
"Object A=1" is parent to child "Object B=1".
We have the same relationship for "Object D=1". "Object A=1" is parent
to "Object B=1" which is parent to "Object D=1". The path to "Object
D=1" is "Object A=1,Object C=1,Object D=1".
Also "Object B=1" can have a reference to "Object D=2". The
"reference"-attribute in "Object B=1" has the following path,
"Object A=1,Object C=1,Object D=2"
My question is if there is a tool where I can graphically create my
model ( see my nice one !!!) and from that generate an xml file ( or
xmi).
Requirements:
* It is important that when I create "Object B=1" it must be possible
for "Object B=1" to know that it's parent is
"Object A=1". When the hirarchy grows the child at the end should know
the whole path to itself.
* It is also important that a reference to an Object D=2 is created as
"Object A=1,Object C=1,Object D=2"
Has anyone done something similar? Any open-source tools for this? All
ideas/questions are welcome.
BR
//Mikael
- 13
- JGoodies JLabel with multiple linesHi
I use JGoodies Forms to create a GUI application. I need to show a simple
multiline description in the window. I use JLabel with html text like
"<HTML> ... my description ... </HTML>".
Because it's multiline, java never knows how much lines it contains and what
is initial height of that component. When I add this do panel and show on
the screen, my frame has to small height and hides some components. General
problem is that I use different fonts (almst blind user can select bigger
fonts).
code:
-------------------------------
FormLayout layout = new FormLayout("fill:500px", // kolumny
"p, 10px, p, 10px, p, 7px, p, 7px, p, 10px, p"); //
wiersze
PanelBuilder builder = new PanelBuilder(layout);
builder.setDefaultDialogBorder();
CellConstraints cc = new CellConstraints();
...........
builder.add(textArea, cc.xy(1,3));
...........
getContentPane().add(builder.getPanel());
pack();
Can anyone help me ?
Tom
- 16
- Doctors Use This Too SSBfa5
"Ci-ialis Softabs" is better than Pfizer Viiagrra
and normal Ci-ialis because:
- Guaaraantees 36 hours lasting
- Safe to take, no side effects at all
- Boost and increase se-xual performance
- Haarder e-rectiions and quick recharge
- Proven and certified by experts and doctors
- only $3.99 per tabs
Cllick heree:
http://ossifies.com/cs/?ronn
o-ut of mai-lling lisst:
http://ossifies.com/rm.php?ronn
eD
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 16
- Changing Tomcat configurationHello everyone having a slight issue with the java.home variable for
tomcat. It is pointing at the JRE instead of the JDK and I have no idea
where it is set at. If anyone knows where I can change it please inform me.
Thanks,
Jerry
- 16
- starting a weblogic servlet?Hello,
I have written a basic servlet of the form
public final class MyServlet extends HttpServlet
{
public void init(ServletConfig config) throws ServletException
{
super.init(config)
/* do other stuff */
}
}
My question is, what do I need to do so that the "init" method is
invoked upon servlet (i.e. Weblogic) startup? I'm using Weblogic 5.1
sp 12 on Sun Solaris.
Thanks for your help, - Dave
|
| Author |
Message |
Numberwhun

|
Posted: 2003-8-6 10:49:00 |
Top |
java-programmer, Need some assistance please
Hello everyone! I am trying to learn java and have run into kind of a
snag. Here is the code that I have so far:
------ <begin_code> ----------
import javax.swing.*;
import javax.swing.JApplet;
import javax.swing.JOptionPane;
import java.awt.Graphics;
public class Rectangles {
public static void main ( String args[] ) {
// Variables to hold the users input
String number1;
String number2;
String number3;
String number4;
int x;
int y;
int width;
int height;
nextRect: // Continue point for drawing another Rectangle
// Gather input and parse into integers
number1 = JOptionPane.showInputDialog(null, "Please input the x value: ");
number2 = JOptionPane.showInputDialog(null, "Please input the y value: ");
number3 = JOptionPane.showInputDialog(null, "Please input the width
value: ");
number4 = JOptionPane.showInputDialog(null, "Please input the height
value: ");
x = Integer.parseInt(number1);
y = Integer.parseInt(number2);
width = Integer.parseInt(number3);
height = Integer.parseInt(number4);
public void paint( Graphics g )
{
super.paint(g);
g.drawRect(x, y, width, height);
String answer;
answer = JOptionPane.showInputDialog(null, "Would you like to draw
another rectangle? ");
if ( answer == "yes | y")
continue nextRec; // go to nextRec and start over
else
System.exit(0);
}
}
}
------ </end_code> --------
Now, the problem I am having, is I am getting an error between the 't' and
the '(' in "public void paint( Graphics g )" Please be kind in your
comments and keep in mind that I am just learning. If I am trying to do
something that I shouldn't please let me know. I would really like to
know why this won't work.
Thank you in advance!
Regards,
jlk
|
| |
|
| |
 |
Christopher Blunck

|
Posted: 2003-8-6 11:44:00 |
Top |
java-programmer >> Need some assistance please
jlk-
You are attempting to define your paint(Graphics) method within your main
method. This will not work. Define the paint method outside of the
main method and you'll have much more luck,
-c
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Making an exe and using external jarsHi,
Im making an Swing application that times canoe races. I want to be
able to give my client an executable file for the application that
runs once it is double clicked. The application uses xml and for this
he has used jars from the Web Services 2.0 pack. We are developing in
Eclipse and he just uses the "add external jars" option for this. We
then use a NSIS script to create the exe.
The problem arises when we take the generated EXE and run it on
another computer.The file loads but when we try to carry out a
function that requires any of those Jars from the web services package
the application doesn't work,error messages say that you cant find the
Class specified.
Also when we create a jar for the project and try to execute that the
same problem emerges.
I have downloaded a few free exe makers via source forge and once
again the same problem emerges.
Also some redesigning needs to be done on the gui so i want to move
the app to Netbeans so if someone could tell me how to this in either
Netbeans or eclipse that would be great.
Cheers
- 2
- no vfw://0 in JMF CaptureDeviceManager getDeviceList ?Windows XP pro on an intel PIII IBM thinkpad
Java SDK 1.4.2_05-b04
JMF 2.1.1e
My usb webcam works perfectly with JMF, I used it in JMStudio however,
when I make this call
deviceListVector = CaptureDeviceManager.getDeviceList( null );
my "audio capture device" is detected however, my usb webcam at
vfw://0 is not detected. To clarify, the audio capture device and the
USB cam are entirely seperate devices.
How can I properly detect the usb webcam, and its formats, from JMF?
[ SUBLIMINAL: Please support H264 in JMF ]
- 3
- BigInteger exponenStumps wrote:
> Hi all, Have rattled my brain and cannot work out how to do a BigInteger a
> to the power of e, where both a and e are BigIntegers. Any help appreciated.
It occurs to me that this is probably a pretty pointless
exercise. To justify storing them as BigIntegers, both `a'
and `e' must have magnitudes of at least 2**63 (anything
smaller would fit in a `long'). So the result will be at
least (2**63)**(2**63), a number with slightly more than
1E21 bits. This leads to two problems:
- BigInteger is not "big enough" to represent such a
value. Since the bitCount() method returns an `int'
it follows that a BigInteger cannot contain more
than (2**31)-1 ~= 2E9 bits.
- Even if BigInteger could somehow accommodate such
a huge value, it wouldn't fit in your computer's
memory. 1E21 bits ~= 1E20 bytes ~= 1E11 gigabytes
~= (I had to look this up) 100 exabytes. You cannot
afford that much storage. Trust me on this.
Hence, if your problem has a feasible solution it must
also have a simpler solution. If `a' is large enough to
require a BigInteger, then `e' must be small enough to reside
in a `long' -- in fact, small enough for an `int'. On the
other hand if `e' is large, `a' must be one of {-1,0,1}.
Otherwise, the problem is not solvable with BigInteger.
So: What are you really tying to do?
--
email***@***.com
- 4
- java and XMLHi
I have the following bit of Java code:
//Use JTidy implementation to create an empty Document object
Document doc = tidy.createEmptyDocument();
//bodyElement is the body element in an HTML Document
Node first = bodyElement.getFirstChild();
Node top = doc.getDocumentElement();
top.appendChild(first);
which produces unexpected results. Basically, all I am trying to do is
retrieve the first child node contained in the body element and copy it to
the new document element. But what I get is the required element AND every
element after it - every one of the first elements siblings! I have tried so
many variations of the above, using DocumentFragments etc, but with no joy.
In order to preserve the little hair I have left, I would be grateful for
any help
Tony
- 5
- Window refreshingHi everybody,
I have a problem with window refreshing.
When a button in a frame is pressed, a thread "SQLThread" is started
and computes for a long time. During this processing period I want to
see all the components in the frame (combobox, buttons, textarea)
instead of the blank grey frame!
I also added Thread.yield() in the "SQLThread" class, but without
success.
What else should I try?
Thanks in advance!
- 6
- Dice Frequency SimulationHi I'm new to JAVA Programming and need help with my homework!
The assignment: Design and implement a simple, well-documented JAVA
program that uses random numbers to simulate throwing a pair of dice
and recording the total score thrown. That is, each roll will throw
two dice, each of which can randomly result in a face up value of 1,
2, 3, 4, 5, or 6. The program should add the two values to get a
score for the roll. The score will be between 2(1+1) and 12(6+6).
The program should loop to roll the dice a total of 500 times and
should sum up how many times each score was thrown. That is, how many
of the 500 times was a total of 2 thrown, how many times was a total
of 3 thrown, etc. You will need one accumulator for each of the 11
possible scores. Afer all 500 rolls have been thrown and counted, the
program should report for each possible score (2-12), how many times
it was thrown and what % of the time it was thrown. This program
will have no input. It should produce output similar to the
following:
Total Number Percent
Rolled of Times of Time
So far, I know to use the for loop with the following values: (count =
2; count <= 500; count++) but then I'm stuck. I don't know what to do
next!!
- 7
- Newbie need details for jProgressBarhi!
I would like some details in implemeting a jProgressBar while geting
data from database. It is very complicated for me to understand all this
thread stuff (i worked in Delphi before, and there you just give the
progressBar min, max and current value and it works). If someone would be so
kind to help me.
I am working in JBuilder and am a newbie. I need an example how to use
progreesBar (or monitor) in a method inside a class, and call this method
from actionPerformed of a button!?
Thanks guys.
Zvonko
- 8
- applet build I have the src and jars for jgui applet at www.javazoom.net under
applets. It's a winamp clone. there is an xml build file and the only thing
I know to do with this is use ant to compile these .java sources and jars to
make the .class files. This xml file is a little hard for me to read so does
anyone have any tips on compiling this with j2dk 1.5.0_06 on 98se without
using ant? I'd just like to use the compiler to compile the classes and run
the applet with j2re without having to go through the trouble of setting up
ant.
Bill
- 9
- Highlighter and SelectionHi,
I'm trying to use highlighter. Here is my problem:
============================================================
import javax.swing.JFrame;
import javax.swing.JTextArea;
import javax.swing.text.Highlighter;
import javax.swing.text.DefaultHighlighter.DefaultHighlightPainter;
import java.awt.Color;
public class Test {
public static void main(String[] args) {
JFrame frame = new JFrame("Text");
frame.setSize(100, 50);
JTextArea textArea = new JTextArea("This is a test");
Highlighter highlighter = textArea.getHighlighter();
textArea.setBackground(Color.lightGray);
DefaultHighlightPainter painter =
new DefaultHighlightPainter(Color.cyan);
Object o;
try {
o = highlighter.addHighlight(0, 10, painter);
} catch (Exception e) {
}
frame.getContentPane().add(textArea);
frame.setVisible(true);
}
}
=======================================
The text is highlighted ok, no problem, but when I
try to select with the mouse inside the highlighted
text, I don't see anything.
Is there a way to enforce the selection to be always
visible
Thanks
Laurent Thery
- 10
- Resizing ImageIconIf I load a jpeg into an ImageIcon, is there a way to resize the image at
runtime? I've done work in several other languages and with different
tools, but I'm new to Swing. Perhaps there's a better control, but I'm not
seeing it.
Any help appreciated.
---Michael
- 11
- Find your location with new GPS EN430A technologywww.enmac.com.hk
- Natural Voice Guidance
- High Resolution Touch Screen
- Bluetooth
- MP3 & Video Player
- Picture Viewer
- 2D/3D View
- Automatic Reroute
- Day/Night Mode
- Walking Mode
- Add unlimited waypoints
- Space to add your own music, pictures, and video
- Extensive POI database
- Map landforms such as rivers & parks displayed
- Support E-book function
- AC wall charger
- Built-in Li-Ion Battery
- Audio output: built-in 2W speaker and earphone jack
- Language: English, German, French, Spanish, Dutch, Hungarian,
Czechs, Danish, Norwegian, Swedish, Portuguese, Italian, Japanese,
Finnish, Romanian, Greek, Russian, Polish
- Accessories: Car Charger, Car Stand, USB Charging Cable, Manual,
Maps CD (Optional)
We do have good prices, for further information please visit our
website www.enmac.com.hk
- 12
- NPE in JFileChooser on Windows XPI'm baffled. I'm just running a little test program from inside
JBuilder that invokes the JFileChooser, with a filter for only XML
files, and I'm getting this exception thrown in the console. Any ideas?
java.lang.NullPointerException
at
javax.swing.plaf.basic.BasicListUI.updateLayoutState(BasicListUI.java:1155)
at
javax.swing.plaf.basic.BasicListUI.maybeUpdateLayoutState(BasicListUI.java:1098)
at javax.swing.plaf.basic.BasicListUI.getCellBounds(BasicListUI.java:736)
at javax.swing.JList.getCellBounds(JList.java:1175)
at javax.swing.JList.ensureIndexIsVisible(JList.java:955)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.ensureIndexIsVisible(WindowsFileChooserUI.java:1797)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.ensureFileIsVisible(WindowsFileChooserUI.java:1805)
at javax.swing.JFileChooser.ensureFileIsVisible(JFileChooser.java:570)
at javax.swing.JFileChooser.setSelectedFile(JFileChooser.java:451)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI$14.valueChanged(WindowsFileChooserUI.java:1216)
at javax.swing.JList.fireSelectionValueChanged(JList.java:1321)
at javax.swing.JList$ListSelectionHandler.valueChanged(JList.java:1335)
at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:187)
at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:167)
at
javax.swing.DefaultListSelectionModel.fireValueChanged(DefaultListSelectionModel.java:214)
at
javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:402)
at
javax.swing.DefaultListSelectionModel.changeSelection(DefaultListSelectionModel.java:411)
at
javax.swing.DefaultListSelectionModel.setSelectionInterval(DefaultListSelectionModel.java:435)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI.setFileSelected(WindowsFileChooserUI.java:1558)
at
com.sun.java.swing.plaf.windows.WindowsFileChooserUI$DelayedSelectionUpdater.run(WindowsFileChooserUI.java:1142)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:201)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
--
Regards,
Lori Olson [TeamB]
------------
Save yourself, and everyone else, some time and search the
newsgroups and the FAQ-O-Matic before posting your next
question.
Google Advanced Newsgroup Search
http://www.google.ca/advanced_group_search
Other Newsgroup Searches:
http://www.borland.com/newsgroups/ngsearch.html
Joi Ellis's FAQ-O-Matic:
http://www.visi.com/~gyles19/fom-serve/cache/1.html
- 13
- Exiting a class in the middleI am working on a multi-threaded server-socket application. I already
have lots of crazy loops which are needed in order to function
properly.
What I need to add is a function that once all the people logged-on
exited, the server would be ready to accept connections again.
IS THERE A COMMAND THAT WOULD BREAK THROUGH THE CLASS AND EXIT IT
ANYWHERE TO GO BACK TO THE CLASS, WHICH CALLED IT (IN MY CASE BACK TO
MAIN).
I tried Label:
continue Label;
but I really do have messy loops that won't let this work properly.
I also thought maybe "System.exit(1);" would work, but that terminates
the whole application.
Any suggestions would be very appreciated.
Little BrainC
- 14
- mvn - deploying problemHi!
I use maven to develop software and recently encounter a problem
deploying a generated project site.
I am using scp protocol (no external scp/ssh programs) for deploying
but when I invoke "mvn site:deploy"
it prompts me to accept a host's key:
> RSA key fingerprint is b4:a2:e7:8a:44:13:16:af:0a:c6:9d:c9:20:d5:32:91.
> Are you sure you want to continue connecting? (yes/no):
The problem is that although I can accept the key each time I am
deploying the project site from my local workstation, it can't be
automatically deployed by continuous integration software
(CruiseControl to be
more specific). I get this error from mvn running on the remote
machine:
> Embedded error: Cannot connect. Reason: reject HostKey: cruise.veraxsystems.pl
And my question - is there any way to force maven-site-deploy to
accept the host's key without confirmation?
The ideal solution would be adding the key to settings.xml in
<repository/> section so the deploy plugin
will not be asking for it - I wonder if this is possible.
(I have already tried to run mvn in non-interactive mode using "-b"
command line switch but this produces
the same error).
Any help appreciated.
Thanks in advance
Artur
- 15
- RMI server endingI have noticed a problem where if I run my server locally on my PC
the server seems to run forever. This is the command I use locally:
java -Djava.rmi.server.logCalls=true
-Djava.rmi.server.disableHttp=true -cp c:\radical ecomm/eCommServer
If I restart it with the command like:
java -Djava.rmi.server.logCalls=true
-Djava.rmi.server.disableHttp=true -Djava.rmi.server.hostname=x.x.x.x
-cp c:\radical ecomm/eCommServer
It runs fine, but 5 minutes after there is no activity, the server
ends without producing any errors or any messages.
If I start it with the following command:
java -Djava.rmi.server.logCalls=true -Djava.rmi.dgc.leaseValue=9000000
-Djava.rmi.server.disableHttp=true -Djava.rmi.server.hostname=x.x.x.x
-cp c:\radical ecomm/eCommServer
It runs fine also, but 2.5 hours after the last activity from my
client, it ends the same way.
I know I am misunderstanding what I'm doing, but I need help in
determining what I need to do to make this run basically forever
unless I want to stop it.
My understanding was that it is a server process and it should run
forever. I don't understand what is different between when I run it
locally and when I run it attached to the Internet.
Can anyone shed some light on this?
Thanks!
|
|
|