 |
 |
Index ‹ java-programmer
|
- Previous
- 2
- richtext componentIsn't there a richtext component available within java sdk? I know I don't
see any in the pallette, is there a class where i can initiate one? or 3rd
party?
- 5
- HashMap with primitive int keyDear All,
I have a class like this:
class CustomerOrder {
int globalID;
...
}
I have an array of these.
I'd like to store an index of globalIDs, so I can do:
CustomerOrder o = index.get(123)
I could modify my class to be:
class CustomerOrder {
Integer globalID;
...
}
Perhaps it is my C++ background, but the idea of allocating an object for every
ID when I can just use an int bothers me.
I figure a HashMap is the right tool of choice, e.g.:
HashMap<Integer, CustomerOrder> index = new ...
Has anyone out there already written a modified hashmap class that uses int as
the key?
Thanks for any tips :)
Andrew
- 5
- 5
- message Driven bean problemhi,
i am trying to design an EJB application using session , entity and
message beans
it's a messaging board , a user can add a message , reply to a
message , and delete the message
when glasfish is running more than one application,
the board client side keeps calling the wrong jms\
// the addTopic class
package web;
import ejb.Topic;
import java.io.*;
import java.util.Date;
import javax.annotation.Resource;
import javax.jms.Connection;
import javax.jms.ConnectionFactory;
import javax.jms.JMSException;
import javax.jms.MessageProducer;
import javax.jms.ObjectMessage;
import javax.jms.Queue;
import javax.jms.Session;
import javax.servlet.*;
import javax.servlet.http.*;
public class AddTopic extends HttpServlet {
@Resource(mappedName = "jms/BoardTopicFactory")
private ConnectionFactory connectionFactorys = null;
@Resource(mappedName = "jms/BoardTopic")
private Queue queue = null;
private Connection connection = null;
private Session session = null;
@Override
protected void doGet(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
try {
try {
// creating a connection
connection = connectionFactorys.createConnection();
session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
MessageProducer messageProducer =
session.createProducer(queue);
ObjectMessage message = session.createObjectMessage();
Topic topic = new Topic();
// getting and setting all attributes required for the
topic
topic.setTopicDate(new Date());
// topic name validation , if empty , do not add it to
the database
if (request.getParameter("topicName").equals("")) {
} else {
topic.setTopicName(request.getParameter("topicName"));
message.setObject(topic);
messageProducer.send(message);
messageProducer.close();
// connection.close();
}
} finally {
if (session != null) {
session.close();
}
if (connection != null) {
connection.close();
}
}
} catch (JMSException ex) {
ex.printStackTrace();
}
getServletConfig().getServletContext().getRequestDispatcher("/
index.jsp").forward(request, response);
}
@Override
protected void doPost(HttpServletRequest request,
HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
}
/**
* Returns a short description of the servlet.
*/
@Override
public String getServletInfo() {
return "Short description";
}
// </editor-fold>
}
----------------------------------------------------------------------------------------------------
///the jms class
package ejb;
import javax.annotation.Resource;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.ejb.MessageDrivenContext;
import javax.jms.JMSException;
import javax.jms.Message;
import javax.jms.MessageListener;
import javax.jms.ObjectMessage;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
@MessageDriven(mappedName = "jms/BoardTopic", activationConfig = {
@ActivationConfigProperty(propertyName = "acknowledgeMode",
propertyValue = "Auto-acknowledge"),
@ActivationConfigProperty(propertyName = "destinationType",
propertyValue = "javax.jms.Queue")
})
public class BoardTopicBean implements MessageListener {
@PersistenceContext
private EntityManager em;
@Resource
MessageDrivenContext mdc;
public BoardTopicBean() {
}
public void onMessage(Message message) {
ObjectMessage msg = null;
try {
msg = (ObjectMessage) message;
persist(msg.getObject());
} catch (JMSException e) {
e.printStackTrace();
mdc.setRollbackOnly();
} catch (Throwable te) {
te.printStackTrace();
}
}
public void persist(Object object) {
// save the object (MessageTable or Topic)
em.persist(object);
// if the object is a MessageTable then add this newly created/
persisted object to the list of messages in the topic
if (object instanceof MessageTable) {
MessageTable msg = (MessageTable) object;
Topic topic = msg.getTopic();
if (topic == null) {
em.remove(msg);
} else {
topic = em.find(Topic.class, topic.getId());
topic.getMessages().add(msg);
em.merge(topic);
}
} else {
System.out.println("Wrong type in
merge..................");
}
}
}
----------------------------------------------------------------------------------------------------------------------
some of the exceptions thrown to the console
DirectConsumer:Caught Exception delivering
messagecom.sun.messaging.jmq.io.Packet cannot be cast to
com.sun.messaging.jms.ra.DirectPacket
MQJMSRA_DM4001: :Exception:ObjectMessage.getObject()DeSerializing
object::message=ejb.Topic
javax.jms.MessageFormatException:
MQJMSRA_DM4001: :Exception:ObjectMessage.getObject()DeSerializing
object::message=ejb.Topic
at
com.sun.messaging.jms.ra.DirectObjectPacket.getObject(DirectObjectPacket.java:
169)
at ejb.HockeyMessagesBean.onMessage(HockeyMessagesBean.java:
34)
at sun.reflect.GeneratedMethodAccessor140.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:
1067)
at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:
2895)
at
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:
3986)
at
com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:
1111)
at
com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:
74)
at
com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:
179)
at $Proxy52.onMessage(Unknown Source)
at
com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:258)
at
com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:76)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl
$WorkerThread.run(ThreadPoolImpl.java:555)
Caused by: java.lang.ClassNotFoundException: ejb.Topic
at
com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:
718)
at
com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:
631)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.messaging.jms.ra.DirectObjectPacket
$ObjectInputStreamWithContextLoader.resolveClass(DirectObjectPacket.java:
301)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:
1575)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
1732)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:
351)
at
com.sun.messaging.jms.ra.DirectObjectPacket.getObject(DirectObjectPacket.java:
155)
... 15 more
DirectConsumer:Caught Exception delivering
messagecom.sun.messaging.jmq.io.Packet cannot be cast to
com.sun.messaging.jms.ra.DirectPacket
MQJMSRA_DM4001: :Exception:ObjectMessage.getObject()DeSerializing
object::message=ejb.HockeyEntity
javax.jms.MessageFormatException:
MQJMSRA_DM4001: :Exception:ObjectMessage.getObject()DeSerializing
object::message=ejb.HockeyEntity
at
com.sun.messaging.jms.ra.DirectObjectPacket.getObject(DirectObjectPacket.java:
169)
at ejb.BoardTopicBean.onMessage(BoardTopicBean.java:33)
at sun.reflect.GeneratedMethodAccessor146.invoke(Unknown
Source)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:
25)
at java.lang.reflect.Method.invoke(Method.java:597)
at
com.sun.enterprise.security.application.EJBSecurityManager.runMethod(EJBSecurityManager.java:
1067)
at
com.sun.enterprise.security.SecurityUtil.invoke(SecurityUtil.java:176)
at
com.sun.ejb.containers.BaseContainer.invokeTargetBeanMethod(BaseContainer.java:
2895)
at
com.sun.ejb.containers.BaseContainer.intercept(BaseContainer.java:
3986)
at
com.sun.ejb.containers.MessageBeanContainer.deliverMessage(MessageBeanContainer.java:
1111)
at
com.sun.ejb.containers.MessageBeanListenerImpl.deliverMessage(MessageBeanListenerImpl.java:
74)
at
com.sun.enterprise.connectors.inflow.MessageEndpointInvocationHandler.invoke(MessageEndpointInvocationHandler.java:
179)
at $Proxy56.onMessage(Unknown Source)
at
com.sun.messaging.jms.ra.OnMessageRunner.run(OnMessageRunner.java:258)
at
com.sun.enterprise.connectors.work.OneWork.doWork(OneWork.java:76)
at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl
$WorkerThread.run(ThreadPoolImpl.java:555)
Caused by: java.lang.ClassNotFoundException: ejb.HockeyEntity
at
com.sun.enterprise.loader.EJBClassLoader.findClassData(EJBClassLoader.java:
718)
at
com.sun.enterprise.loader.EJBClassLoader.findClass(EJBClassLoader.java:
631)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:
319)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:247)
at com.sun.messaging.jms.ra.DirectObjectPacket
$ObjectInputStreamWithContextLoader.resolveClass(DirectObjectPacket.java:
301)
at
java.io.ObjectInputStream.readNonProxyDesc(ObjectInputStream.java:
1575)
at
java.io.ObjectInputStream.readClassDesc(ObjectInputStream.java:1496)
at
java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:
1732)
at
java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:
351)
at
com.sun.messaging.jms.ra.DirectObjectPacket.getObject(DirectObjectPacket.java:
155)
... 15 more
DirectConsumer:Caught Exception delivering
messagecom.sun.messaging.jmq.io.Packet cannot be cast to
com.sun.messaging.jms.ra.DirectPacket
MQJMSRA_DM4001: :Exception:ObjectMessage.getObject()DeSerializing
object::message=ejb.HockeyEntity
-----------------------
any idea guys???
- 6
- Dynamic resizing of JPanelDear experts,
I have the a JDesktopPane and a JPanel added to the CENTER and SOUTH
position of a JFrame respectively.
I would like to dynamically resize the JPanel upon mouseExited like the
Windows TaskBar.
On mouseExited of the JPanel i set the bounds of the JPanel to a new
size. However, the sizes do not reflect visually. I have called
invalidate(), validate(), repaint() and none seems to work.
Other than using JSplitPane to create a resizable JPanel, how can I make
this work?
Others have suggested using LayoutManagers but which one and how?
Thank you in advance.
- 6
- java/berkeley-db self-test hangHello!
The newly updated port of java/berkeley-db hangs during self-tests on one of
my machines:
dual FreeBSD/i386 6.1-stable - no hang
single FreeBSD/amd64 6.1-stable - no hang
dual FreeBSD/amd64 6.2-prerelease - hangs
There is little CPU use and all the process is doing, according to ktrace is
the repeated:
[...]
13089 java CALL clock_gettime(0,0x7ffffeff3d00)
13089 java RET clock_gettime 0
13089 java CALL kse_release(0x654f20)
13089 java RET kse_release 0
13089 java CALL kse_release(0x511f20)
13089 java RET kse_release 0
13089 java CALL clock_gettime(0,0x7ffffeff3d00)
13089 java RET clock_gettime 0
13089 java CALL kse_release(0x654f20)
13089 java RET kse_release 0
13089 java CALL kse_release(0x511f20)
[...]
Rebuilding Java did not help... Would any Java and/or thread expert, please,
try to build the port with self-testing enabled and analyze any hang? Thanks
a lot!
-mi
- 6
- Software Development Kit 1.5Im starting with learning Java, and a book i got about it says i need
Software Development Kit 1.4. If i download and install it, i build a
java program and i try running it with command prompt.
But, commandprompt says i need version 1.5... :( Does some1 know where
i can download this or does some1 know another program to build Java
programs with and where can i download it...
- 9
- wats the cluefrnds wen we connect with Oracle server from java,we use
getConnection(oracledriver,IPadress of
server,servername,username ,password);
forgive me if they r not in the same order.now my question is wat is
the server name if we use same system for server as well as
client.Ofcourse the IP address is loop back address.
Thanks in Advance.
Srinivas Reddy Thatiparthy.
- 9
- 9
- Load default web browserHello,
I want to load a default web browser from my swing application [using
JApplet].
Using Runtime.getRuntime.exec("RunDLL 32.exe
shell32.dll,shellExec.RunDLL"+url);[for windows]
default browser can be called.But it is working in normal class & with
frames only.
with Applet or in swing-JApplet
it is showing error as :- java.security.AccessControlException:access
denied(java.io.FilePermission<<All FILES>>)execute>.
I want a plateform independent solution which will work in swing-JApplet.
--
Message posted via JavaKB.com
http://www.javakb.com/Uwe/Forums.aspx/java-jvm/200505/1
- 12
- String comparision efficencyHI!
I have an appliation that will need to parse a text of unkown length.
I get the data as an array of strings (and thus I know then how much
data it is)
I want to do several things on each "row" (that is each element in the
array) I want to
1. look for a specific word (start) and count how many of them there
are in total.
2. Highlight the word alarm and append a short description to the end
of the line
my first thought was to use
for(int i=0;i<data.length++){
if(data[i].endsWith("start"){
// do the work..
}else if(data[i].startsWith("Alarm")){
//do different work
}
}
this seems to be rather inefficent as I get two (and possibly more, my
employer did not seem think these few features were enough..)
Is there a better way to do this.
As the alarm line also contains an alarm code, I do not know what it
looks like. Any suggestions?
regards
/daniel
- 12
- GUI locking up, but code running fine.I'm using Netbeans 5.0 beta for an IDE, with swing components. The
situation is something like this:
The program is a board game - the user chooses a building from a panel,
and then is supposed to get a message to choose what resource to pay
for it with. Here's a trace of the code:
Game (main object):
....
board[i].activate():
Game.game.setPlayer(worker);
Game.game.playerMessage("Choose a wooden building
from the building panel.");
Game.game.waitForBuild(type) :
built = false;
state = type + Game.BuildWood -
1;
mainPanel.buildings.getBP().setSelectedIndex(type-1);
while(!built)
{ Thread.yield(); }
No problems yet. This works fine, unless a building that needs to call
chooseResource is selected.
So, the user clicks one of these buildings, which activates the
following code, which is where the freeze occurs:
String r = Game.game.chooseResource():
state = Game.chooseResource;
resource = "";
while(resource.length()==0)
Thread.yield();
return resource;
Now chooseResource does work in any other context - resource gets set
by a mouseClicked event handler in a panel out there. But at this
point, the GUI stops responding. The playerMessage never gets printed,
and the click event never gets triggered. I did some investigating,
printing out numbers inside the two inmost loops, and the
chooseResource loop is continually running. I know the code's ugly,
but even so, the cause of this behavior is beyond me. Any suggestions
would be greatly appreciated!
- 12
- JPEG manipulationHi all,
I was just wondering if there is a way of changing a JPEG image in
Java, what i mean is, can i edit a JPEG (manipulate pixels in the
image) ?
Thanks in advance
- 13
- How to get the path of remotly run application by knowing the port numberHi,
I am new to this group, and i request you all to help in solving the
issues i have.
Thank you for having this group.
I need to know the path or install directory of an application,
I am able to access the the application by port number.
but i need to wright a java programe thr which i need to get the path
or install directory of the application.
Eg
http://servername:2000/
I request you all to help in the same.
- 16
- help:hibernateit drive me crazy!
where is the error?
when i use hibernate to connect to the mySQL,some error happens,just
like:
net.sf.hibernate.PropertyNotFoundException: no appropriate constructor
in class:
but i have defined a constructor without parameters!
it really block me,help!
|
| Author |
Message |
Twisted

|
Posted: 2006-3-3 21:24:00 |
Top |
java-programmer, Eclipse bug?
Eclipse bug? Using most recent version (as of a couple weeks ago,
anyway), if it sits idle for a day or two in the taskbar, it stops
responding -- or at least it is really sluggish if you try to use it
again, and not just for a short time, but until you quit and restart it.
|
| |
|
| |
 |
Thomas Weidenfeller

|
Posted: 2006-3-3 21:33:00 |
Top |
java-programmer >> Eclipse bug?
Twisted wrote:
> Eclipse bug? Using most recent version (as of a couple weeks ago,
> anyway), if it sits idle for a day or two in the taskbar, it stops
> responding -- or at least it is really sluggish if you try to use it
> again, and not just for a short time, but until you quit and restart it.
Report it to the eclipse people.
/Thomas
--
The comp.lang.java.gui FAQ:
ftp://ftp.cs.uu.nl/pub/NEWS.ANSWERS/computer-lang/java/gui/faq
http://www.uni-giessen.de/faq/archiv/computer-lang.java.gui.faq/
|
| |
|
| |
 |
Twisted

|
Posted: 2006-3-4 0:13:00 |
Top |
java-programmer >> Eclipse bug?
Report it where? There's no bug report/feedback thingie inside the app
itself, so I figured a place full of Java programmers was the next best
bet -- here.
|
| |
|
| |
 |
Thomas Kellerer

|
Posted: 2006-3-4 0:19:00 |
Top |
java-programmer >> Eclipse bug?
Twisted wrote on 03.03.2006 17:12:
> Report it where?
I'm not an Eclipse user, but it seems to me the link to the Bug tracker is
pretty easy to find on their homepage...
Thomas
|
| |
|
| |
 |
James Westby

|
Posted: 2006-3-4 0:42:00 |
Top |
java-programmer >> Eclipse bug?
Twisted wrote:
> Eclipse bug? Using most recent version (as of a couple weeks ago,
> anyway), if it sits idle for a day or two in the taskbar, it stops
> responding -- or at least it is really sluggish if you try to use it
> again, and not just for a short time, but until you quit and restart it.
>
It's probably getting paged out of main memory. I've found that when
I've been using it, but then launch another memory heavy process for a
while then go back to it it is sluggish until all it's pages are main
memory resident again. This may be what is happening to you.
James
|
| |
|
| |
 |
James McGill

|
Posted: 2006-3-4 1:04:00 |
Top |
java-programmer >> Eclipse bug?
On Fri, 2006-03-03 at 08:12 -0800, Twisted wrote:
> Report it where?
https://bugs.eclipse.org/bugs/
|
| |
|
| |
 |
Twisted

|
Posted: 2006-3-4 1:17:00 |
Top |
java-programmer >> Eclipse bug?
This explains Firefox being slow or even hanging for a while after
being idle for a while, but Firefox begins to run at normal speed again
after a few moments. Eclipse requires restart. Why? Java process size
has bloated up to over 100M when this has happened. Why? Leak? Heap
fragmentation? Does hotspot VM defragment as it gcs?
|
| |
|
| |
 |
Thomas Kellerer

|
Posted: 2006-3-4 1:25:00 |
Top |
java-programmer >> Eclipse bug?
James Westby wrote on 03.03.2006 17:42:
> Twisted wrote:
>> Eclipse bug? Using most recent version (as of a couple weeks ago,
>> anyway), if it sits idle for a day or two in the taskbar, it stops
>> responding -- or at least it is really sluggish if you try to use it
>> again, and not just for a short time, but until you quit and restart it.
>>
> It's probably getting paged out of main memory. I've found that when
> I've been using it, but then launch another memory heavy process for a
> while then go back to it it is sluggish until all it's pages are main
> memory resident again. This may be what is happening to you.
I thought Eclipse had fixed the problem with the paging. For JDK 1.5 there is a
(new) system property that you can set in order to prevent a minimized
application to be paged out (-Dsun.awt.keepWorkingSetOnMinimize=true)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=85072
Thomas
|
| |
|
| |
 |
Twisted

|
Posted: 2006-3-4 1:40:00 |
Top |
java-programmer >> Eclipse bug?
> -Dsun.awt.keepWorkingSetOnMinimize=true
Not much help if all you have to do is tab away, without minimizing,
the app for this to happen. :)
Anyway, I'm pretty sure it's more than that -- it bloats up and starts
to spend all the time GC'ing. Then again, so does anything else written
in Java, even if it's been idle all that time.
|
| |
|
| |
 |
James Westby

|
Posted: 2006-3-4 3:59:00 |
Top |
java-programmer >> Eclipse bug?
Thomas Kellerer wrote:
> James Westby wrote on 03.03.2006 17:42:
>
>> Twisted wrote:
>>
>>> Eclipse bug? Using most recent version (as of a couple weeks ago,
>>> anyway), if it sits idle for a day or two in the taskbar, it stops
>>> responding -- or at least it is really sluggish if you try to use it
>>> again, and not just for a short time, but until you quit and restart it.
>>>
>> It's probably getting paged out of main memory. I've found that when
>> I've been using it, but then launch another memory heavy process for a
>> while then go back to it it is sluggish until all it's pages are main
>> memory resident again. This may be what is happening to you.
>
>
> I thought Eclipse had fixed the problem with the paging. For JDK 1.5
> there is a (new) system property that you can set in order to prevent a
> minimized application to be paged out
> (-Dsun.awt.keepWorkingSetOnMinimize=true)
>
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=85072
>
> Thomas
But i want this to happen, I would rather have the slight delay when it
does, than be unable to have two processes with large memory
requirements running at the same time.
The property you mention and the bug you reference are platform specific
anyway. Maybe the are applicable to the OP, so he should look in to them.
James
|
| |
|
| |
 |
Scott Ellsworth

|
Posted: 2006-3-4 6:35:00 |
Top |
java-programmer >> Eclipse bug?
In article <email***@***.com>,
"Twisted" <email***@***.com> wrote:
> > -Dsun.awt.keepWorkingSetOnMinimize=true
>
> Not much help if all you have to do is tab away, without minimizing,
> the app for this to happen. :)
>
> Anyway, I'm pretty sure it's more than that -- it bloats up and starts
> to spend all the time GC'ing. Then again, so does anything else written
> in Java, even if it's been idle all that time.
Only if it is really poorly written. Frankly, gc overhead should be
pretty minimal under most circumstances for most programs. I do find
that programs which have never had a memory profile run on them often do
create a bunch of bloat and cruft, but one or two good profiles can
often fix that problem.
There are exceptions - you might generate a bunch of garbage during a
processing run, that needs cleanup once you finish, but these are
typically known times of high effort, and the flurry of gc at the end is
just part of that high effort process.
Scott
--
Scott Ellsworth
email***@***.com
Java and database consulting for the life sciences
|
| |
|
| |
 |
Scott Ellsworth

|
Posted: 2006-3-4 6:44:00 |
Top |
java-programmer >> Eclipse bug?
In article <email***@***.com>,
Scott Ellsworth <email***@***.com> wrote:
> In article <email***@***.com>,
> "Twisted" <email***@***.com> wrote:
>
> > Anyway, I'm pretty sure it's more than that -- it bloats up and starts
> > to spend all the time GC'ing. Then again, so does anything else written
> > in Java, even if it's been idle all that time.
>
> Only if it is really poorly written. Frankly, gc overhead should be
> pretty minimal under most circumstances for most programs.
After I hit send, I realized that this was a bit incendiary. I was
responding to 'so does anything written in Java', rather than to Eclipse
in specific.
All programs can have bugs, and for Java programs, a common one is
letting your heap grow for no reason. The presence of such a bug does
not mean that a program is really poorly written, unless it has a _lot_
of such bugs in it, or they cannot fix the problem due to architectural
reasons. Report the bug to the Eclipse folks, and we will see how they
respond.
I do think that programs should be careful not to fill heap, and if they
do, it is likely a bug. That said, the test of whether a program is
poorly written, to me, lies in how well the architecture discourages
bugs, and how easy it makes to find and fix them.
Scott
--
Scott Ellsworth
email***@***.com
Java and database consulting for the life sciences
|
| |
|
| |
 |
Twisted

|
Posted: 2006-3-4 11:50:00 |
Top |
java-programmer >> Eclipse bug?
"Memory profiling"?
|
| |
|
| |
 |
Scott Ellsworth

|
Posted: 2006-3-7 4:56:00 |
Top |
java-programmer >> Eclipse bug?
In article <email***@***.com>,
"Twisted" <email***@***.com> wrote:
> "Memory profiling"?
A memory profiling tool essentially tells you what objects you are
creating, how big they are, who is holding a reference to them, and how
long they live. Most time profilers also include a memory profiling
module that can give you this information.
Running one of these can be an education - you find out whether GC is a
big part of your execution profile, and if it is, what objects are
choking it. In general, creating objects is pretty cheap, and not worth
optimizing away, and this will be even more true for Java 6. That said,
there are usage patterns that result in huge amounts of junk lying about.
There are a lot of good tools to do a memory profile. I, personally,
prefer JProfiler by e-j technologies, but YourKit also gets a lot of
good press. Both work well with IDEA, and I believe they both work well
with Eclipse, so they would also be good tools to use to profile the
IDEs themselves.
MacOS X developers also have access to the very neat Shark and
ObjectAlloc tools. I find JProfiler superior to the general tools for
most uses, but there are times where I want to know why we are getting
hit with a strange cost - is the system swapping, or calling into the
kernel. For those cases, Shark is the bee's knees.
Scott
--
Scott Ellsworth
email***@***.com
Java and database consulting for the life sciences
|
| |
|
| |
 |
Twisted

|
Posted: 2006-3-22 17:24:00 |
Top |
java-programmer >> Eclipse bug?
What's a good choice that meets the following criteria:
* Works with Eclipse
* Easy to set up and use with Eclipse
* Win32 is a supported platform
* Free (as in beer; preferably as in speech too)
* Maximum functionality, subject to the above constraints
|
| |
|
| |
 |
Roedy Green

|
Posted: 2006-3-23 7:14:00 |
Top |
java-programmer >> Eclipse bug?
On 22 Mar 2006 01:24:07 -0800, "Twisted" <email***@***.com> wrote,
quoted or indirectly quoted someone who said :
>What's a good choice that meets the following criteria:
>* Works with Eclipse
>* Easy to set up and use with Eclipse
>* Win32 is a supported platform
>* Free (as in beer; preferably as in speech too)
>* Maximum functionality, subject to the above constraints
but what does it do? For plug-in sources, see
http://mindprod.com/jgloss/elipse.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| |
|
| |
 |
Twisted

|
Posted: 2006-3-23 19:24:00 |
Top |
java-programmer >> Eclipse bug?
> http://mindprod.com/jgloss/elipse.html
404.
|
| |
|
| |
 |
Dag Sunde

|
Posted: 2006-3-23 19:28:00 |
Top |
java-programmer >> Eclipse bug?
"Twisted" <email***@***.com> wrote in message
news:email***@***.com...
>> http://mindprod.com/jgloss/elipse.html
>
> 404.
>
Missing 'c'...
http://mindprod.com/jgloss/eclipse.html
--
Dag.
|
| |
|
| |
 |
Roedy Green

|
Posted: 2006-3-24 1:46:00 |
Top |
java-programmer >> Eclipse bug?
On 23 Mar 2006 03:24:15 -0800, "Twisted" <email***@***.com> wrote,
quoted or indirectly quoted someone who said :
>> http://mindprod.com/jgloss/elipse.html
>
>404.
http://mindprod.com/jgloss/eclipse.html
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| |
|
| |
 |
Twisted

|
Posted: 2006-7-12 6:41:00 |
Top |
java-programmer >> Eclipse bug?
Creating a new class seems to clobber the clipboard, replacing its
contents with the class stub (that is to say, the text that is
initially in the new code tab that opens).
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Bug#438188: RFP: schemaspy -- Graphical Database Schema Metadata BrowserPackage: wnpp
Severity: wishlist
* Package name : schemaspy
Version : 3.1.1
Upstream Author : John Currier <email***@***.com>
* URL : http://schemaspy.sourceforge.net/
* License : LGPL
Programming Lang: Java
Description : Graphical Database Schema Metadata Browser
SchemaSpy is a Java-based tool (requires Java 1.4 or higher) that
analyzes the metadata of a schema in a database and generates a visual
representation of it in a browser-displayable format. It lets you click
through the hierarchy of database tables via child and parent table
relationships. The browsing through relationships can occur though HTML
links and/or though the graphical representation of the relationships.
It's also designed to help resolve the obtuse errors that a database
sometimes gives related to failures due to constraints.
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 2
- JCheckBox problem Please helpHi All
My question is how to remove the border from inner rectangle of a
JCheckBox.
A JCheckBox has 2 rectangles,it is possible to remove the boder from the
outside one ,but what about the rectangle where the user clicks.(I am
referring this rectangle as inner rectangle)
Hoping a quick reply
Praveen
--
Message posted via http://www.javakb.com
- 3
- FYI: A new open source/free O/R mapping tool and server page frameworkAnnounce:
A new open-source O/R mapping tool has just been released. There
are many such programs out there...but this one is very
special because it's simple (no xml configuration ! yay) and has
been tested extensively with postgres (and a bit with mysql).
This tool has been used in production enviroments so the
generated code has most bugs squeezed out by now.
If you have a minute, you can check it out at:
http://www.mollypages.org/dbo/
There's also a server-side page type thingy (like JSP) but with
much cleaner syntax (and easy typing).
Enjoy !
- 4
- 5
- JSP listing bean propertiesIs it possible to list all Java bean properties with JSP tag?
When some java bean component is chosen than new jsp site must appear with
his properties, events...
- 6
- Need help creating a grid.Hello I am new to Java AWT/Swing and have a question.
I would like to create a 10x10 grid, where each "cell" can handle mouse
events. So if I click on cell with a coord A4 then it would change color.
I was thinking of using JButtons but I want the "cells" to look more like
Excel-like in appearance. I also found a component called JTable but I do
not think that it can handle mouse events. Any suggestions??
- 7
- How to get mozilla to download a jar file?
I can download jar files without difficulty using Internet Explorer,
but Mozilla instead "displays" them (i.e. fills the screen up with
gibberish).
Does anyone know how to configure Mozilla to download jar files
and save them to disk?
Or is this a server-side problem? (FWIW, I noticed that the server
serving the jar files in question put "text/plain" in the Content-Type
field.)
TIA,
-Irv
- 8
- Using Unicode symbolsI'm trying to use some of the "Miscellaneous Symbols" from the Unicode
character set in a program but getting absolutely nowhere. Can someone
please point me in the right direction for starters?
Thanks
Jim
- 9
- 10
- (WWW.CN-CIRCLE.COM) cheap wholesale prada Shoes,Customized Gucci Shoes,Lacoste trainers ,jordan 23 outlet shoes, and hoodies ,jeans.(WWW.CN-CIRCLE.COM) cheap wholesale prada Shoes,Customized Gucci
Shoes,Lacoste trainers ,jordan 23 outlet shoes, and hoodies ,jeans.
Nike Jordan Discount Shoes at (www.cn-circle.com)
Discount Jordan Basketball Shoes
Discount Jordan Sneakers
Discount Jordans Price Wholesale
Discount Jordan V
Discount Air Jordans
King James Discounts Jordans
nike wholesale distributors
customized nike "tennis shoes"
Cheap Jordan Sneakers
Cheap Jordans and Air Force 1s
online wholesale suppliers of air forces
(www.cn-circle.com) wholesale china
Air Jordans Wholesale Factory Direct
wholesale adidas china
wholesale nike sneakers by bulk
cheap kobe trainers
cheap trainers
(www.cn-circle.com) WHOLESALE JORDAN'S TENNIS
gucci tennis sneakers
Women Customize Air Force Ones
customized sneakers
China Wholesale Nike Sneakers Factory
cheap kobe trainers
Wholesale Custom Air Force One
Jordans Wholesale
Cheap Jordans Wholesale
Jordans Retro Wholesale
Air Jordans Wholesale Custom made Nike Dunks
Nike Shoes Wholesale China
Discount Jordans Price Wholesale
(www.cn-circle.com) Wholesale Nike Distributor
Wholesale Nike Sneaker
Wholesale Nike Air Force 1
Air Clear Force One Wholesale
Nike Air Force Wholesale
Buy Jordans Wholesale
(www.cn-circle.com) Wholesale Nike Tennis Shoes
Jordans Retro Wholesale
Cheapest Nike Web Wholesale
Wholesale Kid Jordans
Wholesale Nike Dunk
Authentic Jordans Wholesale
Nike Shoes Wholesale China
Wholesale Custom Jordans (www.cn-circle.com)
Air China Jordans Wholesale WOMENS NIKE AIR FORCES
Jordans Retro Wholesale
Air China Jordans Wholesale
Nike Air Jordan Wholesale
Wholesale Nike Distributor
Nike Golf Wholesale
Wholesale Jordans
Wholesale Nike Shox
Wholesale Basketball Shoes Nike
Air Jordans Price Wholesale
Jordans Kid Wholesale
Wholesale Air Force One And Jordans (www.cn-circle.com)
Jordans Shoes Wholesale
Wholesale Air Jordans
Air Jordans At Wholesale Price
Wholesale Nike Tennis Shoes
Nike T Shirt Wholesale
Air Force Jordans One Wholesale
Nike Shoes Wholesale Womens
Authentic Jordans Wholesale
Wholesale Air Force One And Jordans (www.cn-circle.com)
Discount Jordans Price Wholesale
Sock Wholesale Nike
Nike Wholesale Outlet
Wholesale Air Force One
China In Jordans Wholesale
Jordans Wholesale
Bulk Wholesale Air Force One
(www.cn-circle.com) Wholesale NIKE Sneakers from our Nike factory to
Nike shop & Nike
store,sale and Wholesale all of Nike stock Shoes,we have many type of
NIKE Sneakers :Nike discount Shoes,Nike cheap Shoes,Nike stock
Shoes(Nike Trainers, Nike Sneakers,Nike Running Shoes,Nike Basketball
Shoes,Nike Discount Shoes,Nike Cheap Shoes,footwear, Sports
Shoes)Nike
Shoes Wholesale sizes include:Nike men's Shoes,Nike women's
Shoes,Nike
mens Shoes,Nike womens Shoes, Nike men Shoes,Nike women Shoes,Nike
kids Shoes, Nike child Shoes.Nike discount Shoes,Nike cheap
Shoes,china Nike Shoes,Nike Shoes Wholesale,Jordan SHOES,Air Force
one
1s,Nike Shox,Nike shoe Air max wholesale price.china wholesale
sneakers Nike celebrates 25 birthday of Air Force Ones BUY SELL NIKE
SHOX JORDAN MAX TIMBERLAND AIR FORCE PRADA TN PUMA
red monkey evisu bapes bathing ape lrg clh jeans hoodies shoes
sneakers wholesale,jordans and nike from china
authentic jordans wholesale
Our webside: www.cn-circle.com and http://nikesneakertrade.photo.163.com
- 11
- BZip2-Files & JavaOk two things:
I'm trying to get the Apache BZip2 Library to work, but I always get a
NullPointerException. My code looks like this:
[CODE]
void load(String filename) throws FileNotFoundException, IOException {
FileInputStream fis = new FileInputStream(filename);
CBZip2InputStream = new CBZip2InputStream(fis);
}
[/CODE]
As soon as the creation of the CBZip2InputStream is reached, a
NullpointerException is thrown. Why?
Secondly: if the library is corrupted (e.g. doesn't work stable) is
there an alternative to it (Googleing did not help me very much)?
Snyke
- 12
- byte data typehello,
I am confused with byte data type. I want to know how following code
gives result as -12?
byte b = (byte) 0xf4;
System.out.println("b=" +(byte)b);
regards,
rahul
- 13
- pushlet applicationHi
i am now involved in a telnet application.i am using struts frame
work for the application.using some jsp i have to display the contents
retrieved when a telnet connection is established.the program is
working fine for a single command.but if i have to supply multiple
commands then the connection with the action servlet should exist
forever.how is this possible? using some pushlet framework is this
possible? if anyone has any idea pls do tell me.Thanks in advance
- 14
- Calling a C routine from .dllHi friends,
I would like call a C routine from Java program that is into a .dll
library. I don't know if this is possible and if so, how can I do it.
Thanks in advance!
Salvador Huertas.
- 15
- Dynamic page creation using swingHello,
I have created a user interface using swing which takes a file as input
from the user and has a button for submission purpose. Once the user
clicks on the submit button i want the file to be fed to a particular
server. How do i do this? Is there a way to use scripting languages
like Perl, JavaScript with swing?
Please give your suggestions.
Thanks,
nisha
|
|
|