| measuring signal strength in java |
|
 |
Index ‹ java-programmer
|
- Previous
- 2
- 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.
- 2
- Bug#388596: gcj-4.1: CharsetEncoder.canEncode() gives different results than Sun versionPackage: gcj-4.1
Version: 4.1.1-13
Severity: normal
The following test program gives different results with gcj and Sun JDK:
// A.java
import java.nio.charset.Charset;
import java.nio.charset.CharsetEncoder;
public class A {
public static void main(String[] args) throws java.io.IOException
{
CharsetEncoder enc = Charset.forName("US-ASCII").newEncoder();
System.out.println(enc.canEncode('\u00e4'));
}
}
// end
$ javac A.java
$ /usr/lib/jvm/java-1.5.0-sun/bin/java A
false
$ /usr/lib/jvm/java-gcj/bin/java A
true
The Sun version seems to return something like (c > 31 && c < 127),
which makes sense, whereas gcj always gives true.
This breaks lots of code, such as Apache JaxMe 2 version 0.51
(specifically the MarshallerTest in the test suite, which generated
invalid XML with gcj).
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (990, 'testing'), (500, 'unstable'), (500, 'stable'), (1, 'experimental')
Architecture: i386 (i686)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.17-1-686
Locale: LANG=sv_SE.UTF-8, LC_CTYPE=sv_SE.UTF-8 (charmap=UTF-8)
Versions of packages gcj-4.1 depends on:
ii gcc-4.1 4.1.1-13 The GNU C compiler
ii gcj-4.1-base 4.1.1-13 The GNU Compiler Collection (gcj b
ii gij-4.1 4.1.1-13 The GNU Java bytecode interpreter
ii java-common 0.25 Base of all Java packages
ii libc6 2.3.6.ds1-4 GNU C Library: Shared libraries
ii libc6-dev 2.3.6.ds1-4 GNU C Library: Development Librari
ii libgcc1 1:4.1.1-13 GCC support library
ii libgcj7-dev 4.1.1-13 Java development headers and stati
ii libgcj7-jar 4.1.1-13 Java runtime library for use with
ii zlib1g 1:1.2.3-13 compression library - runtime
Versions of packages gcj-4.1 recommends:
ii fastjar 1:4.1.1-13 Jar creation utility
-- no debconf information
--
To UNSUBSCRIBE, email to email***@***.com
with a subject of "unsubscribe". Trouble? Contact email***@***.com
- 3
- 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
- 5
- 7
- 7
- 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
- 9
- 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
- 9
- 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
- 10
- 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
- 11
- Java Gurus Help!Yep, shall do i use limewire but you didn't no I typed that....... ;)
cheers Steve
- 11
- 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
- 11
- 15
- 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
-------------------------------------------------------
- 15
- implement writeObject how? serializable singleton how?I have code that I want to execute only once ever, as a side-effect of
constructing an object. I have put this in a static initializer. But,
if I want to allow the object to be serialized I seem to be stuck,
since the initializer is executed during deserialization.
In the java developer's almanac:
http://www.exampledepot.com/egs/java.io/DeserSingle.html
There's an example of a serializable singleton:
public class MySingleton implements Serializable {
static MySingleton singleton = new MySingleton();
private MySingleton() {
}
// This method is called immediately after an object of this
// class is deserialized.
// This method returns the singleton instance.
protected Object readResolve() {
return singleton;
}
}
If I add code to the constructor, it executes during
deserialization, so that doesn't work for me.
Is there someway to determine within a static initializer or
constructor that this object is being constructed and not being
deserialized? If there were I could execute code only during the one
construction of the object, and not again.
I was thinking that I could implement readObject/writeObject. But, how can
I implement writeObject? How do you represent the fields?
In the oreilly RMI book there is an example of a writeObject method,
but it doesn't explain how you are supposed to represent fields of the
object. I've looked around a bit and found nothing.
- 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 |
dokaspar

|
Posted: 2003-11-27 4:07:00 |
Top |
java-programmer, measuring signal strength in java
hello
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
|
| |
|
| |
 |
kevinc

|
Posted: 2003-11-27 6:01:00 |
Top |
java-programmer >> measuring signal strength in java
You'll either have to write a JNI interface or use the java.comm
package.
Dominik Kaspar wrote:
> hello
>
> 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
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- 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.
- 2
- 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
- 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
- 4
- 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
- 5
- 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
- 6
- 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
- 7
- [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
- 8
- 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>
- 9
- 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 ?
- 10
- 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.
- 11
- 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
- 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
- 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
- 14
- 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"
- 15
- 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
|
|
|