|
This thread is locked; no one can reply to it. |
1
2
|
guru java programming tips & tricks here!! |
Frank Garrett
Member #1,625
November 2001
|
One day i was just surfing the net and |
Bob
Free Market Evangelist
September 2000
|
Hey, just what I was looking for! -- |
Peter Hull
Member #1,136
March 2001
|
Is anyone interested in Java? I was playing recently with JNI and Allegro - using my system you can now write Allegro programs in Java* Pete
|
Bob
Free Market Evangelist
September 2000
|
Do you draw inside a JComponent, or an applet? I can see JComponents as being more useful... -- |
23yrold3yrold
Member #1,134
March 2001
|
I've never really bothered caring about Java, since my main interest is making video games, and I've never found C++ lacking in that department. Anyone wanna take this opportunity to sell me on why I should bother learning it? -- |
amarillion
Member #940
January 2001
|
pro: The great advantage of java is that it is portable. Not only the code can be compiled on different systems, but also the compiled bytecode can be run on different sytems (Intel, mac, whatever). That is also the reason why java is so popular for web applications: It will work on any system with a java compatible browser. Also the java language has been designed to be as close to C++ as possible while removing some of the more error-prone stuff like pointers and macros. Also Java is garbage collected, which means you don't need to worry about freeing and deleting stuff. con: Java has no templates, no compiler directives, no macros. You don't have the same "freedom" as in C++. How can you survive without pointers? -- |
Goku
Member #686
September 2000
|
Pardon my long essayish thing here. Since Chris asked, I figured I could shed some light on his situation by sharing some information about all possibilities. For my Java arguments, I will mainly consider it for its web-page applet abilities. Java's not that great for standalone apps and there's other options if you need portability. So Java, Flash and ActiveX (as well as a few lesser known methods) are your main choices for making browser applets, so how to choose... Flash is more point-and-click oriented (IIRC, FlashScript is almost entirely programmable while never touching a keyboard) so unless you really dig deep or get creative, you have less control, and it lacks that sort of brute force feel that programmers tend to like. But that also makes it quite easy to use. Plus, I don't know if Flash players exist for other OSes like BeOS (I'm pretty sure they exist for Linux and Mac though). ActiveX can be done in C++, Visual Basic and maybe Delphi so the language choice is good. I think it has a speed advantage on Java and Flash but the reason for that isn't a positive one: it's extremely non-portable. ActiveX controls are compiled in native Windows code. Furthermore, the last I knew, you needed a plugin to view ActiveX controls if you use a browser other than Internet Explorer. ActiveX is also the only one of the three that can (in its browser form) access a local hard drive. Obviously that's a mixed blessing. Java is the most portable (except maybe BeOS again...) and rather robust. But it's also slow (in this case, portable also means interpreted) and occasionally confusing to the C++ vet. It's the only one of the three that can make a standalone application without imbedding it into something else (ActiveX) or bundling a player (Flash). Since cost is usually an issue: Java's compilers and runtimes are free. ActiveX may be doable without MSVC but I wouldn't want to try, so to use C++, you'll need MSVC. There does exist however a free version of VB that will only compile to ActiveX controls (but will interpret anything else from within the IDE). I also think that Delphi is now free for personal use. Correct me if I'm wrong. Finally, save for really simple things like FlashTyper, Flash will cost several hundred bucks for the full app or from $50-$100 for a watered down third party program that exports to Flash format. OK, I may be a little biased though I tried not to be. All of them are good technologies if you want to make web applets. It's just a matter of your needs and your funds. All right, pardon my huge ramblings. I'm done now. |
Bob
Free Market Evangelist
September 2000
|
pro: No more array out of bound indexing -- |
Marty Dill
Member #277
April 2000
|
"you can't have two classes that refer to each other." Uh ... are you sure about that? It sure seems to work for me. |
Bob
Free Market Evangelist
September 2000
|
-- cut file A.java -- -- |
Marty Dill
Member #277
April 2000
|
Uh ... did I miss something here? It compiles just fine. |
Bob
Free Market Evangelist
September 2000
|
Then you must be using some super compiler. -- |
Marty Dill
Member #277
April 2000
|
Strange ... I'm using 1.3.0_02 ... |
Bob
Free Market Evangelist
September 2000
|
This is -- |
Matthew Leverton
Supreme Loser
January 1999
|
I hate Java - I've had to use it "professionally". Then again, I'm not the best at it, but it is fun to use it to write Java applets. I've had to use Java to write business applets to display ridiculous graphs that upper Management wanted... |
Peter Hull
Member #1,136
March 2001
|
Bob:
|
Bradley Bergeron
Member #1,102
March 2001
|
Quote: No more array out of bound indexing ummm...you sure? i've had programs that have crashed becaue of this, is safer than c++(i think) but it still can happen |
fox
Member #1,615
November 2001
|
Bob: ever tried borlands JBuilder? i was pretty satisfied with it. |
Bradley Bergeron
Member #1,102
March 2001
|
i have taken a couple university courses in java and they always recommended the sun documentation, and i've never had any trouble with it, found it quite useful actually. |
Korval
Member #1,538
September 2001
|
Quote: i've had programs that have crashed becaue of this, is safer than c++(i think) but it still can happen Certainly the language will let you do it, but the VM will kill your app the moment it does. Unlike C/C++, where you can then go stomping through memory at will. The only thing that kills C/C++ apps when they go past the bounds of an array is the OS's memory protection. |
DanielH
Member #934
January 2001
|
I was pretty pissed off when I found out that all the computer classes at my school switched to java. I didn't know anything about java. So how would I do that in C++? How would I create/free the memory? I've been learning so many good things in these classes, but have no idea how to convert from java to C++. |
Zaphos
Member #1,468
August 2001
|
But why would a school teach compsci in java? The AP Compsci Exam is in C++! Furthermore, C++ is more stable (I can see java getting replaced in a couple years, but I doubt that will happen to c++ ... never know, but I doubt it)
|
DanielH
Member #934
January 2001
|
I think they switched because java is easier to use and port to all systems. Oh and its free. If they taught C++, which one would they teach? Which compiler? |
23yrold3yrold
Member #1,134
March 2001
|
Whaddaya mean "which C++"? It is standardized. -- |
Bob
Free Market Evangelist
September 2000
|
Ah, I think I know why it didn't compile my Java files - the classpath was set up wrongly: it didn't look for java/class files in the current directory, but only in the obj directory! Well now it works perfectly! (a bit late though ) -- |
|
1
2
|