Ender Everett

Greenhorn
+ Follow
since Mar 31, 2001
Merit badge: grant badges
For More
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Ender Everett

Ah, I forgot one thing. For Java specific open source projects, SourceForge made a special area just for Java now...and it hosts LOADS of projects you can hook up with.
http://sourceforge.net/foundry/java
I think between this and the other URLs I posted before, you will find more links than you can handle... but I'll keep this board updated.
jeeze, if people really got into open source over here, then they should start up a new board dedicated to open source project discussion and management...
22 years ago
As far as I know, there are three things you can do...
1 - Have the installer (if you use an installer) create a shortcut on the desktop or in the start menu somewhere that executes the same thing your command-line instruction would be. It looks the exact same, and you don't have to mess with really compiling the code into an *.exe. Java was never intended to fully compiled, as far as I know...which is the whole point of cross-platform portability. Use a shortcut, that's why they're ther
2 - You could write a *.bat file and either put that up on the desktop (with a better icon, I'd hope) or write a *.bat file and then make a shortcut on the desktop or start menu to that *.bat file. For progs that need a more complicated startup command, then I think this is the way to go...
3 - You could go find the *.java/*.class to *.exe compiler. It is out there somewhere, but it's 100% not made by Sun...so once you make your program into an *.exe, you're out of the loop, so to speak. It can never be transferred to a Linux or Sun system accept through X Windows...and that sucks. The compiler is an open-source project, and if you're REALLY looking to make the prog into an executable, then this is the only way I know of. There is absolutely NO reason to do this, however, unless you are doing it strictly to improve execution time (which is does by eliminating the JVM overhead). From what your situation sounds like, this isn't the way to go.
I am absolutely not an authority on Java or Windows... so if some local guru wants to tell me I'm wrong, go right ahead! I have messed with the *.bat files and the shortcuts porsonally, and they work just fine. The shortcut-to-*.bat is exactly the method that the jEdit editor works, by the way... http://jedit.sourceforge.net
Take a look at the project and see what you think about their startup method... no *.exe here. Just *.bats and an optional shortcut. That way everything stays inside of *.jar files or *.class files and Linux, Sun, Windows, etc people can all play with it.
22 years ago
Wow, I didn't know there would be interest!
There are a LARGE number of open source projects in Java (and of course in C and C++). Here's a very few...
http://java.apache.org
- the Java Apache thing... pretty big, so I hear.
http://www.gjt.org
- The Giant Java Tree. A project to document and include all the open source Java code into a big project or directory (or something like that). Good place to start, but it takes some digging to get somewhere.
http://www.coolservlets.com
- A big directory with lots of open source Java servlet projects (Jive, CSMailForm, CSGuestBook, etc...).
http://www.sourceforge.net
- One of my absolute favorite sites. If you're interesting in learning about open source communities, who's who, etc. and hooking up with some smaller (or bigger) projects, this is the place to be.
http://jedit.sourceforge.net
- The host site and center for the jEdit project I mentioned in my first post. If you d/l the editor and play with it a little, I think you'll like it, and if you're anything like me, you'll see a few little things that irritate you about how it works/doesn't work or whatever... and you have the source code right there to mess with it. It's one of my fav projects because I can partially understand what is happening in this project, since it hasn't evolved enough to appear as pure magic just yet. It also supports any plugins you want to write for it. cool.
This isn't even the tip of the iceberg. If you just follow a few of the links from these sites, you'll get immersed in more open source than you can comprehend in your lifetime.
if you want to see some really funny stuff about how Microsoft plots (in general) and thinks about open source internally, take a look at:
http://www.opensource.org/halloween
Happy hacking!
22 years ago
Cindy, Nathan, Manfred:
OK, I'm pretty clear on that now. You answered my questions exactly. I guess I didn't phrase it well enough at first, though (I'll learn).
Junilu:
Thanks for pointing that out. I was thinking in pig-Latin.
int list[][] = new int[3][4];
gives me four objects, and
int list[][] = new int[4][3];
gives me five... right? Hmmm... interesting.
Is there any programming standard regarding the order of listing? no, I'm sure that's not the right term: "listing". I mean the order of the numbers in the []s. As in, it is standard to place them least to greatest or greatest to least?
I can imagine a negative impact on tightly operating systems (which probably wouldn't ever use JVM anyway...but this is hypothetical) where instantiating too many (or maybe the reverse, since the gc would have less to play with?) objects could be a problem, and reversing the order that you list the field sizes could affect this.
So is there any standard? Even some old hangover from C or something?
Sorry to keep bugging you with questions. And to Manfred, I know I have no real control over garbage collection and it is a somewhat worthless question, but I am intensely curious how all of this really works... if for no other reason than to have a clearer mental concept of what my programs are really making the computer do.
22 years ago
I thought about that.
But why would I ever want to do this? Is there ever any practical or realworld reason to do it?
22 years ago
Nevermind, I played around a bit with your

and it is incredibly slick... especially from the output end! Cool, it doesn't cycle at ALL unless it is a character. I didn't see that when i first read through, since I was in do-while mental mode. (^_^)
Thanks again!
22 years ago
Ah... OK. Thanks! Now I have to go find some practical application where it is useful to de-link and let an array slip off into the trash bin. ??
22 years ago
Bryan,
Thanks a lot! The code you modified gave me one more thing to think about (not a very important thing). You mentioned that to keep the extra cycle problem in check, just have the loop cycle when it recieves a character within a range that I'm looking for.
You used:

I use:

It gives me two thoughts...
1 - Perhaps your filter is more robust, since you would be ignoring numbers, spaces, or really anything that could possibly be outside of the range of characters that the game was intended to play and analyze. Mine will accept and analyze anything that isn't a \n or \r (sorry, I'm using a Japanese keyboard, so i can't do the proper backslash unless i disable it... it works fine, though).
2 - Which evaluation cycle is more efficient? In a program as trivial (well, just plain useless, really) as this, it doesn't really matter, and I like your method a little more, since it targets only the letters I want to analyze. But just for the sake of the language, which one is more efficient?
Thanks again!
[This message has been edited by Ender Everett (edited June 05, 2001).]
22 years ago
I have a question about multi-dimensional arrays...
In Java, an array of more than one dimension is merely an array referencing more arrays... or a list of arrays. And in Java, arrays are instantiated as objects, not mere data structures. So the statement:

is really instantiating 5 objects? If so, that is really interesting... and it gives me a question about how Java's garbage collection works.
Normally, after I reference an object for the last time in a program, it is available for garbage collection. I played around with this by making a stupid program:

So I was using the finalize() to show me which # was being destroyed when. It's pretty random (!!), and all I know about garbage collection so far is what I learned from this program.
So I am wondering, if each array is an object, and each multidimensional array is a list of arrays, after I reference somearr[34][11][x] for the last time, is somearr[34][11][x] still eating up memory, or can it, individually as a member of that set of array objects, be trashed by the garbage collector? Or does the garbage collector kill somearr[][][] as a group all at once, always?
If it can trash the members of a multidimensional array individually, is there some variant on my primitive code that can show me when they are getting trashed?
Thanks again.
22 years ago
I don't know if you're into open source or not (I mean, you said "will work for free!" so...), but there is a pretty cool looking project going on right now to make the jEdit text editor. It's a pretty slick app so far, and since it's open source, you may as well add ANYTHING you want to or think it needs... then help out the rest of the planet by submitting your enhancements to the guy heading up the project.
I believe on their website they have a short list of things they wish someone would figure out/do to help stabilize the new version code, or add features, improve implementation/efficiency, whatever.
If you're looking for code practice, go find an open-source prject. They're cool, and you can learn a lot, I think.
BTW, the jEdit project is WAY over my head at the moment (of course, I'm new to studying Java), but open source in general isn't... there's a lot of cool stuff going on there.
22 years ago
I have a question about (re)assigning array reference variables.
If I create two arrays, I can reassign the reference variable name of one of them to the other array. No problem... I am curious, though, if I can ever reassign the reference variable to the original array, or if it is possible to assign a new reference variable to the now nameless array. If I can, how? It looks like the unassigned array is just floating out there in space waiting for the garbage collector to come by...
Here is code of a sample situation:

OK, So I reassigned the reference variable nums2. Now can I ever re-link to the array that was originally referenced through nums2 in any way? Is that whole object just lost now (as far as the program is concerned) and liable to be trashed at any time or... ? Just curious.
I have absolutely zero practical application for this at the present time... I just started studying Java about 10 days ago, and I am curious about the little tiny specifics of implementation.
To be totally up front, this is my first go at progamming ever, and this is all quite fascinating to me...
Anyway, thanks!
22 years ago
Mike,
Just to beat a dead horse... here's a quick bubble sorting code I made up for absolutely no reason. Well, actually, there is a reason: I'm new to Java and programming in general so I didn't know there were sorting methods in the Java API... duuuh... it's my second week of Java & programming, so give me a break!
My Bubble sort (just a code snippet, not a class or anything functional!):

It's probably not as efficient as a more experienced programmer could have made it, and I think it would be wonderfully slow in any really big array, but that's my bubble sort (so far... I think).
Any comments?
22 years ago
You're a unique individual; just like everyone else.
22 years ago
OK, You've got me confused now... what exactly do you mean when you say "read byte code"?
If you mean open it up and take a look at what actual characters are in your byte code file, the way I listed in my first post is one among many methods. (there's absolutely nothing to see in bytecode, however... it is even less useful than machine language, as it is interpreted, not the machine-form of assemlby)
If you mean decompile (which you just said you didn't), then the decompilers are the way...
You've got me really confused now... what do you mean? And what is it that you are trying to do in the end? Perhaps there is a better way of phrasing the question.
22 years ago