Re: UGLY BUG parsing the date of "1999-04-30" in jdk 1.1.7 on Linux RH 5.2
Constantin Teodorescu wrote:
>
> sdf = new SimpleDateFormat("-MM-dd");
> sdf.setLenient(false);
> try {
> thedate = sdf.parse(s);
Hi,
I've gotten good results by using the SimpleDateFormat constructor with this signature:
SimpleDateFormat(String, Locale)
...You specifiy the locale (which contains the time zone) of the given date string.
This might
help avoid the problem. I was getting some strange results before I started doing
this, because
I'm writing and testing a program in Europe (GMT+1) that's getting deployed in
California
(PST). I can dig out the source code for this, if you like.
- Robb
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Demo's
I want to use JDK 1.1.7 to develop a Java Applet for a project at Motorola I'm working on. I've downloaded and installed JDK 1.1.7. Somewhere I saw a mention of demo software. I can't seem to find it on your web site. Can you send me a URL with the latest demo's? I'm especially interested in the 3D wire frame demo. Thanks, Steve Mills Motorola SPS -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Status updates [Was: Re: ...]
Wes Biggs wrote: > > All your arguments are factually right. But pyschology is at work here, and > > especially in an extremely important project like JDK porting (from my > > perspective, it is the second most important project after the kernel and at > > times more important), you have to account for psychology, whether you're doing > > work on a voluntary basis or not. It just makes things much smoother. > > You're confusing the Blackdown port of Sun's sources with truly free software. Sun > has paid lip service to GNU/Linux support to gain media attention and developer > chic, but their supposed support of Java 2 on GNU/Linux seems to be more > javax.swagger than javax.swing, and from a developer point of view, they've > *increased* Blackdown's time-to-market by requiring JCK compatibility (I'm not > arguing that this should be eliminated, just that this is the effect it has had). > providing a clean-room class library implementation. And you're confusing factually correct arguments with the workings of psychology. I'm not arguing that the porting team should change anything, that Sun should change anything, I'm not arguing about licensing styles, I'm just pointing out that when probably tens of thousands of people are waiting for updates on your project, it is probably wise to keep them informed. And I'm also pointing out that I do think the porting team could be doing better in this area. > > Your assertion that the JDK is equivalent > in importance to the kernel may have some meaning to you, but while the folks who > are doing the GNU/Linux port may be more involved with Sun than you or I, they're > still not the ones calling the shots. Correction - read "Java2-compatible JVM" here. With "JDK" I don't necessarily mean Sun's, and I'm longing for the day that Japhar or Kaffee can compete (I cannot cooperate, I've signed the JDK source license; you can bet I would have put SGMLtools in the fridge for the opportunity to work on a truly free VM) -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
JDK 1.2 works with SuSE Linux 6.1
Hi! I just want to inform you, that I have installed the JDK 1.2 pre-release 1 successfully on the new SuSE Linux 6.1 (http://www.suse.com). I have compiled and run several Swing based applications and everything seems to work fine. System: - SuSE Linux 6.1 on Intel Pentium - egcs-2.91.66 and libraries - JDK 1.2 pre-release 1 Installation: - Set a link to the libstdc++ library: ln /usr/lib/gcc-lib/i486-linux/egcs-2.91.66/libstdc++.so usr/lib/libstdc++-libc6.0-1.so.2 Setting LD_PRELOAD did not work (Segmentation Fault). - Everything else as described. - Detailed instructions at http://www.physik.uni-bielefeld.de/experi/d3/persons/struve/kaariboga/firststeps/index.html#InstallationLinux Thanks and keep on the good work! Dirk -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Too many open files in system
Thank you all for helping me this far. I suppose I just open a lot of file descriptors. How can I change the max number of file descriptors for the whole system (I'm using RedHat 5.2)? When my servlets run out of file descriptors other processes owned by other users are getting messages like "Too many open files in system" to. > UNIX (Linux included) allows you to set a max number of file descriptors > that a given process can have open. The command controlling this > depends on the shell you're using. For instance, under Linux tcsh, it > is "limit" and under bash (/bin/sh) it is "ulimit" > > I think the default is 256 -- you can check the current setting by > typing "limit descriptors" in tcsh or "ulimit -n" in bash. So, to set > it to something hight under tcsh, type "limit descriptors XXX" where XXX > is the number you want. Under bash, type "ulimit -n XXX". Read the man > page for bash or tcsh (limit and ulimit are builtin commands) for more > information. When I run servers, I usually set it to 1024. > > Also, you really, really should not rely on garbage collection to close > files and sockets for you. While technically it's true that they will > be closed and the resources will be freed when GC finally catches them, > it's no way to write good software. > > -nate -- _ _ _ ______ ____ __ ___ ___ ___ | |/_\ / / _ \ | _ \ ) / _)/ ) _ \/ _ ( ) _| /(_)\ ( (_) ) ||_) ) ) ( (_-| | (_) (_) | | (__/_/ \_\_\___/ |___/__) \___|_|\___/\___/|_| -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: RMI troubles
>I have been trying to get RMI to work for some time now. RMI works fine in Java/Linux - I rely on it heavily with my code, and it works as well as it could. (There are some interesting issues relating to socket limits and 50+ simultaneous calls, but that's Linux and RMI's fault, not the Linux port). >I can run the server class, and it binds with the registry just fine. >When I try to connect with the client, it tells me that the _Stub >class cannot be found. This is a basic RMI problem - you should read the RMI FAQ on Sun's web site. Classpaths in RMI are a bit subtle. [EMAIL PROTECTED] . . . .. . . . http://www.media.mit.edu/~nelson/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
re: Sun's Agenda?
I share the frustration expressed recently about the status of Java on Linux. We've always been somewhat second class citizens. The problem is most definitely not Blackdown's fault - they're doing great given their resources and the licensing structure of Java. As for Sun's "agenda", my feeling is that it's not that well defined, in particular for Linux. There's the Sun corporate stance, of which there are many competing factors. The Solaris organizatoin doesn't necessarily see eye to eye with the Java organization, and lord only knows who is thinking what about Solaris/x86. Then there are plenty of geeks inside Sun and inside Javasoft who love Linux themselves, use it for their own work, etc. The most frustrating thing is I can't see any way, in the current structure, to improve the porting of the JDK. Blackdown's doing as well as they can. Personally, I think there are only three ways Java is going to get better on Linux: Sun decides Linux is a priority and assigns engineers. I think they have a real case for doing this to support Jini - they need a platform that can easily embed Java, and Linux is a good high-end way to do that. Of course, this drags us into the embedded Java mess... One of the free Java efforts (Japhar, Kaffe, Cygnus' new thing) gains enough momentum to be a serious JDK replacement. One of the non-free Java efforts (IBM's VM, Symantec's stuff, etc) gets ported and supported on Linux. I have no idea which of these is most likely or most desireable. [EMAIL PROTECTED] . . . .. . . . http://www.media.mit.edu/~nelson/ -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Big-Endians
Dustin Lang writes: > > Hi, > > > Can someone help me clarify the following: > > > > Java is Big-Endian, correct? > > Intel Linux is Little-Endian, correct? > > Corrrect me if I'm wrong, but here's my understanding of the endianness: > 1. the java classes (such as DataInputStream) do things big-endianedly > 2. the jvm is responsible for hiding the endianness of the platform > 3. as a result of (2) there is nothing a 100% java app can do to determine > the endianness of the platform it's being run on. You're right -- this actually causes problems in some code that needs to emit endian-correct ints to data streams. Steve -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: RMI troubles
Nelson Minar wrote: > > >I have been trying to get RMI to work for some time now. > > RMI works fine in Java/Linux - I rely on it heavily with my code, and > it works as well as it could. (There are some interesting issues > relating to socket limits and 50+ simultaneous calls, but that's Linux > and RMI's fault, not the Linux port). > > >I can run the server class, and it binds with the registry just fine. > >When I try to connect with the client, it tells me that the _Stub > >class cannot be found. > > This is a basic RMI problem - you should read the RMI FAQ on Sun's web > site. Classpaths in RMI are a bit subtle. > > [EMAIL PROTECTED] > . . . .. . . . http://www.media.mit.edu/~nelson/ With the help of some suggestions given, I have been able to get Sun's example to work, but only when I run the client on the same machine as the server. When I run the client from a different machine, I get the error java.netConnectException: Connection refused java.rmi.ConnectException: Connection refused to host: 127.0.0.1; The stack trace says that the call is being made from HelloImpl_Stub, so it appears that I have a problem with the stub talking to the server. Any takers on this one? Thanks, Wendell Porter -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: RMI troubles
127.0.0.1 is your loopback interface. There was a post on this list recently about someone needing to edit their /etc/hosts file, putting localhost after their real hostname. Russ [EMAIL PROTECTED] on 04/22/99 12:40:03 PM To: [EMAIL PROTECTED] cc:(bcc: Russell Pridemore/Lex/Lexmark) Subject: Re: RMI troubles Nelson Minar wrote: > > >I have been trying to get RMI to work for some time now. > > RMI works fine in Java/Linux - I rely on it heavily with my code, and > it works as well as it could. (There are some interesting issues > relating to socket limits and 50+ simultaneous calls, but that's Linux > and RMI's fault, not the Linux port). > > >I can run the server class, and it binds with the registry just fine. > >When I try to connect with the client, it tells me that the _Stub > >class cannot be found. > > This is a basic RMI problem - you should read the RMI FAQ on Sun's web > site. Classpaths in RMI are a bit subtle. > > [EMAIL PROTECTED] > . . . .. . . . http://www.media.mit.edu/~nelson/ With the help of some suggestions given, I have been able to get Sun's example to work, but only when I run the client on the same machine as the server. When I run the client from a different machine, I get the error java.netConnectException: Connection refused java.rmi.ConnectException: Connection refused to host: 127.0.0.1; The stack trace says that the call is being made from HelloImpl_Stub, so it appears that I have a problem with the stub talking to the server. Any takers on this one? Thanks, Wendell Porter -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: ...
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 users and would-be Java evangelists. What they want is to talk to Sun. Blackdown can't do anything. I personally have spent hours of my life lobbying for what I want with JDC and individuals at Sun (XML javadoc, and a thin layer immediate mode 3D API implementing ARB OpenGL Java bindings in the JLS, in case somebody cares. And a Reclaimer API to interface the GC). I doubt anything useful will ever come out of my explanations (so I keep my eyes on possible alternatives). This list is not the best place to make known that the current situation of "Java for Linux" hurts Java acceptance - on Linux, and maybe in general. I can make a case that, because Linux did not have a thread-safe libdl.so a year ago, and because no Linux JDK was available at that time for embedded VM solutions (Invocation API) in a DLL loading architecture, a commercial product shipping in the next few months, with something between half a million and two million consumer licenses expected, does not use Java. Mind you: 90% of those licenses will be sold for Win32. Sun wouldn't care. But then, the company would have preferred Kaffe anyway. Sun just aims at different markets. Potential users and would-be evangelists don't matter to them, why should they matter to volunteers that have more pressing things to do? > Really, it's the SITUATION that's frustrating; It's not the porters > fault, not entirely even Sun's. But us Users have got to sit on our > hands and wait. This is not true. There are things you can try. It might not work, but there is only one way to find out, and afterwards you can claim that you have tried ad least. This is not a TV-Show in which lack of progress has to be made explicit every week At least take it up with somebody whose fault it could be. The one thing I regret is that I signed the source license in 1995, so there isn't much I could do for Kaffe or Japhar. Writing code is always more efficient than writing petitions. b. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: ...
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". Well stated. Unfortunately, API bloat is considered to be more important for Sun's strategic interests than fixing the core technology... and given the average consumer, they might be right, short term. Personally I have no sympathy for anybody who started bugging the Blackdown team about Java3D of all things. There was an excellent product, Magician, that supported more platforms than Sun ever could or would, included Linux all along, sold cheap, came with a truck load of demos and samples. It got taken off the market because of all that mindless "Gimme JavaD3" instead of educating yourself about your choices. > java development isn't like other linuxian projects. It isn't > OSS, it isn't GPL, it isn't something anyone can go out and grab the > sources to and hack. It can't be. Beg to differ. One reason to be grateful to Sun is that they published specs, and that their legal position allows for clean-room implementations. This is exactly the situation in which OSS/GPL thrives - a clear cut goal, a set standard to implement. Japhar and Kaffe do exactly that, and in a few more years time they will offer the stability (but still not the then most recent features). OSS might not be capable of inventing a technology like Java, or pushing it, but it can sure clone it once defined and established. If somebody still isn't convinced the situation could be much worse, browse the revision history of the Wine project, and contemplate Java being defined by Microsoft. b. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Sun/bashing
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 any gain for Sun in supporting Linux c) they don't have unlimited resources Java is a good tool to have. Thanks to published JLS specs, open source efforts like Japhar and Kaffe have a reasonably clear target for taillight chasing, and a legally acceptable environment. Thanks to JDK source availability, ports were possible. Thanks to the Blackdown team, we do get a stable JDK port after a while. If what we have is not good enough for you, then you have to pick a different OS, or you have to support projects that will some day remedy the current shortcomings. Kaffe, Japhar, Classpath, Mauve, TYA, Cygnus' gcj are all tools that at some point will hopefully make irrelevant the question of whether Sun supports Linux or not. It is in the best interests of the Java community to have these alternatives, despite (or because) of not being a 100% in Sun's interests. But like Sun, neither Blackdown nor FSF nor anybody else has unlimited resources - it takes time. I very much remember how impatient I got for GNU gcc to implement C++ in full. It is still not finished - and the language is more than a decade old. The lesson I learned is all you can do is pay (in time or patches), or pray for progress. The politics behind other entities' descisions is irrelevant. b. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Sun/bashing
> "BK" == Bernd Kreimeier <[EMAIL PROTECTED]> writes: BK> Paolo Ciccone writes: >> I'm personally disappointed by Sun's reaction. BK> While I enjoy Sun bashing as much as anybody (in my case, I BK> have the 7+ years of working with and maintaining of Sun BK> equipment to justify it), let's be reasonable. BK> a) Sun doesn't owe us anything b) there is limited if any BK> gain for Sun in supporting Linux c) they don't have unlimited BK> resources The foundation for my frustration is based on few facts: 1) Sun pushed Java as a multiplatform language. The reality is that they develop only two versions. That's not covering two of the most used platforms in the PC arena: Linux and Macintosh. Too little for me to be truly WORA. 2) In November Sun publicly announced support for Linux. The announcement has not been followed, for what I can see, by facts. If you don't say a word than you owe nothing but if you promised you better keep the promise. People are investing time and money based on what Sun says. 3) Sun has nothing to gain in doing any port, Win32, Solaris or Linux. The JDK is given away for free and, for what I know, is not a *direct* revenue generator. Now, if you look at the BTS on the JDC you'll see that there thousands of requests for Linux JDK. If Sun judges the need to port the JDK to platform based on the number of users that want it then the Linux community showed some real numbers. 4) Granted, Sun doesn't owe us anything but it's them that are pushing for the adoption of Java. If they want that to succed they have to support Linux. They promised support and after six month we still have to see some concrete effort. As I said, there no trace of Linux JDk on Sun's Java site. BK> Java is a good tool to have. Thanks to published JLS specs, BK> open source efforts like Japhar and Kaffe have a reasonably BK> clear target for taillight chasing, and a legally acceptable BK> environment. Thanks to JDK source availability, ports were BK> possible. Thanks to the Blackdown team, we do get a stable JDK BK> port after a while. BK> If what we have is not good enough for you, then you have to BK> pick a different OS, or you have to support projects that will BK> some day remedy the current shortcomings. I thought I gave plenty of credit to the Blackdown team, in my last message and in other occasions. I believe you're totally misreading my post if you think I said that Linux/Java is not good enough for me. Do we have to accept everything as gospel or there is still freedom of speech ? Things are in a prettu good shape but we have a lot to improve in the Linux/Java front. Denying this will not fix the problem. The current status of the JDK is good for early development but the silence and lack of support *from Sun* is seriously joepardizing any professional Java development under Linux. You cannot relase a product in the market based on a pre-release JDK. You cannot announce release dates of your products if Sun doesn't give us a deadline for the final JDK release. In general, the feeling of not knowing what's going on doesn't encourage investing time and resources. I believe that anybody that worked in this industry and *shipped* products is very well aware of these facts. I'm not bashing Sun, I'm trying to post some constructive critique. Sun is, objectively, moving too slowly on the Linux platform. The sooner they realize this the better for us and for them. --Paolo -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
TYA1.3 released
Dimitris wrote: > In my opinion, even such a release would make sense, since it could point out even > more problems (and thus expedite the route to final release), and even unveil some > jdk problems. so here it is: ftp://gonzalez.cyberus.ca/pub/Linux/java/tya13.tgz size is 129612 byte. -SOME QUOTE FROM RELEASE NOTES--- Unlike other TYA releases this release is a simply snapshot of current TYA, but not an intermediata stage as usual. About using TYA with JDK1.1.7: Current TYA releases should run most applets and programs out there including Swing, beans, browsers, servers, JDBC etc. Attention: because I am using JDK 1.2 pre release, this stuff TYA for 1.1.7 is not good tested as usual ! About using TYA with JDK1.2: This TYA release should run at least some of the JDK demo stuff including Swing stuff like _Java-2D-demo_ . Please consider that the TYA-FOR-JDK-12 stuff is somewhat experimental because the JDK1.2 port I've used is itself in an alpha prerelease state, for example you will run into trouble if you try to use green threads and JDK's own JIT. -- > Best Regards, > Dimitris Special thanks to Dimitris for the one and only reply. Cheers, Albrecht -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
jdk-1.2 out of memory errors...
Hi there, I just installed the pre-release 1 of jdk1.2 on my system and as stated in the README included its bin directory in my PATH. But - even trying to run a simple HelloWorld fails with an OutOfMemory error (and I am somewhat certain that there is enough memory left [unless, 900MB free memory would be too little]): beh@fenun:~/src/j $ java HelloWorld *** panic: GC: getStickySystemClass failed: java/lang/ref/Reference CLASSPATH may be incorrect SIGABRT 6* abort (generated by abort(3) routine) stackpointer=0xb248 Full thread dump Classic VM (Linux_JDK_1.2_pre-release-v1, native threads): "main" (TID:0x410f31e0, sys_thread_t:0x8143400, state:R, native ID:0x400) prio=5: pending=java.lang.OutOfMemoryError Monitor Cache Dump: Registered Monitor Dump: utf8 hash table: JNI pinning lock: JNI global reference lock: BinClass lock: Class linking lock: System class loader lock: Code rewrite lock: Heap lock: Monitor cache lock: owner "main" (0x8143400) 1 entry Thread queue lock: owner "main" (0x8143400) 1 entry Dynamic loading lock: Monitor registry: owner "main" (0x8143400) 1 entry beh@fenun:~/src/j $ free total used free sharedbuffers cached Mem:517308 381284 136024 72700 115464 197192 -/+ buffers/cache: 68628 448680 Swap: 770504 0 770504 Also, what I find strange is the mentioning of a possibly incorrect CLASSPATH -- no CLASSPATH is set in the environment, and according to the README, that should be OK... Btw. trying "javac HelloWorld" yields the same OutOfMemory error (I still had an old .class file around to test the "java HelloWorld" with). I have a pretty current Debian/potato (glibc-2.1 setup) -- last dselect upgrade is 24h back, with a 2.2.5 kernel on a Dual P-II machine. Any clues? Benedikt ULTIMATUM, n. In diplomacy, a last demand before resorting to concessions. [Ambrose Bierce, "The Devil's Dictionary"] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: can't find class ijvmasm
Last night, a friend of mine was telling me he had exactly the same problem (except using servlets), and the same solution worked for him. He speculated that the JVM he was using couldn't handle compressed java library files (which I suspect may be your problem as well). I didn't look into this at all, but it may be the cause of all this hastle. What to do about it? 'Dunno, upgrade your JVM possibly? ;-) Happy computing! Nicholas Lee wrote: > On Wed, 21 Apr 1999, TC Lin wrote: > > > > > I finally make it work. > > Only put "." in my CLASSPATH wouldn't do it. > > I unzip "classes.zip" in the mic1 directory. > > After that, everything seems fine. > > I've noticed this problem (and solution) at least once, although I haven't > followed it up. > > Nicholas > > -- > To UNSUBSCRIBE, email to [EMAIL PROTECTED] > with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED] -- Shaun Johansen Software Developer Novafex Software Limited [EMAIL PROTECTED] http://www.novafex.com -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Thanks!
Steve, are you there? Gawd, I gotta thank you for Linux JDK. We're running it on CardPC in a Java electric car! Wow. Owen -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
More about setMnemonic
How can I do to have the setMnemonic working in a Java-Swing app? I have read some about the topic but I can't find any concrete response of what combination of jdk-Xserver-WindowManager can I use to avoid the problem. Please I'm in a big trouble for this little detail, I can't make work my app in Linux without key accelerator in the Windows style (Alt+key). I'm using : jdk1.2 (Blackdown Linux, of course) MetroESS 4.3.1 KDE/AfterStep Thanks in advance. Roberto -- Roberto Moreda Depto. Informática HANDEM, S.A. (A Coruña - Spain) Tlf: +34 981 779000 correo-e: [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Too manyopen files in system
Jaco de Groot wrote:
> > >
> > > Too many open files in system
> >
> > Make sure you're closing the files when you're done with them.
>
> I've checked my code for this. But even without closing them
> myself, shouldn't they be closed at garbage collecting time?
>
> What tool under Linux do I use to check how many files are
> currently open in my system?
As long as the File objects (or whatever Stream you're using on them) is
open, it is *absolutely guaranteed* not to be garbage collected. As far
as the VM knows, you're still using the reference, so it won't free the
memory being used by it. If you're opening a file to read from, then be
sure to close it when the read is completed (and if you want it to be
GCed, assign the reference to "null"). If you're opening a file to write
to it, close it when you're done writing.
On a read, you can use a while loop to check for end of file:
//open a file - we'll call it "f"
// get a stream on it - let's call it "s"
while (s.read != -1) { // -1 signals EOF
// do something useful
}
f.close();
Of course, you have to catch the possible IOException, so wrap that in a
try-catch block.
On a write, you can call flush() on the stream, then close the stream.
I don't know what tools there may be for finding out how many files are
open at a given time on Linux.
I hope this helps. :)
--
Jeff Galyan
http://www.anamorphic.com
http://www.sun.com
jeffrey dot galyan at sun dot com
talisman at anamorphic dot com
Sun Certified Java(TM) Programmer
==
Linus Torvalds on Microsoft and software development:
"... if it's a hobby for me and a job for you, why are you doing such a
shoddy job of it?"
The views expressed herein do not necessarily reflect those of my
employer.
Sun Microsystems, Inc., has no connection to my involvement with the
Mozilla Organization.
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
jre
Is there a java runtime environment for linux?? Thanks. -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: jre
At 10:00 AM 4/23/99 +0800, Jayvee Vibar wrote: >Is there a java runtime environment for linux?? yes. http://www.blackdown.org/java-linux/mirrors.html lists many mirrors you can choose from. All of them have it. Select any one, then select the level you want (i.e. JDK-1.1.7), then select your arch. (i.e. i386) then your libc version (i.e. glibc), then v1a, you'll see four pieces to choose from: i18n, jdk, jre, and rt. Oh, and you'll also find a README file, start there. rt + i18n = jre. jre + devel_tools = jdk. -=Chris !NEW!-=> <*> cabbey at home dot net http://members.home.net/cabbey/ <*> "What can Microsoft do? They certainly can't program around us." - Linus -BEGIN GEEK CODE BLOCK- Version:3.12 http://www.geekcode.com GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y? --END GEEK CODE BLOCK-- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Demo's
At 01:32 AM 4/22/99 -0700, Steven Mills wrote: [...] >your web site. Can you send me a URL with the latest demo's? I'm [...] Since the demos are in java, and java is platform independent, the demos are platform independent... I'd suggest starting with the ones at http://developer.javasoft.com/ -=Chris !NEW!-=> <*> cabbey at home dot net http://members.home.net/cabbey/ <*> "What can Microsoft do? They certainly can't program around us." - Linus -BEGIN GEEK CODE BLOCK- Version:3.12 http://www.geekcode.com GCS$/IT/PA$ d(-) s++:+ a-- C+++$ UL UA++$ P++ L++ E- W++ N+ o? K? !P w---(+)$ O- M-- V-- Y+ PGP+ t--- 5++ X+ R tv b+ DI+++ D G e++ h(+) r@ y? --END GEEK CODE BLOCK-- -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
Re: Sun/bashing
At 11:24 AM 4/22/99 -0700, Paolo Ciccone wrote: >1) Sun pushed Java as a multiplatform language. Sun positioned Java as a language not bound to any realworld platform; and hence as being multiplatform capable. The only platform that's really involved when you run Java is the Java Virtual Machine. It's only Virtual because it's software - implemented on other (hardware) machines. So was smalltalk, so is, I believe, the AS/400's MI. Some day we'll have a decent Java chip (if we don't already) and then it will become just another platform/architecture. (admitedly it will be one with a differnece in that it was designed to be a virtual architecture _first_, and hence it's machine language (called byte-code) is a tad different in conceptual design.) >The reality is that > they develop only two versions. They produce two _reference_implementations_, one on their own platform, and one for the largest install base in the desktop operating system world. The point of these were not to provide _the_ JVM for a platform, but to provide a _reference_implementation_ of the JLS such that other vendors would have it (from a black-box perspective) to compare against. If memory serves originally there were two Solaris JVMs, the one provided for free download, and the one bundled with the OS If given a choice I very highly doubt they would produce the win32 JVM; but they can not trust Microsoft to do it. The way this was supposed to work ... and for the most part does ... is that every platform vendor would provide their own implementaion. HP, Reliant, SCO, Novel, Siemens, and a few other single platform companies all provide their own JVMs. IBM provides a JVM for every one of their platforms, plus windows. > That's not covering two of the most > used platforms in the PC arena: Linux and Macintosh. umm... ok... sure... what-ever you say... time to pass the pipe friend, you've had too much for tonight... :) >Too little for > me to be truly WORA. yeah, as a result of the very logic I just mentioned WORA became WOTE... sigh. it's so sad when us engineers get our hands on the architects' beautiful visions and grind them into a pile of dust on the reef of reality. >2) In November Sun publicly announced support for Linux. The > announcement has not been followed, for what I can see, by > facts. We have seen at least indirect evidence of three things: 1. Sun provided blackdown with the JCK. 2. Sun provided blackdown with two engineers whom they could ask questions of, and who have worked with the porting team to debug problems, and who provide a mechanism for the port to get back into the "master" source tree at Javasoft. 3. Sun provided Steve with a license which is (I believe) unique. All three of these amazed me to no end at the time, and to some extent still do to this day. > If you don't say a word than you owe nothing but if you > promised you better keep the promise. Agreed. > People are investing time and > money based on what Sun says. People are putting their money on something they have no control over then. When I grew up that was called gambling... today its called investing. >3) Sun has nothing to gain in doing any port, Win32, Solaris or > Linux. The JDK is given away for free and, for what I know, is not > a *direct* revenue generator. Sun is a technology company, not everything they do has to go directly to the bottom line... although as a (very minor) stock holder I am curious what the business case was for javasoft... my guess is support, education and licensing. In which case they _do_ have something to gain in supporting a platform that will pay them... hmmm... paying for something like support or education and the traditional linux community are fairly hard concepts for me to put into a single sentence. > Now, if you look at the BTS on the > JDC you'll see that there thousands of requests for Linux JDK. If > Sun judges the need to port the JDK to platform based on the number > of users that want it then the Linux community showed some real > numbers. nice logic, but I think anyone who's been around here will recognise it as the logic that _isn't_ prevailing at Sun. >4) Granted, Sun doesn't owe us anything but it's them that are pushing > for the adoption of Java. If they want that to succed they have to > support Linux. They promised support and after six month we still > have to see some concrete effort. As I said, there no trace of > Linux JDk on Sun's Java site. http://java.sun.com/cgi-bin/java-ports.cgi?other=true OK, so it's not in great big graphics screaming out to the world... but it's been there since, at least, December. OK, so it's not even on the initial page - you've got to select others... but look close
Re: Sun/bashing
Chris Abbey wrote: > >lack of support *from Sun* is seriously joepardizing any > > Why does it have to be Sun? It's not like they're developing Java in > a total vaccuumm (how do you spell that word anyway? :| ) there are > several other companies working with them, any one of whom could pitch > in and help. IBM for example. (dreaming...) > > >professional Java development under Linux. A very cogent question embedded in a very cogent response (thanks, Chris). There is a thriving entrepreneurial culture within the Linux world -- companies like Red Hat, Caldera, SUSE, and others are thriving (if small) enterprises that function very well in the open source free software world. So far, no entrepreneur has grabbed the commercial reins of the Java/Linux effort -- it's still entirely a spare-time effort by some fanatically devoted people. That'll change, I hope (if only I could remember where I filed that business plan :-) -- but it won't come from Sun and it probably won't happen this week. Nathan Meyers [EMAIL PROTECTED] -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
jdk 1.2 final?
When is jdk 1.2 final due? Are you working with it with mozilla's OJI? -- http://www.slidellweb.com/dcougle ICQ #3795561 Lunarbard on AOL(Instant Messenger) Proverbs 15:3 "We will not be the alternative, we will set the trend" -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
JNI error! Need help.
Hello, All, I met an error when I port my windows JNI to Linux. The jni run well on Windows NT/95/98. I don't familiar with Linux platform I need your help. Error is FATAL ERROR in native method: try to unpin an object that is not pined. I want to offenly what type of code could incur this error? What's your suspects? I would like provide more detailed information while needed. Thanks in advance. Gao Lei -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]
