| Eclipse is slow -- what's the alternative? |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- [NEWBIE] Using a Java Class from a JSP PageHi all and please forgive me for this newbie question.
I should create and utilize the funcionts of a Java Class from a JSP
page contained in Tomcat.
I Should:
a) define a package containing this class and put it in the CLASSPATH
b) put the Java class in TomCat (folder WEB-INF/lib or WEB-INF/class)
c) a mix of both methods!??! (Classpath AND Tomcat)?!?
Thanks
Federico
- 1
- how to create jar fileHi,
In help we can read:
To create a JAR file from your help files, make the top level help folder
the current folder. The jar command
descends recursively through the different directories and copies all of the
files to the JAR file.
Use the following steps to create a JAR file named my_help.jar from the
hierarchy example above:
C:\> cd ...\help (where "..." is the path above the \help folder) 1.
C:...\help> jar -cvf my_help.jar * 2.
The jar -cvf command copies all the files in the \help folder and in all
folders hierarchically beneath it into
a JAR file named my_help.jar. As the command creates the JAR file, it
reports its progress with output like
My error message:
"jar is not recoginized as an internal or external command, operable program
or
batch file"
please help me
Edd
- 3
- Good web host for JSPs?Hi;
I've been thinking of buying my own domain and setting up my own site.
My dream host would be
- nix based
- Java and JSP friendly.......for me making my own stuff
- PHP, python, perl, C++ - whatever technology friendly so I will be
free to learn
- reasonably price
I am also in registering my domain anonymously. Any good services?
Any suggestions?
Thanks
- 3
- Natural logarithm method not recognisedGood day dear members of the comp.lang.java.programmer newsgroup.
I've got the following error message while trying to use the "logl()"
method (natural logarithm function) on my NetBeans IDE
symbol : method logl(double)
location: class org.me.mylib.fluidmechanics.DarcyLaw
wfr = 7.08e-3 * ko_dl * depth_dl * (pr_dl - wbp_dl) / (mu_dl *
bo_dl * ((logl(re_dl/rw_dl) - 0.75)));
1 error
Should I import any special mathematic library from NetBeans?
Many thanks.
Octavio
- 3
- extends JFileChooser ?Hi
In JFileChooser there are some JButton. I have a class called
PButton that extends JButton. I want JFileChooser use my class
"PButton" instead of JButton. HowTo?
thanks
from Peter (email***@***.com)
- 3
- Is there any basic base for a community website? (J2ee)Hi
I'm wondering if there is any basic "base" for a community website. With
things like support for user registration, login, individual homepages,
photo albums, sending messages, guestbooks, diaries and so on... And
ofcourse with optimised code (especially the code for the communicating with
the database).
I mean, I know these things have been written before, so it feels a bit
stupid to do it again, like reinventing the wheel.
What I'm looking for is a basic foundation, written in J2ee (Java/jsp), that
is easy to use as a base when making a community that should be able to
handle a large "population" (at least a few thousand simultanous users, and
holefully ten thousands or even houndred thousands at peak hours, in the
future).
Any suggestions?
/Jimi
- 3
- Sun Webcast Today & Tomorrow: Replacements for Windows Desktop w.3d Java Features
Today & tomorrow Sun Webcasts announce new
---------------- projects that include
Java and 3d Java apps in packages designed
to replace Microsoft packages with packages
based on Linux and Solaris bundleded with
Java, Open Office or Star Office, and Mozilla.
| Opening Address & Welcome
| ------------------------
| by Sun CEO Scott McNealy
|
| Sun's Software Strategy
| -- Sun EVP Jonathan Schwartz
|
| September 16 9:00 a.m. - 11:30 a.m. (PDT)
|
| ------------------------------------------
|
| Slashing Cost & Complexity from the
| Desktop to the Data Center
|
| -- Sun EVP Mark Tolliver
|
| 10:00 - 10:30 a.m. (PDT)
| LIVE Chat with Sun CEO Scott McNealy
|
| September 17 9:00 - 9:45 a.m. (PDT)
|
http://www.sun.com/bignews/
3D Desktop Demo ( java.net OpengGL bindings )
---------------
SUN DECLARES LINUX DESKTOP READY FOR PRIMETIME
|
| Java Technology a Key Feature of Mad Hatter
|-------------------------------------------
| Sun's Java technology on the desktop is also
| being enhanced for Project Mad Hatter providing
| a native GNOME look and feel for all Java
| applications.
|
| The innovative 3D desktop demo that wowed the crowd
| during the keynote was built using Java technology
| on Linux with Java for Open GL bindings which
| Sun recently open sourced at java.net.
|
| Java technology is pervasive on the desktop as it
| now runs on 550 million personal computers via
| distribution arrangements with leading PC
| manufacturers.
|
http://www.sun.com/2003-0805/feature/index.html
Java & Java3d is used for Games ...
Java Games
-------------------------------------------------
http://javagaming.org/cgi-bin/JGNetForums/YaBB.cgi
http://www.frontiernet.net/~imaging/games_with_java3d.html
http://www.frontiernet.net/~imaging/java_games.html
|
| Yahoo! Pool is a set of fun and realistic
| multiplayer online billiard games. The most popular
| games, 8-ball and 9-ball, allow players to break,
| choose shots, sink or scratch - just like
| the real thing.
|
| Players of Java technology based Yahoo! Pool games
| can enter game rooms based on skill level, and
| join in official Yahoo! Pool league tournaments.
|
http://java.com/en/explore/desktop/yahoo_pool.jsp
Human Animation with Java3d with VRML using Sun's Loader
---------------------------------------------------------
http://www.JavaGaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=3D
http://www.JavaGaming.org/cgi-bin/JGNetForums/YaBB.cgi?board=3D;action=display;num=1060641747
I've been using Linux Red Hat 7.2 and it is
better and chearper than Windows though it does
need extra features ... which Sun is now adding.
-- Paul, Java Developer & Web Animator
--------------------------------------
Imaging the Imagined: Modeling with Math & a Keyboard
- 3
- Looking for comments on Technology RiversDoes anyone have any good, bad, or neutral opinions on Technology
Rivers in VA, USA as a company to work for or with? Has anyone
here had any contact with them? I'm currently engaged in a job
search and know little about them besides what's on their wbsite.
Any input would be appreciated. Either posts or direct emails
are welcome.
Thanks.
--Joe
- 4
- RFC: Removal of arbortext-catalog and xt-catalogHi,
I would like to request comments if the arbortext-catalog and xt-catalog
[1] packages can be removed from the archives.
They have no reverse dependencies, do not occur in any build
dependencies, have only a few users [2], no active upstream and IMO
libxml-commons-resolver1.1-java offers the same functionality. However,
the package is not broken.
[1] http://packages.qa.debian.org/a/arbortext-catalog.html
[2] http://qa.debian.org/popcon.php?package=arbortext-catalog
If nobody objects, I will go for a removal request.
x-post to debian-devel, debian-sgml & debian-java
Regards, Daniel
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 6
- Requesting re-pack'ing of FrameHi all,
I've implemented my own AWT component which determines a "preferred
size" by itself. This component is added to a Frame, which is at the
center of a BorderLayout in a Frame which gets pack()ed. The frame is
also not resizable, because I must ensure this component always acutally
has its preferred size. This works fine so far.
However, during execution time this preferred size changes; is there a
*generic* way to propagate this message up to the Frame so it re-pack()s?
I do not want to use a succession of getParent() until I reach the Frame
and call pack() on it, as this component might be used in a situation
which does not allow this in the future (maybe an Applet or in an
resizable/unpacked Frame as part of a more complex layout).
Is there any way to achieve this? I.e., propagate to the Frame/layout
that the preferred size has changed and this should be considered anew?
Many thanks in advance,
Daniel
--
Got two Dear-Daniel-Instant Messages
by MSN, associate ICQ with stress --
so please use good, old E-MAIL!
- 8
- surface plotAll
I want to see if Java can do the surface plot (traditional gird plot, not
contour or color)
THanks
- 8
- Reading windows event file like event viewer from windows/system32/config/AppEvent.evthi ,any one can help ,me to solve my problem.
i m talking about reading AppEvent.evt SecEvent.evt SysEvent.evt files
which basically resides in C:\WINDOWS\system32\config folder of
windows xp.if we want to open that files and our computer is on n/w
than some services used all three files and i m not able to open that
files manually.if i want to read that files than i have two options
either read by event viewer or copy this file and to another place and
open it in vc++.
i have to read or parse that file by writing a pure java parser
without using any dll bcz that files runs under linux there is another
option to use so(shared object files working as a dll in linux) but i
don't want to depend on dll and so files.
one another way microsoft ;log parser but i m not sure that it
will run on linux or not ,simply i want to write independent java
program using only java based open source api
so plz give me a best approach to read or parse this event files when
they r locked by another applications or services.
this is the link which help u to understand windows event log format
and it has links of sample program written in vc++,c#,asp.net,c+
+,php .
http://www.whitehats.ca/main/members/Malik/malik_eventlogs/malik_eventlogs.html
i follow the php program approach but i got only source name,computer
name,description but not able to parse this things individually and i
also need date,event id,event type.
then i got another code from code project site,which has functionality
to read event logs it is using log4j to read this event files.and
display ti on swing interface but i want only a simple program which
did only reading or parsing event log files.
http://www.codeproject.com/csharp/tracetool.asp
- 10
- Graphical Modelling Framework :(Hi,
I would be working on graphical modelling framework(GMF) for my thesis.
I couldnot find any tutorials on generating editors with Graphical
Modelling Framework at eclipse.org.
Please post in your suggestions.
Regards,
Madanagopal.
- 11
- jpeg has poor quality when written back to diskHi,
I have written an app using netbeans that loads a jpeg image to a panel.
I can then do some processing on it. However if I do no
processing other than loading the file and saving it as a jpeg,
the file has very bad quality. (compressed further?)
How can I save an image file (jpeg) without losing quality?
- 11
- chaning label sizes during runtimehi all,
I have a minor problem in my application (sorry I can't post any code,
so I'vm only asking for guidance in the general case, not this
specific one).
In my application I have a number of JLabels that gets their texts
changed during runtime. Unfortunatley it seems that they sometimes
become too wide for the panel they are in. The panel has room to grow
though (it is located in a jscrollpane).
I use
label.invalidate();
after each change, and
validateTree();
on the top container after all changes.
This gives me a somewhat strange behavour though.
On first run nothing happens (i.e the label get's cut)
on second run, the panel to the left shrinks a bit and the lables
there get's cut. On the third run all looks nice.
(run means updating of the labels, not a re-run of the application)
So what is the best way to handle this?
Should I invalidate, and revalidate myself? and if so when should that
be done?
All changes to components are executed in the EDT.
regards
Daniel
|
| Author |
Message |
Chris

|
Posted: 2006-1-7 3:36:00 |
Top |
java-programmer, Eclipse is slow -- what's the alternative?
I'm starting to get tired of Eclipse -- it's slow and pauses frequently.
Does anyone know if there is a way to speed it up? (I'm already giving it
plenty of memory). Are any speed improvements in the works?
Is it worth switching to another IDE?
|
| |
|
| |
 |
IchBin

|
Posted: 2006-1-7 4:09:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
Chris wrote:
> I'm starting to get tired of Eclipse -- it's slow and pauses frequently.
>
> Does anyone know if there is a way to speed it up? (I'm already giving it
> plenty of memory). Are any speed improvements in the works?
>
> Is it worth switching to another IDE?
>
>
I do see where the newer Eclipse 3.2 load takes a little more time but
has a lot of newer options. Anyway, Make sure you have auto update off.
When it starts to slow down look at the bottom right hand conner and see
it it is building your work space. I suspect that it is. If so you can
control this by options in the preferences.
--
Thanks in Advance...
IchBin, Pocono Lake, Pa, USA
http://weconsultants.servebeer.com/JHackerAppManager
__________________________________________________________________________
'If there is one, Knowledge is the "Fountain of Youth"'
-William E. Taylor, Regular Guy (1952-)
|
| |
|
| |
 |
Roedy Green

|
Posted: 2006-1-7 7:15:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
On Fri, 6 Jan 2006 13:35:46 -0600, "Chris" <anon> wrote, quoted or
indirectly quoted someone who said :
>I'm starting to get tired of Eclipse -- it's slow and pauses frequently.
Have version 3.1?
You can AOT compile it. See http://mindprod.com/jgloss/jet.html
Do you have something else running in the background chewing up
resources? Try removing everything else.
It is a pig to get started. I tend to leave it running.
--
Canadian Mind Products, Roedy Green.
http://mindprod.com Java custom programming, consulting and coaching.
|
| |
|
| |
 |
Robert Klemme

|
Posted: 2006-1-7 23:40:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
Chris <anon> wrote:
> I'm starting to get tired of Eclipse -- it's slow and pauses
> frequently.
> Does anyone know if there is a way to speed it up? (I'm already
> giving it plenty of memory). Are any speed improvements in the works?
Did you try the concurrent GC? Works quite well here. Try JVM
option -XX:+UseParNewGC
see http://java.sun.com/docs/hotspot/gc1.4.2/
> Is it worth switching to another IDE?
IMHO not.
robert
|
| |
|
| |
 |
jarrod.roberson

|
Posted: 2006-1-11 4:49:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
faster machine maybe? what do you consider "plenty of memory", that
depends on how many files are in your project and what kind of files
those are?
|
| |
|
| |
 |
jarrod.roberson

|
Posted: 2006-1-11 4:51:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
if you are willing to spend some money, Intellij IDEA from Jetbrains is
the best Java IDE hands down.
|
| |
|
| |
 |
Daniel Dyer

|
Posted: 2006-1-11 6:22:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
On Tue, 10 Jan 2006 20:51:23 -0000, <email***@***.com> wrote:
> if you are willing to spend some money, Intellij IDEA from Jetbrains is
> the best Java IDE hands down.
>
And is currently half price for personal licences (until 15th January).
Dan.
--
Daniel Dyer
http://www.dandyer.co.uk
|
| |
|
| |
 |
jussij

|
Posted: 2006-1-11 7:49:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
The Zeus for Windows IDE has support for Java:
http://www.zeusedit.com/features.html
Note: Zeus is shareware (45 day trial).
It has features like class browsing, syntax highlighting,
smart indent, code folding, project/workspace management,
integrated version control etc etc.
Jussi Jumppanen
Author: Zeus for Windows
|
| |
|
| |
 |
Wismerhill

|
Posted: 2006-1-11 19:07:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
Chris ecrivit le 06/01/2006 20:35 :
> I'm starting to get tired of Eclipse -- it's slow and pauses frequently.
>
> Does anyone know if there is a way to speed it up? (I'm already giving it
> plenty of memory). Are any speed improvements in the works?
>
> Is it worth switching to another IDE?
I don't know your specs, but I run it on an Intel Pentium III 866hmz and
512Mo or RAM and it works fine with a project of 1000 classes.
I assume you are using the last 3.1.1 release of Eclipse.
Which JRE are you using ? I found out that the 1.6.0 pre-release works
the best, 1.4.2 is second. 1.5.0 freezes the system a lot.
Also, I use the following parameters:
-vmargs -Xverify:none -XX:+UseParallelGC -XX:PermSize=20M
-XX:MaxNewSize=32M -XX:NewSize=32M -Xms128M -Xmx256M
|
| |
|
| |
 |
Chris

|
Posted: 2006-1-12 11:35:00 |
Top |
java-programmer >> Eclipse is slow -- what's the alternative?
> Which JRE are you using ? I found out that the 1.6.0 pre-release works the
> best, 1.4.2 is second. 1.5.0 freezes the system a lot.
>
> Also, I use the following parameters:
> -vmargs -Xverify:none -XX:+UseParallelGC -XX:PermSize=20M -XX:MaxNewSize=32M
> -XX:NewSize=32M -Xms128M -Xmx256M
Bingo. I replaced my old startup parameters with yours, and now it's much
faster.
I'm using 1.4.2.
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- 2
- Mozilla Firefox bookmarks exporting.
Hi,
I use mozilla firefox and feel very comfortable with that. I have
accumulated a lot of interesting websites in my bookmarks. Now if I
want to switch to a other machine how can preserve my old set of
bookmarks?
Thank you in advance,
Shaji.
- 3
- Cariage returnHello,
I would like to know if there is a way in my Java application to know what
characters are used in the cariage return of text files on the machine the
application works. Is is 13, 10? Is it 10? is it 13? How can I find this?
Thanks for your input.
Francois
- 4
- Web Application Works on Windows, Not on Linux (Needs a file)I've been using a web application to find part numbers and info for an
antique car I've been working on for a while. I used to go to the
manufacturer's website, log in ($20 a year fee, otherwise I'd link to it),
click on the link, and the program would run just fine under Linux.
Recently I upgraded my system (from Ubuntu Edgy to Ubuntu Feisty) and now
this app will run in Firefox on Windows XP but won't run on Linux. Now I
get an error that it can't find the file hpwin32 in the java.library.path.
(The full stack trace is below.)
I searched my hard drives on the WinXP system and there's no trace of this
file, so I'm guessing it's a file on their end that isn't loading. This
worked fine when I was using Java 1.4.2 but won't work now, with Java 6
installed.
Any ideas on what I can do to make this work again? What other info would I
need to provide that might help track this problem down? (The supplier
doesn't officially support Linux, so I can't get help from them.)
Hal
--------------Stack Trace from Error Message--------------
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at com.sun.javaws.Launcher.executeApplication(Launcher.java:1205)
at com.sun.javaws.Launcher.executeMainClass(Launcher.java:1151)
at com.sun.javaws.Launcher.doLaunchApp(Launcher.java:998)
at com.sun.javaws.Launcher.run(Launcher.java:105)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.UnsatisfiedLinkError: no hpwin32 in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
at java.lang.Runtime.loadLibrary0(Runtime.java:823)
at java.lang.System.loadLibrary(System.java:1030)
at
com.hp.tis.ewo.common.win32.Hpwin32DllLoader.loadLibrary(Hpwin32DllLoader.java:63)
at com.hp.tis.ewo.common.win32.Environment.<clinit>(Environment.java:257)
at com.hp.tis.ewo.setup.ContextController.<init>(ContextController.java:54)
at
com.hp.tis.ewo.setup.cookie.CookieEngine.getWorkshopID(CookieEngine.java:181)
at
com.hp.tis.ewo.clienttools.trigger.CookieTrigger.execute(CookieTrigger.java:89)
at com.hp.tis.ewo.clienttools.trigger.TriggerLoop.run(TriggerLoop.java:82)
at
com.hp.tis.ewo.clienttools.connectivity.http.EwaHttpUrlConnection.getBaseHttpConnection(EwaHttpUrlConnection.java:312)
at
com.hp.tis.ewo.clienttools.connectivity.http.EwaHttpUrlConnection.<init>(EwaHttpUrlConnection.java:251)
at
com.hp.tis.ewo.clienttools.ServiceFactory.getConnection(ServiceFactory.java:165)
at
com.proquest.epc.view.bl.ServerConnectionBL.sendToAppServer(ServerConnectionBL.java:110)
at
com.proquest.epc.view.bl.ServerConnectionBL.sendRequest(ServerConnectionBL.java:65)
at com.proquest.epc.view.rh.LoginRequestor.execute(LoginRequestor.java:24)
at
com.proquest.epc.view.impl.MBEPCApplication.main(MBEPCApplication.java:310)
... 9 more
- 5
- splitting up huge (1 GB) xml documentsDear all,
I am facing the problem that have to handle XML documents of approx. 1
GB. Do not ask me which sane architecture allows the creation of such
files - I have no control over the creation and have to live with it.
I need to split this massive document up into smaller chunks of valid
XML:
The structure of the XML is quite easy:
<businessHeader>Bla, bla -> only about 10 tags</businessHeader>
<businessInformation>info goes here</businessInformations>
<!--the tag business information is repeated a couple of hundred
thousand times... -->
<businessInformation>info goes here</businessInformations>
<businessFoolter>about 10 tags footer</businessFooter>
My current approach is to use SAX to parse the document and write the
businessInformation into different files. Before that the header gets
inserted into each file and after that the footer.
This obviously consumes quite a lot of time since the entire file is
parsed sequentially.
Can you think about a way of how to speed this process up ? I was
thinking of jumping randomly into the <businessInformation>-section of
the file (Random Access File) and then start parsing from there on with
SAX (potentially in parallell by using threads) but I am not sure if
this works.
Any hint is appreciated.
Cheers
Torsten
- 6
- 7
- Java Applet Background ColorHi,
I am trying to set the background color of my applet to white but it
keeps coming up gray.Strangely when I open the applet on a local web
page (not live on the web), applet viewer (thru eclipse) or even live
on the web from my own home PC it appears white as expected. But from
every other machine that I access it the background is grey. Even when
i run it thru Eclips on other PCs the background is gray.I have tried
to set the background to white by calling
setBackground(Color.white)
and
setBackground(Color.WHITE)
from the init() method. In the HTML that calls the applet i also set
the <body bgcolor=#FFFF></body> and i do the same for the <HEAD>.
However from every other machine that I access my webpage/applet
except my own home PC the background still appears as gray.
Any ideas?
Thanks
WS
- 8
- Single Threaded EnvironmentHi,
I know this might not be the best place to ask this but.. umm I know
Java is a multithreaded environment. what do you call a single threaded
environment where there are no multiple threads or scheduler? Please
tell me because I can't seem to recall the term :( Is it just "single
threaded environment"? Or is the term something else? Thanks!
Rick
- 9
- [strus] tiles, menu static?Hello,
I am building a struts application with tiles. The side is built as follows:
menu,footer, head and contents.
In my tiles def I have the following entries:
<tiles-definitions>
<definition name="webladen.welcomeLayout" path="/layouts/welcomeLayout.jsp">
<put name="title" value="Welcome..." />
<put name="header" value="/view/tiles/header.jsp" />
<put name="menu" value="/view/tiles/menu.jsp" />
<put name="footer" value="/view/tiles/footer.jsp" />
<put name="content" value="/view/tiles/contentFirst.jsp" />
</definition>
<definition name="webshop.katalog" extends="webshop.welcomeLayout">
<put name="content" value="/view/katalog.jsp"/>
</definition>
</tiles-definitions>
But when I click on the catalogue button, every area on the side is loading
new, but of course I only want the content-are to be loaded.
Could anybody tell me what I do wrong?
Thank you very much for your action!
Dennis
- 10
- SCPJ Certification And Career PathHi All,
I took my "Data Structures And Advanced Programming" coursework at
Berkeley back when they taught this in Java 1.1. Since that time I
have kept active in other languages, but haven't delved deeply into
J2EE, for example. I am very interested in JSP/Servlets and the
forthcoming Java HTML Tag Library. Currently my most proficient
language is PHP, where I am applying all my oo theory but finding the
language lacks some hard edges.
In short, I want to get back into Java development work, ideally on
the web. Is getting a Sun Certified Programmer certification going to
help me in this regard? Do employers look seriously at this? Or should
I try to get my foot back into the door through more hands-on
experience? Maybe work on an open-source project for awhile? My skills
are very transferrable and I can pick up the finer points of Java
again quickly. I'm just interested in the most bang for my buck here.
Thanks for your thoughts.
Regards,
Robert
email***@***.com
http://www.peakepro.com
- 11
- problem getting the java VM to runPatrick Zesar <email***@***.com> wrote in message news:<405b0a79$0$8016$email***@***.com>...
> i just posted this problem to
> http://forum.java.sun.com/thread.jsp?forum=30&thread=504742&tstart=0&trange=15
> with a reference to this thread here.
I just ran into the same problem. Upgraded two win98se machines to XP
Pro SP1. Prior to applying any hotfixes first thing I did was to
install the 1.4.2_04 jre. I have the same jre running flawlessly on
two preinstalled Dells with xp pro sp1. Very interested in a fix,
will post here if I find it.
- 12
- Display xml file in JTree: Select information to be shown in node labelHi there,
I have managed to write a small java program that display an xml file
in a JTree. This was achieved by defining a suitable tree model. THe
program works...somehow. The nodes (elements and texts) are correctly
recognized, and the corresponding branches in the JTree can be opened
and closed. However, when I run the program, all the non-leaf nodes
(e. g. the element nodes) are displayed from the start tag to the end
tag including the tag delimiters. Is there any way to control what is
used as a "node label" in a JTree? Of course that could be done by
brute (e.g. by building the JTree from simple strings) but I believe
that this approach will destroy the tree structure of the underlying
xml file.
I have tried for some time to display xml data in a tree view, and a
java solution seemed to be the most "organic" one. So it would be
great if that program to be really made to work properly. Many thanks
for any idea how to achieve this! Piet
Here is the code:
import java.awt.*;
import java.awt.event.*;
import java.util.List;
import javax.swing.*;
import javax.swing.tree.*;
import javax.swing.event.*;
import javax.xml.parsers.*;
import org.w3c.dom.*;
public class XmlTreeDemo extends JFrame {
XmlTreeDemo(String title){
super(title);
try{
DocumentBuilderFactory IDocumentBuilderFactory
= DocumentBuilderFactory.newInstance();
DocumentBuilder IDocumentBuilder
= IDocumentBuilderFactory.newDocumentBuilder();
Document IDocument = IDocumentBuilder.parse("c:/test1.xml");
Node root = IDocument.getDocumentElement();
XmlTreeModel model = new XmlTreeModel(root);
JTree IJTree = new JTree();
IJTree.setModel(model);
getContentPane().add(new JScrollPane(IJTree),BorderLayout.CENTER);
setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
}
catch (Exception e){
System.err.println(e);
}
}
public static void main(String[] args){
XmlTreeDemo IJTreeDemo = new XmlTreeDemo("Xml tree demo");
IJTreeDemo.pack();
IJTreeDemo.show();
}
}
class XmlTreeModel implements TreeModel{
protected Node root;
public XmlTreeModel(Node root){
this.root = root;
}
public Object getRoot(){
return (Object)this.root;
}
public boolean isLeaf(Object node){
if ((((Node)node).getNodeType() == 7) || (((Node)node).getNodeType()
== 1)) return false;
return true;
}
public int getChildCount(Object parent){
return ((Node)parent).getChildNodes().getLength();
}
public Object getChild(Object parent,int index){
Node child = ((Node)parent).getChildNodes().item(index);
return (Object)child;
}
public int getIndexOfChild(Object parent, Object child){
NodeList childs = ((Node)parent).getChildNodes();
if (childs.getLength() == 0) return -1;
for (int i=0; i<childs.getLength(); i++){
if (childs.item(i) == (Node)child) return i;
}
return -1;
}
public void valueForPathChanged(TreePath path, Object newValue){
}
public void addTreeModelListener(TreeModelListener l){
}
public void removeTreeModelListener(TreeModelListener l){
}
}
- 13
- paypal wholesale lv (paypal accept)(www good-saler cn )paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
paypal wholesale lv (paypal accept)(www good-saler cn )
paypal wholesale lv women (paypal accept)(www good-saler cn )
- 14
- ThreadPoolExecutor implementation questionHi,
I have a question about Sun's implementation of
java.util.concurrent.ThreadPoolExecutor, specifically the execute(
Runnable ) method. The runState field is read before the Runnable task
is added to the workQueue (BlockingQueue), however there is no
synchronization in place. It seems that it might be possible for
another thread to invoke shutdown after runState is checked, but before
the task is added to the queue. Is it not then possible that the queue
is cleared by the shutdown process, the executor left as terminated,
only for the task to finally be added to the queue, something like:
Thread 1 | Thread 2
execute( t1 ) |
runState==RUNNING |
| shutdown
| runState=SHUTDOWN
| clear out workQueue
| return
| executor now terminated
|
workQueue.add(t1) |
return |
At this point, t1 is stuck in a queue that will never be cleared, but
no feedback to that effect was given on Thread 1.
Looking at Doug Lea's PooledExecutor at
http://gee.cs.oswego.edu/dl/classes/EDU/oswego/cs/dl/util/concurrent/PooledExecutor.java
I see that PooledExecutor.execute uses a synchronized block which would
prevent the above case from occuring.
Am I missing something?
cheers
Allen
- 15
- Creating XSD filesHello,
I am very new to XML and XSD. I am to create an application that can
generate a new XSD file from a set of tag names that the user
provides. Any guidlines will be appreciated.
Thanks.
|
|
|