public abstract class BS {
/** The local host default. */
public static final InetAddress LOCALHOST;
static {
InetAddress localhost = null;
try {
localhost = InetAddress.getLocalHost();
}
catch ( UnknownHostException ex ) {
System.err.println("Failed to retriev
The weird logic in which javac handles or ignores
dependencies (esp. source files more recent than
class files) never ceases to annoy me. Does anybody
have a decent solution to share that creates
dependencies from "import" and makes them work with
JDK?
b.
Is there a problem with several threads using System.out
at the same time? A JDK problem? Or a Linux JDK problem?
I read in JiaN v1 that you might have to use different
priorities for a separate read and write threads
reading from System.in and writing to System.out
concurrently.
I have e.g.
A transient (slightly off-topic) thought on the way from
C++ to Java I was wondering whether there is an attempt
to implement a free javac?
Thought: the JVM defines the bytecodes. For portability,
it is not an issue which language was used to generate
the bytecode. Now, rather then using c2
Bernd Kreimeier writes:
> JDK seems to fail me. The very same classpath
> that works to load the main Java class (import/javac)
> does not work when I call env->FindClass in the
> native code.
Mistake on my account. I ended up trying
"somepackage.SomeClass"
Steve Byrne writes:
> > Great, is this the version for glibc ?
> Nope -- libc5 -- that's what I build with. If you've got a fast network
> connection, it's still worth a download -- I think that if you've got a recent
> enough version of glibc (and libdl 2.x) that you still may be able to us
Steve Byrne writes:
> > It seems that there are two different
> > prots of jdk going on one by Steve Byrne's and the other by Sergey
> > Nikitin.
>
> [misc. valid diffs]
And both jdk-1.1.6 (sbb v2 and sn v1.2) cause my C app
to "crash when linked" under RH 5.1/glibc-2.0.7-13.
Steve make
Downloaded it with HTTP/Nerdscrap (no dialup
at home, no choice), got a gzip -d error:
incomplete distance tree
invalid compressed data -- format violated
Is this me, or is the source file corrupt? Is
there a mirror (FTP) location? I have tried 4 or so
mirrors from the blackdown list, but ha
Christopher Seawood writes:
> The jdk1.1.6 v2-test1 files are available at http://www.seawood.org/java/.
Fails just as the SN glibc port. Segfault attributed to
segfault dl-runtime.c::_dl_lookup_symbol on a
call to open( char*, int), only change in the C
application is adding "-ljava" to "-ldl"
> Bernd Kreimeier <[EMAIL PROTECTED]> writes:
> > My infamous inload test (see http://www.netaccess.ie/~bk/jdkjni/)
> Shouldn't that be http://www.netaccess.ie/~bk/jdk/ ?
Nope, that's an older revision. I separated the JDK JNI test
from the Japhar JNI one, as they ha
Juergen Kreileder writes:
> > Classpath default:
> >/../../../classes:/../../classes.zip:/../../classes.jar:
> Yes, you have to tell the VM where it can find classes.zip.
Could this please be clarified?
a) the classpath generated by the JVM is bogus, right?
If anything, it should be relat
Wayne writes:
> >
> > In both cases their biz model seems to get in the way of
> > efficiency. I am not going as far as Linus stating something
> > like "Java is Dead", but for my particular application
>
> Could you tell me where you saw this statment?
IIRC an interview, URL was posted o
It seems that javac recurses through all dependencies
for a given app.java, and creates *.class as needed.
However, it does not seem to check whether the *.java
file is more recent?
If that's the case (might be worth submitting a
JDC Bug Parade Entry), is there any way to tweak
GNU make to handl
Steve Byrne writes:
> I think it would be an amazingly cool and good thing
> to have a GTK based AWT.
... to have an AWT based GIMP written in Java. Yeah, a
decent Linux AWT implementation would allow certain
freeware products to be written in Java .. and leak
into the Win32 market.
The current FAQ quotes Karl Asha: native pthreads
with Linux are far from being available for JDK.
Is this still true? The scripts contain lines like
THREADS_TYPE=green_threads
THREADS_TYPE=native_threads
The green_threads (along with the wanker libdl for
glibc) might contribute to my persis
Is there any way to use GNU make for "depend"
purposes with JDK?
At first glance, javac seems to handle every *.java
file imported by the main source you compile. Problem
is, outside the current directory (i.e. in other
packages), more recent *.java sources seem to be
ignored if *.class files a
The ARB has set up a group working on official OpenGL
bindings proposal for Java. See www.opengl.org news
page.
There is also a announcement of a VRML browser source
written in Java, from the same coder in Graz who wrote
VRWeb and contributed a lot to Hyper-G.
http://www2.iicm.edu/vrwave
Dan Kegel writes:
> Oddly enough, the only one I've found is
> ftp://ftp.tux.org/pub/java/JDK-1.1.6/i386/glibc/v4a/
Are the source diffs to the stock JDK 1.1.6 distribution
available somewhere?
b.
RedHat 5.0, glibc-2.0.7-7,
using jdk-1.1.5-1.3-static_libc,
and gcc version 2.7.2.3.
This is a C application meant to use JNI. It does not
use any JNI (yet). It does not even include jni.h.
All it does is "-ljava -ldl".
I get a segmentation fault. I remove "-ljava", all
is fine. I can't remove
I am looking for a GPL'ed javadoc replacement. Kaffe
uses pizzadoc, the Magician documentation refers
to some polardoc. Ideally I would like a tool that
handles C++ and ANSI C headers, too. I used doc++
for a while. Any other recommendations?
b.
Wayne writes:
> the CNC. The question I have for the group is this: does Java have
> the ability to read from the RS23 port? If so can someone point
> me to the literature on this subject.
> TIA.
> Wayne
To my understanding, Java does not handle physical devices.
See Chapter 11, Native Seria
Kenneth & Susan writes:
> I'm having trouble loading the java libraries and accessing the
> JNI Interfaces using dlopen/dlsym/dlclose.
> This works fine on Solaris, but for some reason it fails on Linux.
> First I use dlopen to load libjava.so, then
> I use dlsym to get the addresses for the
I am wondering about the possibility to create
"primordial" install/setup front ends using
Java. Some possibilities would be:
a) native compiler use, no JVM needed
b) use of a JNI-glued curses library
Has anybody tried such a setup? Are there any
non-X/non-Motif GUI toolkits out there that
Juergen Kreileder writes:
> Bernd, a short note on DestroyJavaVM: 1.1 does not support unloading
> the virtual machine (the JNI spec says it does not work in '1.1.2'
> but it applies to all 1.1 JDKs, Sun only forgot to update the spec).
> The 1.2 documentation for DestroyJavaVM is more precise
Juergen Kreileder writes:
> The dlopen thing works on 1.2 without problems!
Don't want to sound like a broken record, but... ETA?
Gibt es da ein Beta zu testen? Confidential or
otherwise.
b.
> Admittedly, Sun publishes the specs (for now and on most
> components) but thats an odd concession when matching
> their specs does not give you something you can call Java.
Gimme a break. Mesa has lived and grown within similar constraints
for years and is quite well - it can be called "an imp
> The main improvements are
> - SIGPIPE bug fix
> - invocation API support
I had one problem on RedHat 5.1, had to take out
of the LD path a libzip available on the system
to allow for use of the one that comes with the
JDK, else you get linker errors:
Creating Java VM...
/opt/local/lib/libz
State: Closed, will not be fixed.
Submit Date: May 12, 1998
This entry has been closed as a duplicate of Bug Id 4097810
x@x 1998-05-13
This bug is closed. You cannot vote for it.
---
The good thing is that my a
> bernd kreimeier:
> > P.S.: it seems that the original 4097810 is gone, too.
> I just checked it a minute ago -- it's there, and
> it has quite a few votes.
Yeah, just a couple of minutes later I had to call
PostGem to get the to fix the leased line over here
(se
Aside from Source Nagivator by Cygnus? Specifically: a JVM?
It is not my preference (that would be Japhar, followed by
Steve's JDK port), but I seem to keep hitting a (linkage)
problem that endangers the entire project. Given the choice
between paying for a Win32 setup and paying for Linux softw
> JNI problems
My infamous inload test (see http://www.netaccess.ie/~bk/jdkjni/)
fails as usual, but more verbose than ever. I do not get a thread
dump this time.
>inload
loading DLL libjava.so
loaded DLL
getting DLL address of JNI_GetDefaultJavaVMInitArgs
address 1074782176 in DLL
getting DLL
I stumbled over (jdk1.1.5):
In file included from /opt/local/java/jdk/include/oobj.h:33,
from /opt/local/java/jdk/include/StubPreamble.h:34
/opt/local/java/jdk/include/typedefs.h:26:
typedefs_md.h: No such file or directory
I was under the impression that java
C app calls dlopen(somelib.so), dlsym(somefunc).
somelib.so is linked against libjava.so.
somefunc ultimately gets a JVM invoked.
App calls somefunc, failure occurs on JNI_CreateJavaVM.
Result JDK 1.1.6:
Program received signal SIGSEGV, Segmentation fault.
#0 fillInStackTrace (o=0x4086bc98, e
Steve Byrne writes:
>
> [lots of stuff]
>
> There. I feel better.
I don't. Nothing personal, Steve, but if Java were in
perfect health, no FUD would be worth public venting.
Unfortunately, Java is not, especially not on Linux.
Some months ago there was an interview with Linus
on a Sun p
I am currently tracking this as Bug#30427 with Debian.
However, it might be possible (short of a dumb mistake
on my part) that there is also a JDK problem in the DLL
loading/libc6 (libc_nonshared.a) handling hidden here.
You get half a dozen files, as
http://www.netaccess.ie/~bk/statest.tgz
Mo
Martin Little writes:
> The java-linux mailing list needs to have a confirmation stage in the
> signup where the person has to respond to the subscription email
> with a unique #.
Second that. Recent majordomo installs have that
builtin, and you could enable it with "newconfig":
# sub
I have been reporting problems with JNI/Invocation
with JDK 1.1.7v1a+native for apps that use libdl.so,
a bug which has been confirmed by Blackdown.
By accident I discovered a quick patch on this problem
that seems to work fine on my Debian "slink" snapshot,
so if you happen to be stuck with a
[Bcc: to Java Linux list and package maintainers.]
I am happy to report that (after a grating update
"post register_frame_info"), the loadLibrary() problem
with Debian "slink" libc6 and JDK 1.1.7v1a-native is gone.
>dpkg -l libc6
ii libc6 2.0.7u-7.1 The GNU C library version 2
>
Probably not of interest to virtually all here, but still:
I have a beta of the Linux port of Q2Java up for download
at
http://www.netaccess.ie/~bk/beta/
Q2Java was developed by Barry Pederson, using JDK on Win32,
and was released many months ago. It was quickly ported to
Solaris JDK for
Stephen Zander writes:
> In Private email with sbb, he informed me that the Sun developers
> don't believe native threads gives any great advantage over green
> threads in a uni-CPU environment.
I could not care less about SMI's opinion in this regard.
Green threads inhibit the Invocation API
Michael Plump writes:
> > Happens with and without greenthreads/libc|libdl in the
> > LD path. RedHat 5.1, glibc-2.0.7-13.
> check your /lib/ld.so.1 and /lib/libdl.so.1 and see what versions they are
> (an "ls -l" should tell you)
> then try running it with 1.9.6?
37146 May 10 04:49 /lib/li
Does anybody know of a (preferably Java-written - has to
work for Win32 too) tool that implements a template-like
text replacement for Java? Like the "genclass" script did
in the very early days of gcc-based C++?
I know that templates are not part of the Java language.
It would be handy though
Nathan Meyers writes:
> If you're looking for templates, you might want to check out "Generic Java", a
> Java superset that adds templates. Their java-based compiler runs either as a
> compiler or a preprocessor.
> Site: http://www.cis.unisa.edu.au/~pizza/gj/
Thanks. Preprocessor would be per
I am looking for a Linux tool to generate Java source
from C. I am aware of C2J/C2J++. What I need would
have to be used repeatedly - the code will be
maintained in C. Changing the C code once to match
converters restrictions is feasible.
Any recommendations? Commercial products included?
Augusto Sellhorn writes:
> interfaces (APIs): Java 3D (TM) API, Java Media Framework API, Java
> Advanced Imaging API and Java Sound API
> platform-independent, network-centric applications for educational,
> business and technical users with the
> easy-to-use Java Media APIs.
Personally, I
[about as much off topic as "JMF for Linux"]
With respect to "Java3D for Linux": Arcana Ltd.,
the company that till last week provided a very
popular Java OpenGL API and implementations for
JNI, RNI and Netscape's JRI on Linux, Windows,
Mac, and other platforms, has been forced to close
shop.
peter johnson writes:
> > With respect to "Java3D for Linux": Arcana Ltd.,
> > the company that till last week provided a very
> > popular Java OpenGL API and implementations for
> > JNI, RNI and Netscape's JRI on Linux, Windows,
> > Mac, and other platforms, has been forced to close
> > sh
Nelson Minar writes:
> Reading the Linux Weekly News this week, I just found a mention of a
> port of the JDK 1.1.6 for Linux from the OpenGroup in Grenoble. The URL
> is http://www.gr.opengroup.org/java/jdk/linux/
>
> The big news is it has native threads. You can't download the binaries
>
Leo Cyr writes:
> > Interesting article comparing Java VMs at
> > http://www.javaworld.com/javaworld/jw-08-1998/jw-08-volanomark.html
> Linux's results in these tests disturb me. I'd like to hear come
> commentary from those who know the VM and Linux internals!
These results do not distur
Albrecht Kleine writes:
> > http://www.javaworld.com/javaworld/jw-08-1998/jw-08-volanomark.html
> If they are using much ``synchronized'' methods TYA
> won't help too much.
Yeah, well, it seems the source is n/a, so who can tell?
b.
Note removal of crossposts. I am not sure whether this is
an appropriate list either, so my apologies.
> worried about Sun defining ISO Java specifications that include
> sucks hacks and com.sun.java.swing. What we really need is a more
> open "open process" from Sun.
What we would need is an
I was wondering about the accuracy to expect from
the Linux JDK port of Thread.sleep(long) and
Thread.sleep(long,int), as well as
System.currentTimeMillis(). Linux system timer
resolution is (according to manpage) 10msecs.
The Threads book by Oaks/Wong states that
sleep(..) simply rounds up to O
I got a statement from Vania Joloboff regarding
the native thread port of the Linux JDK prepared
by OpenGroup. See
http://www.gr.opengroup.org/java/jdk/linux
Summary: the archives are ready for distribution,
but they are waiting for confirmation of annual
license renewal from SMI. They will n
Is there an easy way to get the implemtation dependend
size of a given object? What is the problem with providing
a method e.g. like
public native final int java.lang.Object.sizeOf();
public native final int java.lang.Class.sizeInstance();
anyway?
Or in other words: what good is Runtime.fre
I downloaded the whole bulk for one single purpose:
to check whether this native thread port solves
the problem with the Invocation API and green_threads.
Well, v1 dumps cores on me in all my simple test
programs (whether using dlopen or linking against
libjava), which means that I do not even ge
Ignore if you couldn't care less about "To Diff Or Not..".
--
> The Open Group has its own business realities to deal with.
> Your demand -- that they adopt your favorite business model
> for sharing source -- seems an awfully harsh one
Not the invocation API, this time. I have finally given
up on that one. One last thing I tried is:
- a top level Java class, with one native method Main(),
and a loadLibrary call
- all the legacy C code dumped into a DLL,
Main() implementation added
Instead of using the Invocati
Gong Su writes:
> stucks at InitializeJVM hogging all the CPU. Any help will be
> highly appreciated. TIA.
This is well-known problem that already seems forgotten around
here. On Linux, libdl is (was until recently) not thread-safe.
This actually made it into the Blackdown FAQ, IIRC. You get
th
Does anybody know whether there is a chance of a
Linux port of IBM's VM? Has IBM ever responded
to any inquiries? What would be the best way to
lobby for this?
b.
--
To UNSUBSCRIBE, emai
Several people have asked for Java3D. I would like to
draw the attention of those interested in an immediate
mode graphics API for Java to the following:
Following the demise of Magician, and reading the logs
of the ARB discussions, I set out to file a feature
request for Java OpenGL bindings b
Bruce R Miller writes:
> It seemed to me only slightly more polite than saying:
> "If you dont like what you're given, shut up & go away!"
Well, isn't that the bottom line for activities nobody
gets paid for?
> it's also counter-productive to insult & hassle (or ignore)
> the potential user
Chris Abbey writes:
> umm... no, not really. I don't think I represent a small segment of the
> Java world when I say "give me stability over new features". Or worded
> differently (from a bug traq on the JDC) "stop dreaming up new APIs and
> finish fixing the ones you dreamt up last release".
Paolo Ciccone writes:
> I'm personally disappointed by Sun's reaction.
While I enjoy Sun bashing as much as anybody (in my case,
I have the 7+ years of working with and maintaining of Sun
equipment to justify it), let's be reasonable.
a) Sun doesn't owe us anything
b) there is limited if an
hal:/opt/local/java/jdk/lib/i586/native_threads#
ldd ./libawt.so
libpthread.so.0 => /lib/libpthread.so.0 (0x4004a000)
libc.so.6 => /lib/libc.so.6 (0x40057000)
/lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x)
nm -D ./libawt.so | grep XtShellStrings
U XtShellStrings
nm -D libXt.so.6
Moses DeJong writes:
> (if you are using Lesstif)
> LD_PRELOAD=libXt.so libXm.so libXext.so
> LD_BIND_NOW=1
I already do LD_PRELOAD with libjava.so (as I use libdl.so).
Hmm, could have tried that myself. Using the line you state,
with or without pre-loading libjava.so, I get the segfault
belo
I put all the bits into one source, at
http://www.netaccess.ie/~bk/bug.tgz
I stripped it of all linkage and libdl.so use, so it
is just Invocation and Frame.show(). If you'd give
it a try? Or somebody with Debian 2.1 stable and
JDK 1.1.7v1a+native installed?
If this works on your box, then
> Moses> LD_PRELOAD=libXt.so libXm.so libXext.so
Juergen:
> We clarified some motif issue: The next 1.2 release will have the necessary
> parts of motif statically linked into libawt. With this change Invocation
> and AWT should work.
Well, any chance to get this working with 1.1.7v1a+native
Louis-David Mitterrand writes:
> FYI a pre-117_v2 is already available at http://www.wisp.net/~kreilede/
> and it works like a charm on my Debian potato system (glibc 2.1.1).
I can't even unpack the
jdk117_v2_x86_glibc-2_0_green+native_threads_tar.bz2
with the Debian 2.1 bunzip2: tells me i
Juergen Kreileder writes:
> Bernd> Is there a glibc-2.0 tar.gz of the same archive?
> No, and I will not make one because the final release will be ready
> soon.
Okay, using wget instead of Win95 Nerdscrap did the trick. I have
the dubious pleasure of presenting the result of running my
The only statement I found is in the VMspecs, basically
saying:
Multibyte data items are always stored in big-endian
order, where the high bytes come first.
Does this apply to "int" in memory? Is the VM on Linux
using big endian and swaps when it interfaces native code?
Is a local int var
Michael Emmel writes:
> There has been a request on the Java Lobby www.javalobby.org
> To reform the java lobby into a grass roots campaign to allow
> Java developers to take a lager role in the determination of
> java's future.
IMO the time and energy is better spent in supporting clean
ro
Daniel W. Dulitz x108 writes:
> JNI performs endian conversion, if necessary, automatically.
> If you have a native method that wants a byte[], and it gloms together
> four contiguous elements and treats them as an integer according to
> the processor's hardware endianness, then your native i
Juergen Kreileder writes:
> Bernd> SIGSEGV 11* segmentation violation
> Bernd> stackbase=B2E8, stackpointer=BFFFEF40
> With a few changes to the linking step your example works for me, I'll
> send you my changes later.
Well? I'm itching to verify this.
Daniel Dulitz writes:
> I'm not sure why you think there's a redundant swap by JNI.
Well, I didn't, until I got into the VMSpecs and read a few
remarks. I didn't really expect the VM to use big endian
internally on little endian hosts, but then, I have seen
weirder things happening.
> Remember
Juergen Kreileder wrote May 6th:
> With a few changes to the linking step your example works for me,
> I'll send you my changes later.
I haven't gotten any changes, or any response to the three
inquiries I sent you since. In case there should be any doubt
about it, my example (AWT via Invocati
Juergen Kreileder writes:
>> I do not have the option to link against X11 libs directly.
> That was my first solution...
> With LD_PRELOAD all I have to do is
> $ LD_PRELOAD="libXm.so" LD_BIND_NOW=true ./bug
bash-2.01$ LD_PRELOAD="libXm.so" LD_BIND_NOW=true ./bug
./bug: error in loadi
Moses DeJong writes:
> Here is what I use for the preloaod:
> (LessTif)
> LD_PRELOAD="libXt.so libXm.so libXext.so"
Been there. Doesn't do it.
I'll probably get me some potato packages next. Juergen
also told me some linkage will change for the better in
the next release.
I don't quite know how to describe this. For a change,
this is not JNI related, pure Java.
The problem: I made a mistake using String.charAt(8) on
strings that have only 8 characters max. set.
if (name.regionMatches(0,"texture",0,7)) {
if ((name.charAt(7)=='1') || (name.charAt(7)=='2'))
I use args[0] and args[1] to open two files with
new java.io.File(name);
new RandomAccessFiles(name,"r");
In some cases, args[0].equals(args[1]). In these cases I do
not get an exception or error, but I get bogus read results
from the file.
If the specs prohibit concurrent read, then an IOE
> > a free and excellent class file obfuscator out there
> > author could be convinced to release it under a free license
> > for everybody to contribute and improve it
Brilliant :-). Thanks for sharing this. Best one I heard in a
long time. Right along with offering free porn to the vati
James Seigel writes:
> It may be useful if you are trying to obfuscate how
> connections are being made, and hide protocols so
> that things stay secure.
Intercept bytecode on download.
Textual replace bogus names with valid ones.
Load the class.
It seems impossible to hide a protocol in na
Ken McNeil writes:
> An obfuscator can be used to reduce the size of class files
Ab-used. In all honesty, if somebody wants to write a class
file compression utility, he would not call it an obfuscator.
Simple textual replacement does not suffice either, thus
obfuscators actually use extended na
Nathan Meyers writes:
> RMS does not own the last word
That wasn't the implication, I reckon.
> To paraphrase some of the Linux Expo statements:
> if the OSS community can't get past its anti-profit bias,
I do not agree with RMS on many an issue, but every now and
then somebody has to take
Jim Hazen writes:
> Same there. Blackdown is doing a great job with 1.2 considering all the
> bazillion new features it adds over 1.1. The latest rounds of Native
> threads for 117v3 work great
'cept for AWT in dlopen() loaded JNI apps. Still waiting for
the new release with improved AWT lin
[EMAIL PROTECTED] writes:
> I tried looking for an ncurses library once, the only thing I found was a
> JNI implementation which I didn't find useful.
Got a URL handy? If the Java API is okay, it'd allow for using
it right away until somebody comes up with a pure Java port for
the same API.
Robb Shecter writes:
> Does anybody have any pointers to using JNI on Linux? I'm starting a
> project where I'll be hacking pine to access a running Java process.
If you want a lot of JNI under worst case conditions, see
www.planetquake.com/q2java/
For the code it is more or less irreleva
Alexander V. Konstantinou writes:
> If you read the JVM threading specification, it explicitely states that
> threads of the same priority are *NOT* guaranteed to be time-sliced.
> This is the most common cause of incompatibilities, as software that
> works on MS WinNT (has time-slicing), brea
Nelson Minar writes:
> javares. Info is at http://gee.cs.oswego.edu/dl/javares/
The archive seemed to cover the first two weeks only?
> There's room for a good project here. There are some partial solutions
> now, JRes is probably the best known one.
The web site referred to in one of the ar
88 matches
Mail list logo