 |
 |
Index ‹ java-programmer
|
- Previous
- 1
- fixed port communicated for EJBI noticed from this paragraph below if i want to talk to ejb container with
the specific port
I can specify the initialport number like what the following said. However,
once client establishes
the connection to the container, server talkes back to the client using
random port number.
I want to know if there is a way to use a fixed port instead of random ones.
From EJB Faq.
The default naming service port in the app server is 3700. If the naming
service is running on a different port, you'll need to set it via
the -Dorg.omg.CORBA.ORBInitialPort property when starting the client JVM.
You can double-check the actual naming service port for a given server
instance by looking in the server instace's domain.xml for "orb-listener-1".
Alternatively, check the Applications..Configuration..ORB..IIOP Listeners
section of the admin GUI for orb-listener-1.
Assuming the server's naming service port is 9876 and the client is on the
same host as the server :
java -Dorg.omg.CORBA.ORBInitialPort=9876
-classpath
$APS_HOME/lib/appserv-rt.jar:$APS_HOME/lib/javaee.jar:/home/user1/myclasses
acme.MyClient
SK
- 1
- Problem in socket applicationHello everyone,
I have the following setup on a Linux box:
CLIENT APP --MySocket---> Xinetd -------> PROCESSOR APP
The Client and Processor applications are both written in Java.
MySocket is a class that contains a java.net.Socket and the associated
input/output streams. The Socket timeout in MySocket has been set to
100 seconds. Xinetd daemon is used to invoke the Processor app, which
comes up and does some interaction with the Client App and then exits.
Now I have made the Client multi-threaded so that the Client can start
any number of threads simultaneously (using command line args). Each
of these threads sends a request to the Processor and waits for a
response.
The Xinetd daemon has been configured to allow 200 instances of the
Processor app.
The problem I am facing is that after a certain number of threads of
the Client, I start getting "SocketTimeoutException: Read timed out"
while reading the response from the Processor app. After that, some
threads receive proper responses. After that, some threads give the
exception "Cannot connect to the Socket" (for the Processor app.).
These outputs are printed on System.out.
Is this a problem with the timeout settings ? Should I have an
infinite timeout ? Does the Java VM limit the number of simultaneous
threads started ? Do I have to change the scope of some variables in
the Processor App for such a setup to work ? Or does the OS have
something to do with it ?
Please advise me what to do as I have not programmed any application
with such requirements (simultaneous connections from over 100
clients). And also, there are simply too many parameters involved
here.
Thanks in advance.
Best regards.
- 5
- Argh! Tomcat 5.5.3I don't get it. First of all, it claims to run on a JRE. This is obviously
a fraud, it even says so when you attempt to start it: "The JAVA_HOME
variable should point to a JDK and not a JRE". I can accept that, being
new to it all and not really caring, but things are
going downhill rather fast from here. I'm installing a simple webapp
in the the the webapps folder, complete with a context.xml in the
conf folder. My servlet behaves just as expected in the browser, but the
log thinks otherwise:
java.lang.ClassNotFoundException:
org.apache.catalina.servlets.DefaultServlet
- even though I see it right there in the
server/lib/servlets-default.jar. Applying some StandardWrapper hotfix does
no good. So I fire up the manager application, thinking that maybe it
handles deployment more effectively. I try different scenarios:
1) Specify a /path and a file-URI. "OK - Installed application at context
path /test" claims the manager, but the app is not listed and upon restart
[in fact, upon restarting the computer, since interaction with the manager
apparently corrupts shutdown of the server] the log complains about a
missing xml file.
2) Specify a context.xml and a file-URI. "Invalid context path was
specified" even though it was supposed to retrieve this from the xml.
3) Specify both a /path, a context.xml and a file-URI. The application
gets installed "OK", but it doesn't display and it still doesn't work [as
I recall, it couldn't read the web.xml, which worked fine when installed
things manually]
So I switch to simple URL parameter installment mode. Again, everything is
installed "OK" but nothing displays on the application list and nothing
works. You'd think i didn't care, when after all the application worked
fine upon manual installment. But thing is, it cannot handle any javax
J2EE classes, only HttpServlet stuff, so something is obviously wrong.
Getting standard JRE DOM stuff compiled is also an appaling excercise. The
container runs on Tiger, but to use DOM features, Xerces has to be added
anyway; and to use DOM3 features, which is sort of the point with Tiger, I
have to pull Xerces from CVS and build it myself.
This may all be in a days work for you people, but Tomcat presents an
unusually high learning curve for the likes of myself. I shall presently
be investigating Suns Application Server since it's there anyway, but if
you have any feedback to the above, I'd be very happy to take any flames
and suggestions [other jdk1.5.0 containers out there?]. I run Linux if it
makes any difference, and I won't even begin to tell how tough it was
getting that to work. Thanks alot!
--
Wired Earp
Wunderbyte
- 7
- Seeking Java professionals in the Columbus, Ohio areaTHE DAYHUFF GROUP is a world-class leader in information technology and
business process services. We combine industry expertise, end-to-end
services to deliver cost-effective solutions that solve our clients'
business problems. THE DAYHUFF GROUP is looking to add ASP .Net and
JAVA/J2EE Developers to join our Columbus, OH office.
We are looking for qualified ASP .Net, JSP developers for full time
employment. 2 plus years experience is required.
Send your resume to email***@***.com
- 7
- Java Developer Roles in AustraliaOur firm, Vertical Talent, is looking for the best Java developers out
there, who are interested in jobs in Australia.
You must be an exceptional Java developer! Additional skills across
Oracle and Visual Basic will be highly desired.
You must also have, or are very close to having, the appropriate
working visas for Australia.
To register your interested, please log on to www.verticaltalent.com
- 7
- "Access has been denied" for some sitesHello -
I have contacted Symantec (Norton firewall) concerning this problem, posted
on other help sites and I have prayed to the Internet gods and I am having no
luck whatsoever with this problem.
I have never had a problem with accessing any sites. Until recently. I am
running Windows XP Home Edition SP2, IE 7. I am system administrator and
owner. One day, I attempted to enter a site that I have accessed several
times before (a horoscope page) and I received this message: "Access has been
denied. ICRA chat pics labeling level exceeded on the above site". I adjusted
my internet settings to allow sites "less than favorable" for some. It didn't
help. I eventually lowered my settings to allow all possible access and it
did not help. I checked the sites listed to be blocked and this site was not
listed. I will see this message where banner ads should be. I tried to access
(via a link) a news story on yahoo and I received the message stating "banned
regular expression URL found". I have been continually unsuccessful in
changing access settings. I allowed Symantec to remotely access my system on
two occassions concerning this and they said it looked like it "might be an
IE problem". So, please... PLEASE, any feedback is greatly appreciated as I
am nearing pulling my hair out!! This shows up randomly and is infuriating!
Thanks so much!!!
--
Maureen =)
- 8
- Facebook Proxy | MySpace ProxyFacebook Proxy | MySpace Proxy
http://www.yonghenggzs.cn/ms.htm
2006-2008 Facebook Proxy | MySpace Proxy- The #1 Facebook unblocker
and Facebook proxy server /The #1 MySpace proxy sites for accessing
MySpace at work and school
- 10
- [applet] handle wrong jreHi,
I have an applet written with java5.
Suppose someone tries to execute it with a jre4.
java console will print a system exception.
But how can I handle that exception properly and show a user friendly
dialog box telling that a jre update is needed ?
thanks !
- 10
- Hot to get dimensions of a JPanel before it's first painted?Hi,
How can I get the dimensions of a JPanel before it's first painted the
first time?
I.e, I have a Form (JDialog) which uses a BorderLayout, and has 2
JPanels on it. The first JPanel has its height computed at runtime (eg
90 pixels), and the other takes up the remainder of the Form. I call
getBounds() on the second JPanel (the last thing in the constructor) and
it returns me width,height=0,0. However if I call getBounds() in the
Forms paint method, it gives me 1024,631 (which is what I want to know
in the constructor).
So basically it seems that the dimensions of the second JPanel are not
set until the Form is rendered and painted for the first time.
I want to use getBounds because it takes into account not only the
reduced size due to my first JPanel, but also the Forms title bar,
windows taskbar (if visible), etc. (which are also dependent on the
active look & feel), so saves me lots of work.
One suggestion is to call setVisible(true) in the constructor but this
can be ugly either with a flicker or the dialog stays on the screen
(hmmm, haven't tried making it non-modal :-[ ). Calling setVisible(true)
did work, however, for JFrames.
You may ask why we need to know the JPanel size anyway if we are using
well-behaved scaleable grid- border- box- layouts, etc. Here's one example:
In one help window we want to have a table (size 3x2) and various parts
of text within this table is highlighted. Eg the start of a word is
highlighted, the end not.
This was very easy to do in html (putting it in a JLabel), which also
included the table definition as html. Cool! However if the JPanel was
300 pixels wide and the table was set to 100%, it wouldn't stretch to
the full width if there wasn't much text in it.
The only way we could make the html table use the full width of the
panel was to explicitly state the size of it (in pixels).
Hence our desire to know the true dimensions of the JPanel.
Is it possible to get the JPanel dimensions before it's first painted?
TIA
BTW, using jdk 1.4.2, Win XP SP1.
- 11
- Jar files used in runtime..Hello.
We have a big/old java enterprise application ( runing on Weblogic )
with over 100 jar
files in our dependency library and approx. 10 deliverables of our
own.
I am implementing IVY as our dependency manager. I have successfully
completed
a chart over compile-time dependencies in our ptoject with JarJar and
from that created
ivy.xml in a local ivy-rep.
Now we will try to use configurations to separate runtime dependencies
from compiletime
dependencies.
Problem:
- How do we discover runtime dependencies without clicking through
EVERY
link in the entire application?
ie Which jar files is used?
With regards Peter
- 13
- how to delete a JList elementI don't see why I'm getting "cannot find symbol" because this JList
uses a DefaultListModel, for the time being, which certainly has the
missing method:
init:
deps-jar:
Compiling 2 source files to /home/thufir/JavaProject29/build/classes
/home/thufir/bcit-comp2611-project2/src/a00720398/view/NewJFrame.java:
198: cannot find symbol
symbol : method removeElementAt(int)
location: interface javax.swing.ListModel
guestList.getModel().removeElementAt(i);
1 error
BUILD FAILED (total time: 39 seconds)
thufir@arrakis:~/bcit-comp2611-project2$
thufir@arrakis:~/bcit-comp2611-project2$ cat src/a00720398/view/
NewJFrame.java | head -n 200 | tail -n 7
private void deleteGuestActionPerformed(java.awt.event.ActionEvent
evt)//GEN-FIRST:event_deleteGuestActionPerformed
{//GEN-HEADEREND:event_deleteGuestActionPerformed
int i =guestList.getSelectedIndex();
System.out.println("delete current guest" + i);
guestList.getModel().removeElementAt(i);
//guestList.getModel(). ???
}//GEN-LAST:event_deleteGuestActionPerformed
thufir@arrakis:~/bcit-comp2611-project2$
what am I doing wrong?
thanks,
Thufir
- 16
- Computer.Its easy to earn money.. www.superslim3.blogspot.com.. www.superslim3.blogspot.com
- 16
- Where have all the wintrolls gone...anoncoward wrote:
> JTK wrote:
>
>> anoncoward wrote:
>>
>> [steaming heaps]
>>
>>>>> Oh, now it is self defense - not SELF INTEREST?
>>>>> Interesting indeed.
>>>>
>>>>
>>>>
>>>> What's interesting? self defense, self interest, self preservation -
>>>> put any one of them in there you want. The statement stands.
>>>
>>>
>>>
>>>
>>> I'm not suprised you can't see the difference between self interest
>>> and self defence, not suprised at all.
>>>
>>> Almost 10,000 Iraqi people dead - for your "self interest".
>>>
>>> Nice.
>>
>>
>> Quick Coward, do the math: how many Iraqis would be dead if the
>> non-cowardly coalition hadn't TOWed Uday and Qusay (or whatever their
>> names were, like anybody except the Cowards of the world care) and
>> forced your butt-buddy Saddam to hide in a flea-infested rat-hole for
>> months on end? How many? How many would have been buried alive in
>> the same period of time? How many children tortured to death in front
>> of their parents? How many, you filthy coward?
>
> Whoa Gary R. Van Sickle, working up quite a head there!
> So, I just want to be clear on this - America has invaded
> Iraq because of all this torturing and killing that your pet,
> that you installed, has been carrying out over his years in power.
> This is the same country that ignored one of the worst periods of
> political repression in Iraq following the uprisings in
> 1991 in the north and south. Ignore all the torture and killings
> that web.amnesty.org has been highlighting for decades.
>
> So, it wasn't anything to do with self defence, WMD, or anything
> like that - it was just that your pet had turned nasty?
>
> Can we expect you to do the same in the other parts of the world
> where repression and torture occur? Or is it only in oil rich countries?
>
Huh, I don't see the numbers anywhere in there, do I coward? Do I? Why
is that? Why are you so afraid of a few numbers? So afraid that you
won't type them out for all the world to see, even though you already
know them?
"coward" is much more than a pseudonym for you, isn't it coward?
- 16
- KeyListener kinda deaf (in simple game) - lingo.zip (0/1)Yeah, me neither, I've gone over it again and again and I've tried
lots of stuff and other things I saw on the web, to no avail...
What version of Java are you using? And what IDE, if any?
Anyway, I've attached the code in a zip-file, it's all there.
If you can find anything, I'd be very grateful!
Thanks in advance!
Tim.
On 29 Apr 2004 00:45:43 -0700, email***@***.com (Fahd Shariff)
wrote:
>I can't see what the problem is. I tried running it and it seems to
>print out the char that was typed. This means that the listener is
>working fine. So i assume "grid.invoer(c)" is not doing what u expect
>it to?
>
>PS: Code would be useful :)
>
>email***@***.com wrote in message news:<email***@***.com>...
>> Hello Fahd,
>>
>> Yes, you're absolutely right, haha, stupid mistake on my 'count...
>> changed that immediately.
>> However, it doesn't help getting the keyListener to work.
>> In the meantime I've been trying all kinds of other things, but to no
>> avail.
>> Do you happen to have any other suggestions?
>> If it helps to see all the code, I'd be happy to post it.
>>
>> Thanks!
>> Tim.
>>
>> On 27 Apr 2004 00:53:10 -0700, email***@***.com (Fahd Shariff)
>> wrote:
>>
>> >I think you havent initialised "grid".
>> >
>> >The line:
>> >char c = e.getKeyChar() ;
>> >works fine i.e. you are able to capture the key that the user has
>> >typed.
>> >
>> >But the line:
>> >grid.invoer(c);
>> >does not work because I do not think grid has been initialised. This
>> >is because in jbInit() you are declaring a completely new variable
>> >grid and hence the grid on line 12 never gets initialised (if you know
>> >what i mean).
>> >
>> >I suggest you try fixing jbInit() as follows:
>> >
>> >//Component initialization
>> > private void jbInit() throws Exception {
>> > //before: Speedveld grid = new Speelveld( 10, 20, 5, 5, 40 );
>> > grid = new Speelveld( 10, 20, 5, 5, 40 );
>> > ...
>> >
>> >Hope this works!
>> >
>> >Fahd
>> >
- 16
- Overriding interface methods on objects you don't instantiate yourselfAssume I have a class inherited from JTextComponent. I don't know what type
of Document will be used as its model, however I want to add functionnality
in the insertString() method of this Document instance.
How do I do this?
If that's not clear, I'd like to do something like this:
public class MyTextComponent extends JTextComponent {
...
protected Document createDefaultModel() {
return super.createDefaultModel() { // doesn't work, ofc
public void insertString(int offset, String str, AttributeSet a)
{
doSomething();
super.insertString(offset, str, a);
}
};
}
}
|
| Author |
Message |
Mike B

|
Posted: 2004-11-25 6:58:00 |
Top |
java-programmer, ResultSet is closed
I was testing my program and the above appeared in the output. I have
searched all classes in this particular folder and I do not even have any of
that coded. Does Java issue messages like that? Is it an error? My code ran
ok, just the message appeared.
--
Mike B
|
| |
|
| |
 |
Chris Smith

|
Posted: 2004-11-25 11:52:00 |
Top |
java-programmer >> ResultSet is closed
Mike B <email***@***.com> wrote:
> I was testing my program and the above appeared in the output. I have
> searched all classes in this particular folder and I do not even have any of
> that coded. Does Java issue messages like that? Is it an error? My code ran
> ok, just the message appeared.
It sounds like that was the message text -- e.getMessage() -- of an
exception during JDBC access. You probably print out the exception
message at some point.
--
www.designacourse.com
The Easiest Way To Train Anyone... Anywhere.
Chris Smith - Lead Software Developer/Technical Trainer
MindIQ Corporation
|
| |
|
| |
 |
Mike B

|
Posted: 2004-11-25 12:31:00 |
Top |
java-programmer >> ResultSet is closed
Chris Smith <email***@***.com> wrote:
> Mike B <email***@***.com> wrote:
>> I was testing my program and the above appeared in the output. I have
>> searched all classes in this particular folder and I do not even
>> have any of that coded. Does Java issue messages like that? Is it an
>> error? My code ran ok, just the message appeared.
>
> It sounds like that was the message text -- e.getMessage() -- of an
> exception during JDBC access. You probably print out the exception
> message at some point.
Aha! that could be it. I have some supplied classses that do ODBC access.
Perhaps one of them printed out an error message. Thanks.
--
Mike B
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Cannot run OpenJMS in SuSE 9.2I downloaded the latest OpenJMS (0.7.6.1) but when I try "./openjms.sh
start", the following exception is thrown (note the IP address
192.168.0.88, though my IP is 192.168.0.60):
OpenJMS 0.7.6.1
The OpenJMS Group. (C) 1999-2004. All rights reserved.
http://openjms.sourceforge.net
org.exolab.jms.server.ServerException: java.rmi.ConnectIOException:
Exception creating connection to: 192.168.0.88; nested exception is:
java.net.NoRouteToHostException: No route to host
at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:587)
at
sun.rmi.transport.tcp.TCPChannel.createConnection(TCPChannel.java:185)
at
sun.rmi.transport.tcp.TCPChannel.newConnection(TCPChannel.java:171)
at sun.rmi.server.UnicastRef.newCall(UnicastRef.java:306)
at sun.rmi.registry.RegistryImpl_Stub.rebind(Unknown Source)
at java.rmi.Naming.rebind(Naming.java:160)
at
org.exolab.jms.server.rmi.RmiJmsServer.init(RmiJmsServer.java:121)
at
org.exolab.jms.server.JmsServer.initConnector(JmsServer.java:367)
at
org.exolab.jms.server.JmsServer.initConnectors(JmsServer.java:321)
at org.exolab.jms.server.JmsServer.init(JmsServer.java:197)
at org.exolab.jms.server.JmsServer.main(JmsServer.java:229)
Caused by: java.net.NoRouteToHostException: No route to host
at java.net.PlainSocketImpl.socketConnect(Native Method)
at java.net.PlainSocketImpl.doConnect(PlainSocketImpl.java:333)
at
java.net.PlainSocketImpl.connectToAddress(PlainSocketImpl.java:195)
at java.net.PlainSocketImpl.connect(PlainSocketImpl.java:182)
at java.net.SocksSocketImpl.connect(SocksSocketImpl.java:364)
at java.net.Socket.connect(Socket.java:507)
at java.net.Socket.connect(Socket.java:457)
at java.net.Socket.<init>(Socket.java:365)
at java.net.Socket.<init>(Socket.java:178)
at
sun.rmi.transport.proxy.RMIDirectSocketFactory.createSocket(RMIDirectSocketFactory.java:22)
at
sun.rmi.transport.proxy.RMIMasterSocketFactory.createSocket(RMIMasterSocketFactory.java:128)
at
sun.rmi.transport.tcp.TCPEndpoint.newSocket(TCPEndpoint.java:569)
... 10 more
Any suggestions?
// Ake
- 2
- Transactions QuestionsI have been reading about transactions in java and have some questions:
*) Which is mostly used: Container-managed transactions (CMT) or
Bean-managed transactions (BMT)? I dont have Entity Bean in my application.
*) Is this statement true: Use JTA only when the transaction involves more
than 1 database else use JDBC? If yes then how would you deal with this?
It would be nice if somebody points to a detailed tutorial about
transactions.
Thanks
- 3
- I am using tomcat foe springHi
I am using tomcat apache-tomcat-6.0.10 but when i write the
following URL
http://localhost:8080/springapp/index.jsp
and I get the following error.
does any body know the solution of this problem
type Exception report
message
description The server encountered an internal error () that prevented
it from fulfilling this request.
exception
javax.servlet.ServletException: java.lang.NoClassDefFoundError: javax/
el/ELResolver
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:274)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803)
root cause
java.lang.NoClassDefFoundError: javax/el/ELResolver
java.lang.ClassLoader.defineClass1(Native Method)
java.lang.ClassLoader.defineClass(ClassLoader.java:620)
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:
124)
java.net.URLClassLoader.defineClass(URLClassLoader.java:260)
java.net.URLClassLoader.access$100(URLClassLoader.java:56)
java.net.URLClassLoader$1.run(URLClassLoader.java:195)
java.security.AccessController.doPrivileged(Native Method)
java.net.URLClassLoader.findClass(URLClassLoader.java:188)
java.lang.ClassLoader.loadClass(ClassLoader.java:306)
sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:268)
java.lang.ClassLoader.loadClass(ClassLoader.java:299)
java.lang.ClassLoader.loadClass(ClassLoader.java:251)
java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
org.apache.jasper.runtime.JspFactoryImpl.getJspApplicationContext(JspFactoryImpl.java:
201)
org.apache.jsp.index_jsp._jspInit(index_jsp.java:22)
org.apache.jasper.runtime.HttpJspBase.init(HttpJspBase.java:52)
org.apache.jasper.servlet.JspServletWrapper.getServlet(JspServletWrapper.java:
157)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:
320)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:
320)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:266)
javax.servlet.http.HttpServlet.service(HttpServlet.java:803
- 4
- Java v/s ImageMagickHi all,
I have to write a application to concatenate couple of gif images to
generate a animation. The basic problem is that the file size of final
animation is very huge.It's uncompressed.
Can some body point 2 good library which generate proper compressed,
small size gif images.
-- PRADEEP SHARMA
- 5
- 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
- 6
- 7
- File SelectorHi,
How can I open the Swing-FileSelector in a special subdir?
I tried it with the pathname as String, but the FileSelector starts
always in the default dir.
Thank you.
Greetings,
Michael Pock
- 8
- CHRIST: THE ARRIVALOn Mon, 26 Dec 2005 01:34:53 +0100, "Antoll MA" <> wrote, quoted or
indirectly quoted someone who said :
>www.antollma.org
You mean Christ the spammer.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
- 9
- creating an internalFrameI'm trying to create an instance of the JInternalFrame class, which
works fine.
I defined a JDesktopPane named desktop and I am able to add an internal
Frame to this JDesktopPane.
Inside this JInternalFrame (lets call ist Frame1) I got a button which
"should" open another JInternalFrame called Frame2 inside the same
desktop. But it doesn't work. The compiler says it doesn't recognize the
variable "desktop".
How do I get him to refer to the current instance of the JDesktopPane
I'm using? I have just one JDesktopPane as my workspace.
thx in advance,
Daniel
- 10
- 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
- 11
- append string into FileHi,
I am having a big trouble while saving information into a file. I would
like append some information into file. However, each time that I try to
do this, the information of the file is replaced by the new information.
What is wrong with my routine?
File simFile = new File("simulations.txt");
//System.out.println("simulations: "+simFile.getAbsolutePath());
try{
if(simFile == null)
throw new IOException();
BufferedWriter output = new BufferedWriter(new FileWriter(simFile));
String text = simObj.getInfo();
output.append(text);
//output.newLine();
closeFile(output);
}catch(IOException e){
System.err.println("Cannot save Simulation into file");
}
thanks very much,
Marcelo
- 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
- ResultSet and getArray()Then I have a result set named rs. I need that one column of ResultSet
rs will be in an array.
I've read about method getArray(), so i've thinked that my code will
be something like that:
================================
private void formWindowOpened(java.awt.event.WindowEvent evt)
{
ResultSet rs=mdbc.inviaQuery("select * from ... where ...");
try {
rs.next();
txtNome.setText(rs.getString("DB_COLUMN_NAME_1"));
rs.getArray("DB_COLUMN_NAME_2");
} catch {
// EXCEPTION
}
================================
Alas there's something that's go wrong and I get this error
(paziente.java552 is the line containing
rs.getArray("DB_COLUMN_NAME_2");) where's my mistake:
Exception in thread "AWT-EventQueue-0"
java.lang.UnsupportedOperationException
at
sun.jdbc.odbc.JdbcOdbcResultSet.getArray(JdbcOdbcResultSet.java:4425)
at cc.Paziente.formWindowOpened(Paziente.java:552)
at cc.Paziente.access$000(Paziente.java:15)
at cc.Paziente$1.windowOpened(Paziente.java:94)
at java.awt.Window.processWindowEvent(Window.java:1187)
at javax.swing.JFrame.processWindowEvent(JFrame.java:266)
at java.awt.Window.processEvent(Window.java:1148)
at java.awt.Component.dispatchEventImpl(Component.java:3955)
at java.awt.Container.dispatchEventImpl(Container.java:2024)
at java.awt.Window.dispatchEventImpl(Window.java:1778)
at java.awt.Component.dispatchEvent(Component.java:3803)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:463)
at
java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:
242)
at
java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:
163)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:157)
at
java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:149)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:
110)
B
- 14
- To create crossed circles in JavaHello
I need to create 3 crossed circles in Java, i like doing the circles in
the window, but i don't know to cross, they must appear in the window
like a chain.
Thanks for your collaboration.
- 15
- rmi classnotfoundexcptionI have a question when I write RMI program .
file direction as follow:
D:\project\
D:\project\build\
D:\project\build\classes\
D:\project\build\classes\report\
D:\project\build\classes\report\ReportAssist.class
D:\project\build\classes\report\ReportAssistImpl.class
D:\project\build\classes\report\ReportAssistServer.class
D:\project\build\classes\report\ReportAssistClient.class
D:\project\build\classes\report\ReportAssistImpl_Stub.class
D:\project\lib\
D:\project\lib\jdom.jar
D:\project\lib\sqljdbc.jar
D:\project\config.xml
#rmiregistry 2001
cd D:\project\
set CLASSPATH=./lib/;./build/classes/
rmiregistry 2001 --has success
#start server
cd D:\project\
java -Djava.rmi.server.codebase=file:D:\project\lib\ -classpath .
/build/classes/ report.ReportAssistServer --has success
#start client
cd D:\project\
java -Djava.rmi.server.codebase=file:D:\project\lib\ -classpath .
/build/classes/ report.ReportAssistClient
--exception
java.lang.NoClassDefFoundError: org/jdom/JDOMException
The server side has printed information when start client .
How do I set the classpath ?
--
Message posted via http://www.javakb.com
|
|
|