| Using Java with Dual & Quad Processors. |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- Dual JTree interaction
Hi guys
I have 2 jTree controls on a jFrame ,
And when I try to make the second jTree to react on the first jTree clicks ,
What is the correct OOP way to do it ?
- 1
- Any available Web-based Calendar module written in JSPHi,
I wonder if there is any available Web-based Calendar module that
allows users to enter/edit event, set repeating frequency and reminder
of the event. I need something written in JSP.
Thanks in advance.
Tung Chau
- 1
- GIS application programI am developing a GIS java server and is now trying to write 2 modules
one is about the algorithm to find the shortest route for a journey
second one is the billing system used to support the billing service to
count the number of bytes transferred in each process
Do anyone have any reference and similar for my reference ..
Thousands Thanx
- 2
- HTTP Persistent connections on Apache web-serverHi,
I need to implement a solution which needs a HTTP persistent connection
from the client( any browser ) to the webserver ( Apache here )
This is how I am trying to acheive the persistent connection:
For every user logging on to the webserver, the browser sends a HTTP
request to the webserver which is being handled by a servlet on the
webserver. The servlet then creates a thread which holds the response
object and waits for some asynchronous data coming from a diff backend
sever.
As soon as some data is posted on to this thread, this thread sends
back the data to the clent on the response object that it has been
holding as a java-script object.
This thread is terminated only when the user logs out od the webserver.
Now, I have a few questions on this part:
1) I find that it is not an appropriate solution, given the fact that
the webserver needs to cater to 20-30k users at a time and creating a
thread per user on the webserver would really not solve the purpose. Am
I right ? ( The webserver would die is n't it?..)
2) Also, is there any limitation on the time that the thread can hold
the response object? like if the thread doesn't get any data posted on
to it from a diff backend sever, will the client( here IE or mozilla )
close the underlying socket connection ?
3)Any limitation on the scalability of this approach ( I want to know
to how many users will this approach solve )?
4) Now given my inner feeling that this approach won't work well, what
is the best way to implement a lonf-lived HTTP persistenet connection
from my browser to the webserver.
(Please note that the webserver need to push some asynchronous data to
the client as long as the user is logged on the webserver ..no refresh
mechanism please )
Apprecaite if reponded well!!!
Thanks in advance to ALL
"webdev50"
- 3
- Help! Constructors not workingI'm doing an assignment for a Java class. Basically, we have to build
constructors for a class, Television, whose attributes are *brand* and
*price*. I have defined the constructors and accessor and mutator
methods in Television.java, and access it via TelevisionClient.java
(code for both is posted below). Both files compile. However when I
run TelevisionClient, it runs through the code, but my constructors,
tv0, which I assign a value in the program, and tv1, which is assigned
through dialog boxes at runtime, are the same value - in other words,
even assigning a value to one, they both have the values that are
passed in through the dialog box. I appreciate any help.
******* Television.java ****************
import java.util.*;
import javax.swing.JOptionPane;
import java.io.*;
public class Television
{
public static String brand;
public static String price;
public Television(String xbrand, String xprice)
{
brand = xbrand;
price = xprice;
}
public static String getBrand()
{
return brand;
}
public static String getPrice()
{
return price;
}
public String toString()
{
String str = "";
str = "Television information:\n"
+ "The brand name is " + this.brand + "\n"
+ "The price is: $" + price;
return str;
}
public boolean equals(Television tvx)
{
if (brand.equals(tvx.brand)
&& price==(tvx.price))
return true;
else
return false;
}
}
******* end Television.java ****************
******* TelevisionClient.java ****************
import javax.swing.JOptionPane;
public class TelevisionClient
{
public static String inputMessage;
public static String outputMessage;
public static String outputMessage2;
public static String outMsg;
Television tv0, tv1;
public void workWithTV( )
{
tv0 = new Television( "RCA", "100.00");
JOptionPane.showMessageDialog( null, tv0.toString( ) );
outputMessage = "This program will list the brand and price of a
television "
+ "based on the values you enter.\n"
+ "It will then compare the values to the default: RCA - $100.00\n";
JOptionPane.showMessageDialog(null, outputMessage,"Television
Attributes",
JOptionPane.PLAIN_MESSAGE);
inputMessage = "Enter the brand of the television:\n\n";
Television.brand = JOptionPane.showInputDialog(inputMessage);
inputMessage = "Enter the price of the television:\n\n";
Television.price = JOptionPane.showInputDialog(inputMessage);
// price = Double.parseDouble(price);
Television tv1 = new Television(Television.brand, Television.price);
outputMessage = tv1.toString();
JOptionPane.showMessageDialog(null, outputMessage,"Television
Attributes",
JOptionPane.PLAIN_MESSAGE);
JOptionPane.showMessageDialog( null, tv0.toString( ) );
JOptionPane.showMessageDialog( null, tv1.toString( ) );
outMsg = "tv0: " + tv0.brand + "/" + tv0.price + "\n"
+ "tv1: " + tv1.brand + "/" + tv1.price + "\n";
JOptionPane.showMessageDialog(null, outMsg,"Television Attributes",
JOptionPane.PLAIN_MESSAGE);
if ( tv1.equals( tv0 ) )
outputMessage2 = "DOES EQUAL";
else
outputMessage2 = "DOES NOT EQUAL";
outputMessage = "The values you entered, brand: " +
Television.getBrand() + " / price: $" + Television.getPrice() + "\n"
JOptionPane.showMessageDialog( null, outputMessage );
if ( tv1 == tv0 )
outputMessage2 = "DOES EQUAL";
else
outputMessage2 = "DOES NOT EQUAL";
outputMessage = "The values you entered, brand: " +
Television.getBrand() + " / price: $" + Television.getPrice() + "\n"
JOptionPane.showMessageDialog( null, outputMessage );
}
public static void main (String[] args)
{
TelevisionClient app = new TelevisionClient( );
app.workWithTV( );
}
}
******* end TelevisionClient.java ****************
- 3
- 8
- REALLY CHEAP computer programming ebook libraries just follow any of the links below REALLY CHEAP computer programming eBook Libraries just follow any of the links below
Super Visual Basic eBook Library only ?!
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152882&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152862&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3652441341&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3578838387&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152820&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3652441295&ssPageName=ADME:B:LC:UK:1
Incredible A+ Certification eBook CD-ROM only ?!
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3578838127&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3578838127&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152561&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3652441071&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152536&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152520&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3578838040&ssPageName=ADME:B:LC:UK:1
Brilliant C/C++ eBook Library only ?!
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152433&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3578837936&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3652440934&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=3578837915&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152379&ssPageName=ADME:B:LC:UK:1
http://cgi.ebay.co.uk/ws/eBayISAPI.dll?ViewItem&item=2779152365&ssPageName=ADME:B:LC:UK:1
- 10
- Java Threads - Get running threadsHy there,
I'm building an application that creates a thread. This thread creates
other threads to perform several tasks.
My question is simple. Being this main thread created in a JSP page,
and still running after the user logs out, how can i get the current
status of the thread? I would like for the user, when he logs on the
application, to verify if the thread is active, that is, the current
status.
I can't seem to be able to get the thread once it is initialized.
Thanks in advance for any help.
Regards
Pedro Pinto
- 10
- UI Painting Problems -Upgrade from JDK1.3-JDK1.4Hi,
I have some UIs in my application. Today I was upgrading the code from
JDK1.3.1 to JDK1.4.2 WindowsXP.
Some How the UI hangs and painting does not happen properly. Does any
body have any solution
Any solutions is helpfull....
All compilation went through fine...
When I generate the JVM dump.. I get the following errpr
Full thread dump Java HotSpot(TM) Client VM (1.4.2_03-b02 mixed mode):
"DestroyJavaVM" prio=5 tid=0x000352b8 nid=0x8ac waiting on condition
[0..7fad8]
"TimerQueue" daemon prio=5 tid=0x03164d28 nid=0xe84 in Object.wait()
[76cf000..7
6cfd8c]
at java.lang.Object.wait(Native Method)
- waiting on <0x10e54ce8> (a javax.swing.TimerQueue)
at javax.swing.TimerQueue.run(TimerQueue.java:231)
- locked <0x10e54ce8> (a javax.swing.TimerQueue)
at java.lang.Thread.run(Thread.java:534)
"Java2D Disposer" daemon prio=10 tid=0x030c2f10 nid=0x99c in
Object.wait() [760f
000..760fd8c]
at java.lang.Object.wait(Native Method)
- waiting on <0x10d6d850> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <0x10d6d850> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at sun.java2d.Disposer.run(Disposer.java:100)
at java.lang.Thread.run(Thread.java:534)
"AWT-EventQueue-0" prio=7 tid=0x030bd818 nid=0x95c waiting on
condition [758e000
..758fd8c]
at sun.java2d.pipe.PixelToShapeConverter.fillRect(PixelToShapeConverter.
java:44)
at sun.java2d.pipe.ValidatePipe.fillRect(ValidatePipe.java:46)
at sun.java2d.SunGraphics2D.fillRect(SunGraphics2D.java:2066)
at com.kbs.vide.util.gui.DynamicKuberreButton.drawPixel(DynamicKuberreBu
tton.java:314)
at com.kbs.vide.util.gui.DynamicKuberreButton.paintBackground(DynamicKub
erreButton.java:140)
at com.kbs.vide.util.gui.DynamicKuberreButton.paintButton(DynamicKuberre
Button.java:250)
at com.kbs.vide.util.gui.ImageButton.paintComponent(ImageButton.java:229
)
at javax.swing.JComponent.paint(JComponent.java:808)
at javax.swing.JComponent.paintChildren(JComponent.java:647)
- locked <0x10cb9ab0> (a java.awt.Component$AWTTreeLock)
at javax.swing.JComponent.paint(JComponent.java:817)
at javax.swing.JComponent.paintWithOffscreenBuffer(JComponent.java:4787)
at javax.swing.JComponent.paintDoubleBuffered(JComponent.java:4740)
at javax.swing.JComponent._paintImmediately(JComponent.java:4685)
at javax.swing.JComponent.paintImmediately(JComponent.java:4488)
at javax.swing.RepaintManager.paintDirtyRegions(RepaintManager.java:410)
at javax.swing.SystemEventQueueUtilities$ComponentWorkRequest.run(System
EventQueueUtilities.java:117)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:178)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:454)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:141)
at java.awt.Dialog$1.run(Dialog.java:540)
at java.awt.Dialog.show(Dialog.java:561)
at java.awt.Component.show(Component.java:1133)
at java.awt.Component.setVisible(Component.java:1088)
at com.kbs.vide.util.gui.KuberreDialog.setVisible(KuberreDialog.java:283
)
at com.kbs.vide.client.gui.MainAdapter.actionPerformed(MainAdapter.java:
68)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
86)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
ctButton.java:1839)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
.java:420)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
)
at javax.swing.AbstractButton.doClick(AbstractButton.java:289)
at javax.swing.plaf.basic.BasicMenuItemUI.doClick(BasicMenuItemUI.java:1
113)
at javax.swing.plaf.basic.BasicMenuItemUI$MouseInputHandler.mouseRelease
d(BasicMenuItemUI.java:943)
at java.awt.Component.processMouseEvent(Component.java:5100)
at java.awt.Component.processEvent(Component.java:4897)
at java.awt.Container.processEvent(Container.java:1569)
at java.awt.Component.dispatchEventImpl(Component.java:3615)
at java.awt.Container.dispatchEventImpl(Container.java:1627)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
at java.awt.Container.dispatchEventImpl(Container.java:1613)
at java.awt.Window.dispatchEventImpl(Window.java:1606)
at java.awt.Component.dispatchEvent(Component.java:3477)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
read.java:201)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
ad.java:151)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
"AWT-Windows" daemon prio=7 tid=0x030ae538 nid=0x870 runnable
[754f000..754fd8c]
at sun.awt.windows.WToolkit.eventLoop(Native Method)
at sun.awt.windows.WToolkit.run(WToolkit.java:262)
at java.lang.Thread.run(Thread.java:534)
"AWT-Shutdown" prio=5 tid=0x0309a950 nid=0xb44 in Object.wait()
[750f000..750fd8
c]
at java.lang.Object.wait(Native Method)
- waiting on <0x10cc1dc0> (a java.lang.Object)
at java.lang.Object.wait(Object.java:429)
at sun.awt.AWTAutoShutdown.run(AWTAutoShutdown.java:259)
- locked <0x10cc1dc0> (a java.lang.Object)
at java.lang.Thread.run(Thread.java:534)
"Signal Dispatcher" daemon prio=10 tid=0x009c29f8 nid=0x314 waiting on
condition
[0..0]
"Finalizer" daemon prio=9 tid=0x009c0130 nid=0x7bc in Object.wait()
[2baf000..2b
afd8c]
at java.lang.Object.wait(Native Method)
- waiting on <0x10cb8cc0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:111)
- locked <0x10cb8cc0> (a java.lang.ref.ReferenceQueue$Lock)
at java.lang.ref.ReferenceQueue.remove(ReferenceQueue.java:127)
at java.lang.ref.Finalizer$FinalizerThread.run(Finalizer.java:159)
"Reference Handler" daemon prio=10 tid=0x009bed00 nid=0x284 in
Object.wait() [2b
6f000..2b6fd8c]
at java.lang.Object.wait(Native Method)
- waiting on <0x10cb8d28> (a java.lang.ref.Reference$Lock)
at java.lang.Object.wait(Object.java:429)
at java.lang.ref.Reference$ReferenceHandler.run(Reference.java:115)
- locked <0x10cb8d28> (a java.lang.ref.Reference$Lock)
"VM Thread" prio=5 tid=0x009fb640 nid=0xf4 runnable
"VM Periodic Task Thread" prio=10 tid=0x0003f9a8 nid=0x4a8 waiting on
condition
"Suspend Checker Thread" prio=10 tid=0x009c2470 nid=0x2d0 runnable
Thanks
SubbaRao
- 11
- Re:Clearlooks is unsupported??Hi,
I am using RePast simulation package with Java 1.5 on Fedora Core 4.
When I run the model (see below), I get the following message. The
program works, but it generates pretty ugly interface.
Could anyone please let me know how to solve this problem??
Thank you.
-----------------------------------------------------------------
[jonghook@localhost GayModel]$ java -cp .:${REPASTJ}/repast.jar
GayModel
/usr/share/themes/Clearlooks/gtk-2.0/gtkrc:49: Engine "clearlooks" is
unsupported, ignoring
-------------------------------------------------------
- 12
- [Struts] Init formbean value before Initialisation?Daniel Cloutier wrote:
> i've got 2 actions, 2 forms and 2 jsps... on jsp1 i receive userinput
> (e.g. the username) and i want to show it in the form on the next jsp
> (in a text-component). how can i accomplish this without scriptlets?
> can i access the second formbean in the action of the first jsp?
Please post some of your code. It's easier to talk about this using real
names of Action classes and Forms.
I'm guessing Action1 fortwards to JSP1 which has the username field (a
login form?) When you submit that, it goes back to Action1, which sees
that the value is present and forwards where?
--
Wendy in Chandler, AZ
"BTW, Lucifer just called and he needs a pair of ice skates :-)"
James Turner on struts-dev, voting to release Struts 1.1 Final
- 12
- measuring signal strength in javahello
i am writing a java program for locating a wireless device within an
office environment. i want to use the signal strengths of the
surrounding base stations (access points) to estimate the current
location of the device.
does anybody have an idea how to get the strength of a signal sent by
a base station in java?
thank you,
dominik
- 13
- Program can't count argumentsHi,
I have written a .java file with below source code.
public class getargs {
public static void main (String [] args) {
System.out.println(args.length);
}
}
Compilation succeeded. But when I ran the program with below
parameters:
java getargs abc
or
java getargs "abc"
the program returned 0 in both cases. If I don't intertpret wrongly,
args.length should contain the count of program arguments. Why would I
get the result as I ran this program ?
I run java SDK 1.4.1.
- 14
- escape meta for Pattern?On
http://java.sun.com/j2se/1.4.2/docs/api/java/util/regex/Pattern.html
it says:
> The string literal "\(hello\)" is illegal and leads to a compile-time error; in order to match the string (hello) the string literal "\\(hello\\)" must be used.
Now, if I read my input strings from a file I have to convert my
strings in order to match them against a pattern. How do I do that?
Is there a predefined method to do it? Like quotemeta in perl?
Thanks!
Markus
- 15
- jdk1.4.2p5 build error
--=-QXgBEaZzAqtsE+sUalvG
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Hi,
I am having a problem building jdk1.4.2p5. I already have jdk-1.3.1p7_2
installed from my installation of OpenOffice1.03
Do I have to first remove jdk1.3.1 before I install jdk1.4.2 ?
I am in the process of upgrading OO1.03 to 1.1, attached is my error
message.
Any help would be appreciated.
Thanks,
Nelis
--=-QXgBEaZzAqtsE+sUalvG
Content-Disposition: attachment; filename=debug_jdk.txt
Content-Type: text/plain; name=debug_jdk.txt; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
# Start of jdk build
bsd i586 1.4.2-p5 build started: 03-11-12 12:22
if [ -r ./../../deploy/make/Makefile ]; then \
( cd ./../../deploy/make; gmake sanity EXTERNALSANITYCONTROL=true CONTROL_TOPDIR=/usr/ports/java/jdk14/work/control CONTROL_TOPDIR_NAME=control ALT_OUTPUTDIR=/usr/ports/java/jdk14/work/control/build/bsd-i586 ARCH_DATA_MODEL=32 MILESTONE=p5 BUILD_NUMBER=nelis_12_nov_2003_12_22 ; ); \
fi
gmake[1]: Entering directory `/usr/ports/java/jdk14/work/deploy/make'
gmake[1]: Leaving directory `/usr/ports/java/jdk14/work/deploy/make'
gmake[1]: Entering directory `/usr/ports/java/jdk14/work/j2se/make'
gmake[1]: Leaving directory `/usr/ports/java/jdk14/work/j2se/make'
Build Machine Information:
build machine =
Build Directory Structure:
CWD = /usr/ports/java/jdk14/work/control/make
TOPDIR = ./../..
CONTROL_TOPDIR = ./../../control
GENERICS_TOPDIR = ./../../generics
HOTSPOT_TOPDIR = ./../../hotspot
J2SE_TOPDIR = ./../../j2se
MOTIF_TOPDIR = ./../../motif
Hotspot Settings:
HOTSPOT_BUILD_JOBS =
Bootstrap Settings:
JAVAWS_BOOTDIR = /java/re/j2se/1.4.1/archive/fcs/binaries/bsd-i586
BOOTSTRAP J2SDK VERSION:
OUTPUTDIR = /usr/ports/java/jdk14/work/control/build/bsd-i586
Build Tool Settings:
UNIXCOMMAND_PATH = /bin/
COMPILER_PATH = /usr/bin/
DEVTOOLS_PATH = /usr/local/bin/
USRBIN_PATH = /usr/bin/
GCC32_COMPILER_PATH = /java/devtools/bsd/gcc3.2/
MOZILLA_PATH =
MOZILLA_HEADERS_PATH =
MOZILLA_LIBS_PATH =
CC_VER = 2.95.4
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
Build Directives:
PEDANTIC =
INSANE =
Build Platform Settings:
PLATFORM = bsd
ARCH = i586
LIBARCH = i386
ARCH_FAMILY = i586
ARCH_DATA_MODEL = 32
OS_VERSION = 4.9-STABLE
TRUE_PLATFORM = FreeBSD (4.x STABLE way)
FREE_SPACE = 44495664
GNU Make Settings:
MAKE = gmake
MAKE VERSION =
MAKECMDGOALS = sanity
MAKEFLAGS = w -- BUILD_NUMBER=nelis_12_nov_2003_12_22 MILESTONE=p5 ARCH_DATA_MODEL=32 ALT_OUTPUTDIR=/usr/ports/java/jdk14/work/control/build/bsd-i586 CONTROL_TOPDIR_NAME=control CONTROL_TOPDIR=/usr/ports/java/jdk14/work/control EXTERNALSANITYCONTROL=true
SHELL = /bin/sh
Target Build Versions:
JAVAWS_VERSION = 1.4.2
MILESTONE = p5
BUILD_NUMBER = nelis_12_nov_2003_12_22
Bootstrap Settings:
BOOTDIR = /java/re/j2se/1.4.1/archive/fcs/binaries/bsd-i586
BOOTSTRAP J2SDK VERSION:
OUTPUTDIR = /usr/ports/java/jdk14/work/control/build/bsd-i586
Build Tool Settings:
UNIXCOMMAND_PATH = /bin/
COMPILER_PATH = /usr/bin/
DEVTOOLS_PATH = /usr/local/bin/
USRBIN_PATH = /usr/bin/
MOTIF_DIR = /usr/X11R6
CC_VER = 2.95.4
ZIP_VER = 2.3
PATH = /sbin:/bin:/usr/sbin:/usr/bin:/usr/games:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin:/root/bin
Build Directives:
USE_ONLY_BOOTDIR_TOOLS =
USE_HOTSPOT_INTERPRETER_MODE =
PEDANTIC =
DEV_ONLY = YES
J2RE_ONLY =
NO_DOCS =
NO_IMAGES =
TOOLS_ONLY = true
INSANE =
Build Platform Settings:
PLATFORM = bsd
ARCH = i586
LIBARCH = i386
ARCH_FAMILY = i586
ARCH_DATA_MODEL = 32
OS_VERSION = 4.9-STABLE
TRUE_PLATFORM = FreeBSD (4.x STABLE way)
FREE_SPACE = 44495648
GNU Make Settings:
MAKE = gmake
MAKE VERSION =
MAKECMDGOALS = sanity
MAKEFLAGS =
SHELL = /bin/sh
Target Build Versions:
JDK_VERSION = 1.4.2
MILESTONE = p5
BUILD_NUMBER = nelis_12_nov_2003_12_22
External File/Binary Locations:
HOTSPOT_SERVER_PATH = /usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/server
HOTSPOT_CLIENT_PATH = /usr/ports/java/jdk14/work/control/build/bsd-i586/hotspot-i586/client
MOTIF_DIR = /usr/X11R6
CACERTS_FILE = ./../src/share/lib/security/cacerts
WARNING: Your build environment has the variable DEV_ONLY
defined. This will result in a development-only
build of the J2SE workspace, lacking the documentation
build and installation bundles.
ERROR: JAVAWS_BOOTDIR does not point to a valid Java 2 SDK
Check that you have access to
/java/re/j2se/1.4.1/archive/fcs/binaries/bsd-i586/bin/java
and/or check your value of ALT_JAVAWS_BOOTDIR.
ERROR: BOOTDIR does not point to a valid Java 2 SDK
Check that you have access to
/java/re/j2se/1.4.1/archive/fcs/binaries/bsd-i586/bin/java
and/or check your value of ALT_BOOTDIR.
Exiting because of the above error(s).
gmake: *** [post-sanity] Error 1
*** Error code 2
Stop in /usr/ports/java/jdk14.
enigma#
--=-QXgBEaZzAqtsE+sUalvG
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
email***@***.com mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-java
To unsubscribe, send any mail to "email***@***.com"
--=-QXgBEaZzAqtsE+sUalvG--
|
| Author |
Message |
Sanny

|
Posted: 2008-1-10 17:25:00 |
Top |
java-programmer, Using Java with Dual & Quad Processors.
I have a function which I call using for loop. I want that when My
Java program is run on Dual Core its speed increases by twice and when
it run on Quad core its speed increase 4 time.
Here is the Code I am using.
const NUMBER=1000;
Public int int_x;
Public int[] Array1= new int[NUMBER];
init (){
for (int i=0;i<NUMBER;i++){
function_abc(i);
}
}
// function_abc returns same value for a given Value of "i".
function_abc(int i){
int_x++;
...
...
...
Array1[i]=i*5+int_x;
}
So in the end we get an Array[i] with the formula values. On a single
processor it goes through all the for loop in NUMBER times.
I want on Dual Core the Performance doubles by using Threads. So
function_abc(i); is Called in multiple threads and Speed increases X
times depending on number of X Processors the System has.
How can it be done, any idea.
So for Single Core it will have no spped increase.
For Dual Core Twice Speed
For Quad Core 4 Times speed is seen.
Bye
Sanny
|
| |
|
| |
 |
Lew

|
Posted: 2008-1-10 21:49:00 |
Top |
java-programmer >> Using Java with Dual & Quad Processors.
Sanny wrote:
> I have a function which I call using for loop. I want that when My
> Java program is run on Dual Core its speed increases by twice and when
> it run on Quad core its speed increase 4 time.
Amdahl's Law precludes a full linear speed increase with more processors, but
you should be able to reach some significant fraction with careful coding.
> Here is the Code I am using.
>
> const NUMBER=1000;
> Public int int_x;
> Public int[] Array1= new int[NUMBER];
I guarantee you that you aren't using this code, at least not in Java. This
stuff will not compile.
> init (){
> for (int i=0;i<NUMBER;i++){
>
> function_abc(i);
> }
> }
>
> // function_abc returns same value for a given Value of "i".
>
> function_abc(int i){
> int_x++;
> ....
> ....
> ....
> Array1[i]=i*5+int_x;
> }
>
> So in the end we get an Array[i] with the formula values. On a single
> processor it goes through all the for loop in NUMBER times.
>
> I want on Dual Core the Performance doubles by using Threads. So
> function_abc(i); is Called in multiple threads and Speed increases X
> times depending on number of X Processors the System has.
>
> How can it be done, any idea.
I suggest that you write a full, single-core implementation and post it here
for comment. Make sure that you actually run your program, or try to. Even
if it doesn't do everything you plan, it should do something at every stage of
development. At the very least, this will give you compilable code to post to
Usenet, unlike now, or at the very, very least, compiler errors to ask about.
If you do ask about compiler errors, please post your entire short but
*complete* example with your question(s), and do literally copy and paste the
error message(s) into your post - do not paraphrase.
Any example should be an SSCCE - simple short complete compilable example (my
version of Andrew's acronym).
--
Lew
|
| |
|
| |
 |
Roedy Green

|
Posted: 2008-1-10 22:49:00 |
Top |
java-programmer >> Using Java with Dual & Quad Processors.
On Thu, 10 Jan 2008 01:24:47 -0800 (PST), Sanny
<email***@***.com> wrote, quoted or indirectly quoted someone who
said :
>
>How can it be done, any idea.
A thread has a fairly high start up cost, so there is not much gained
to great a thread just to initialize an array. Also for threads to
work well they should not be poking at the same ram or they just trip
over each other.
So want to split your app up in ways that don't overlap, e.g.
computation and painting the GUI, or doing I/O and computing,
You might do it by splitting your data in 4 parts and turning a thread
loose on each part.
Design your app so you can vary the number of threads to optimal
performance determined by experiment.
--
Roedy Green Canadian Mind Products
The Java Glossary
http://mindprod.com
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- java does not runThis is a multi-part message in MIME format.
Hi folks,
Downloaded the latest XP updates and the java stopped working(?) When I load a page with j.s. it doesn't run ie menumachine shows up in the source code but my computer does not display it.
IE.>tools>internet options>advanced and Java Console enabled and JIT compiler for virtual machine enabled
Any help would be appreciated.
Dave
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1276" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial>Hi folks,</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Downloaded the latest XP updates and the java stopped
working(?) When I load a page with j.s. it doesn't run ie menumachine shows
up in the source code but my computer does not display it. </FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>IE.>tools>internet options>advanced and Java
Console enabled and JIT compiler for virtual machine enabled</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Any help would be appreciated.</FONT></DIV>
<DIV><FONT face=Arial></FONT> </DIV>
<DIV><FONT face=Arial>Dave</FONT></DIV></BODY></HTML>
- 2
- tablet stylus as graphicI am wondering if there is a simple applet somewhere, which I could embed in
an html form, such that on a tablet pc, using the tablet's
stylus, sign in some field, that field then, rather than being converted to
text(as is typical in tablets) is then maintained as an image, then, the
form is posted to a mysql database where the image of the signature is
retained as such.
Does anyone know of such an animal, or even something remotely like this?
Thanks, Ike
- 3
- javadoc to ms word docAnyone got some tips to ease the conversion from javadoc to ms Word?
I've got the source code, I can produce html and yes ms word does understand
html, but its a laborious process with 50 files. And the html tables never
fit the width correctly.
Any tools to javadoc straight from source to ms .doc ?
TIA
--
Mike W
- 4
- Outsourcing to India and Chinayeah there was a philosopher back in the 60s by the name of
thornkinson (god i hope that's right) but he went into detail on how
society will eventually solve all its problems through efficient
technology. he supposed built a vehicle that can do like 50mpg back
then.
the light bulb is an interesting question tho. its horribly
inefficient. hasn't changed since edison created it. its used by
literally everyone. you would think someone would realize the
potential in mass producing something better..
however i don't think its physically possible to heat a home using 3
lightbulbs. besides a lightbulb mostly creates heat.
Roedy Green <email***@***.com> wrote in message news:<email***@***.com>...
> On 8 Jan 2004 09:19:43 -0800, email***@***.com (Loco
> Pollo) wrote or quoted :
>
> >it would take 7 planet earths to support
> >everyone with this wasteful lifestyle because we are on the whole
> >inefficient with our resources.
>
> The problem is we have some habits left over from our cave man days
> documented by Thorsten Veblen in the Theory Of The Leisure Class (a
> very funny book published in 1899).
> http://www.amazon.com/exec/obidos/ASIN/0140187952/canadianmindprod
>
> We like to impress each other with conspicuous consumption and
> conspicuous waste.
>
> Somehow, we must come to equate status with efficient and parsimonious
> use of resources.
>
> I was horrified to learn that the technology to build a house in
> Canada that can be heated with a single light bulb costs only a few
> thousand dollars extra, yet almost no one takes advantage of it.
>
> Yet the houses built today will NEED that technology to be practical
> after the age of oil.
>
> We are like castaways on a desert island, deciding to have a feast on
> whatever washed ashore, before we have any plan to live off the land.
- 5
- processMouseEvent()
MouseDown() and MouseUp() are deprecated; both have been replaced by
processMouseEvent()... how can this be? (two diff. methods replaced by
same method..)
http://java.sun.com/j2se/1.5.0/docs/api/java/awt/Component.html#mouseDown(java.awt.Event,%20int,%20int)
thank you..
Frances
- 6
- what is Xerces,XSLT,Crimson ?regards:
what is Xerces,XSLT,Crimson ?
How to use it? could someone good give me a hand @@.
Thank you.
May god be with you.
- 7
- 8
- Trying to put a background image in a JFrameTrying to put a background image in a JFrame
I have looked this issue up and found that extending JPanel and
specifying a paintComponent() is one possibility. I haven't tried this
yet (and a different task popped up for today).
However, I thought that using the JFrames JRootPane or JLayeredPane
could be less a hassle. Well, it's not really, but I'm curious if this
could be solved.
Get the whole NetBeans project with a compiled jar (49kB zip file) here
[1]. Please don't use the image for yourself, or my boss will kill me.
What happens is that the image (with transparent areas) is painted
infront of components instead of behind. Actually, when I first start
the application, the image is infront of one button and behind the
other. Moving the mouse over a button brings it to front, resizing the
window will put all components behind the image.
By the way, in the final project, the window will not be resizable,
although I would appreciate some hint towards catering for the image
being anchored to the lower right corner aswell.
[1] http://www.op3racional.eu/x/LayerTest.zip
--
Sabine Dinis Blochberger
Op3racional
www.op3racional.eu
- 9
- Java - Awareness of other programs installed on PCIs there way in JAVA to access information about the installed
programs on the PC. I mean somehow you could grab some information
about all items in (lets say for windows) the Start-Programs.
Thanks for ur help
- 10
- new version of Open Content Software Design web bookI have an updated version of my Software Design web
book (free!) that is primarily Java centric. This
web book is not as complete as my "Java AI" and "Introduction
to Common LISP" web books, but it is hopefully in a usable
state as-is. I am especially looking for feedback
on how to improve it (the Common LISP community was
awesome in providing great feedback for the free LISP
book - can the Java community do the same :-)
Help yourself (on the 'Free Web Books" page):
http://www.markwatson.com
-Mark
- 11
- 12
- i'm makin traxc!!!... got it in the box.
trying to use simpldateformatter but
can't find examples on the net.
... i don't understand what and where it returns its
output??? is there a variable return. the examples show no calls???
k
--
Sometimes I'm in a good mood.
Sometimes I'm in a bad mood.
When all my moods have cum to pass
i hope they bury me upside down
so the world can kiss me porcelain,
white, Irish bottom.
- 13
- reflect fieldHi all,
I want to get value of string variable in a class, and field it with
new strings like this :
EXample
public class helloWold()
{
String myString1 = "test1";
String myString2 = "test2";
String myString3 = "test3";
String myString4 = "test4";
}
public static void main(String[] args) {
Field myField[] = helloWold().class.getFields();
for (int i = 0; i < myField.length; i++)
{
System.out.println(myField[i].getName()); //get value
}
}
Actually I get the value, but i didn't know how to field it. I try the
method set but i have an error
'an not set java.lang.String field to java.lang.String'
Any ideas
Thanks.
Merci d avoir lu et de vos idees par avance
- 14
- Polymorphism in JavaHi Friends,
Don't missout on these articles on design techniques:
Polymorphism in Java:
http://javalive.com/modules/articles/article.php?id=19
The Factory Design Pattern:
http://javalive.com/modules/articles/article.php?id=18
Effective use of Interfaces and Abstract Classes:
http://javalive.com/modules/articles/article.php?id=17
Why ORM Tools are not Recommended:
http://javalive.com/modules/articles/article.php?id=16
How to Estimate Project Deadlines:
http://javalive.com/modules/articles/article.php?id=14
Regards,
Vijay
- 15
- Announce: A new open source O/R mapping toolAnnounce:
Molly DBO: A new open-source O/R mapping tool is out.
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 with postgres and mysql. This tool has been used
extensively in production enviroments so the generated code has
most bugs squeezed out by now.
You can check it out at:
http://www.mollypages.org/dbo/
|
|
|