PDA

View Full Version : Java


WhiteWizard
16-Jan-2004, 08:49 AM
Just wanted to get an idea of how many java programmers we have at MAP i've been using Java for the past 3 years and i have to say its better than any other i've used to date especially the API so much stuff there already that you can use.

It would also be interesting to hear what people are doing with it.

Mordred
16-Jan-2004, 10:03 AM
I've also been programming in Java for about 3 years now. I use mainly Java and C#

Java is great, I just don't like Java desktop apps since they are so slow, and the lack of cool IDE's is also not great.

I've reinstalled JBuilder now a few times, it actually managed to throw away some of my code :mad:

abby
16-Jan-2004, 01:29 PM
I've been programming C++ for about 3 years. I'm taking Java 1 this sememster. (Should be a breeze since I've had all my C++ classes.)

MichaelV
16-Jan-2004, 02:26 PM
Either java or c# all the time now - depends on what our customers want. I love some things about each language, and hate others. Of course, that's true of every language I've worked with (except Centura Builder - I didn't love anything about that).

KenpoDavid
16-Jan-2004, 02:51 PM
I've started Java development this year. Mostly I do system architecture (from object modeing and db design to network planning etc) but when the rubber hits the road I do some coding too.

We use Eclipse, a GUI IDE. it is really helpful : hover over a method and see its signature; right click on an item and jump to its definition; F1 calls up javadoc on hilited item; errors and warnings displayed graphically... it's nice. Almost as nice as VB6's IDE...

What do we do with it??? my current project is to renovate this site right here:
https://wwwna.ameritrade.com/cgi-bin/apps/IndividualApServlet?segment=ameritrade&ea=y

If you've got $2000 and live in the USA then why don't you go ahead and open an account :)

KenpoDavid
16-Jan-2004, 02:58 PM
Originally posted by Mordred

Java is great, I just don't like Java desktop apps since they are so slow, and the lack of cool IDE's is also not great.


Eclipse is a free download... there is a lot more going on than just java IDE here is the link good luck

http://www.eclipse.org/eclipse/index.html

WhiteWizard
16-Jan-2004, 04:42 PM
Yeah eclipse is good it was developed by IBM and has some nice functionaility. I prefer Java over C# as i think the java API is far better than the .NET framework but i think thats just a personal thing

Mordred
19-Jan-2004, 04:10 AM
Originally posted by KenpoDavid
Eclipse is a free download... there is a lot more going on than just java IDE here is the link good luck

http://www.eclipse.org/eclipse/index.html

Thanks, I've tried Eclipse, could not get it started up - it prompts for the JDK installation directory, but won't install, even though the JDK is installed. I've got J2SDK 1.4.2, and I know it works since I develop in TextPad and do command-line compilation. Maybe an environment variable problem? I have the variables JAVA_HOME and JRE_HOME set (btw, I'm running WinXP)

I like both Java and C#. For Windows development C# is much faster, but since the two are so close in syntax I think its better to be proficient in both

xubis
19-Jan-2004, 07:12 PM
Learning Java at the moment

Cyph
20-Jan-2004, 12:30 PM
I've supposedly been coding in Java for a year; more like 10 weeks worth of coding.

xplasma
03-Feb-2004, 05:39 AM
I been doing Java for the last 4-5 years. Its my second favorite language next to C (No not C++, I hate C++!).

The thing with Java its that you can only used what is given to you, therefore it lacks power.

One my professors put it the best "Every Java program has already been written, you just got to figure out how to put it together"

Mordred
03-Feb-2004, 06:05 AM
Originally posted by xplasma
The thing with Java its that you can only used what is given to you, therefore it lacks power.

What exactly do you mean? There are things that are best done in other languages (e.g. device drivers), but Java is powerful. What features are you missing in the language?

xplasma
03-Feb-2004, 06:13 AM
Originally posted by Mordred
What exactly do you mean? There are things that are best done in other languages (e.g. device drivers), but Java is powerful. What features are you missing in the language?

You just nailed it. Java is so far away from the hardware level, that it lacks the ability to interface directly with devices w/o going through an interupter. This is a very important and powerful option of a language.


In addition, if there isn't a java library for it, you can't write the program in Java. For example: Mordred, can you write me a program in Java that doesn't Ping. Don't waste you time, you can't, Java doesn't have a library for the ICMP protocol. Where is a language, like C, (forgetting that it does have ICMP supprt), I can create a raw socket, and maually constuct a ICMP packet. I actually did this writing a Traceroute program.

Mordred
03-Feb-2004, 08:11 AM
Originally posted by xplasma
For example: Mordred, can you write me a program in Java that doesn't Ping. Don't waste you time, you can't, Java doesn't have a library for the ICMP protocol. Where is a language, like C, (forgetting that it does have ICMP supprt), I can create a raw socket, and maually constuct a ICMP packet. I actually did this writing a Traceroute program.

Yep, I get what you're saying. But then again there are better suited languages to do what you are talking about.

If you wanted to you could write the new library in something like C++ and interface to it with JNI.

Originally posted by xplasma
This is a very important and powerful option of a language.

Depends on what you do every day. For me the ability to do clean OO is a nicer feature, or easy database access. Write a multithreaded TCP socket server in Java, and one in C, then compare the amount of code you had to wring out in C. Sure the C implementation is faster, but memory isn't exactly a problem nowadays. I've done quite a bit of network programming in Java, mainly TCP and UDP stuff and have never had any issues.

WhiteWizard
03-Feb-2004, 11:26 AM
Java is very good for both network and distuributed programing uring RMI or sockets it is very powerful and it is ever expanding which is what i like.

KenpoDavid
03-Feb-2004, 04:59 PM
Originally posted by xplasma
Java is so far away from the hardware level, that it lacks the ability to interface directly with devices w/o going through an interupter. This is a very important and powerful option of a language.



I've been a programmer and system architect for over 15 years and I have NEVER had to write code at that level.

Any language that tries to work well at all levels is not going to work well at any. Java was built around some core ideas and it serves those very well.

Somebody could easily write the type of library yuo say is missing and then it isn't missing anymore... maybe it exists and you just don't know about it? You can't prove it doesn't...

xplasma
03-Feb-2004, 06:21 PM
Originally posted by KenpoDavid
I've been a programmer and system architect for over 15 years and I have NEVER had to write code at that level.

Any language that tries to work well at all levels is not going to work well at any. Java was built around some core ideas and it serves those very well.

Somebody could easily write the type of library yuo say is missing and then it isn't missing anymore... maybe it exists and you just don't know about it? You can't prove it doesn't...


Write me ping in Java..... A await your code....

KenpoDavid
05-Feb-2004, 04:57 PM
I never said I could do that, I said it may exist and you just don't know it.... await results of your search...

hongkongfuey
05-Feb-2004, 05:30 PM
Every language, (like every Martial Art) has strengths and weaknesses. The ability to access hardware directly is useful in certain circumstances, but in my opinion (and it is only that) is becoming less and less necessary.

Saying that, I can probably achieve far less in VB.net now than I could with 6502 assembler 15 years ago! Perhaps RAD is truly dead?

Damn, I'm contradicting myself - I'll say you are both right! :D

xplasma - I found the following Java Ping code on Google - not sure if this is what you are looking for?

http://maddog.sal.wisc.edu/~jones/try_stuff/try_ping.html

kobudo_tob
05-Feb-2004, 06:58 PM
So where's my coffee?

Oh wait, is it not that kind of Java?

xplasma
05-Feb-2004, 07:55 PM
Originally posted by KenpoDavid
I never said I could do that, I said it may exist and you just don't know it.... await results of your search...

Java doesn't have ICMP support, that is the first thing you learn when doing Java networking, and I do a lot of it. What I am saying is you can't add a java library on your own, at least not one programmed it java. To add support like ICMP you would have to program a library in C and use JNI or something like that. in other words a language like C is needed to use a lanauge like Java. also Java can't compile itsself, the JVM is also programmed in C.


I love the Java language, I dispies C# as the MS copy of Java (a poor copy). C++ is just C is a lot of unnecessary overhead. However, arguming that Java and C are equal in power is just plain ignorant.

Mordred
06-Feb-2004, 05:06 AM
Originally posted by xplasma
C++ is just C is a lot of unnecessary overhead.

So the ability to do OO is just unnecessary overhead? lol - I don't think so.

Originally posted by xplasma
I dispies C# as the MS copy of Java (a poor copy).

... and to argue that C# is a poor MS copy of Java is also ignorant. I have programmed quite a bit in both and C# is NOT a copy of Java. It shares some traits, but so does C++ and C.

What do you base this statement on?

Originally posted by xplasma
Every language, (like every Martial Art) has strengths and weaknesses. The ability to access hardware directly is useful in certain circumstances, but in my opinion (and it is only that) is becoming less and less necessary.

Good point.

Mordred
06-Feb-2004, 05:33 AM
Taken from "http://www.javaworld.com/javaworld/jw-03-2001/jw-0316-jdk_p.html"

The magic of Merlin

How the new JDK 1.4 -- code-named Merlin -- levitates its functionality.

Sun Microsystems has promised a 12- to 18-month time frame for each major release of the JDK. To keep within that time frame, Sun hopes to unveil the beta release of the JDK 1.4 -- code-named Merlin -- this March. The Java Community Process (JCP) has been working on the release for more than a year. The coolest thing about this release is that the JCP allows its users to actively participate in deciding the features and the direction that Java should take. Merlin was developed under Java Specification Request (JSR) 59.

According to Merlin's JSR, the release is focused on reliability, serviceability, scalability, performance, and deployment. I define it as a focus on building "maintainable software." It will include many new APIs with added functionality, for which we had to use third-party APIs in the past. Getting those APIs bundled with JDK will standardize them; that will reduce software development time and maintenance costs. I will talk about those APIs shortly. Merlin's final feature set is not yet public, so some of the features discussed in this article might not appear in the final release.

Networking
Merlin will support IPv6, the next-generation Internet Protocol, which will provide 2128 unique IP addresses compared to the current 232 addresses. SocketFactory classes will be introduced, along with disconnected sockets and tunneled sockets. Sockets will also support ICMP and RAW connections now. A pure Java-based DNS service will also be provided.

hongkongfuey
06-Feb-2004, 08:16 AM
2128 unique IP addresses compared to the current 232


2128 addresses doesnt sound like a lot for the whole internet!

I think it should read 2 to the power of 128 (3.4e38) compared to the current 2 to the power of 32 (4,294,967,296). Or an IP address for every grain of sand on the planet!

KenpoDavid
06-Feb-2004, 03:00 PM
You are correct honkkongfuey about those numbers of addresses.

an IP address is xxx.xxx.xxx.xxx where xxx is a number between 0 and 256. 256 is 2 ^ 8, 4 of those gives you a number that is 2^32.

+++++++++

xplasma wrote :"However, arguming that Java and C are equal in power is just plain ignorant." I don't think I was doing this. but, for fun, lets look at that question...

I'd have to ask what you mean by "equal in power".

Does "power" mean, the ability to repeatedly deliver systems that are critical to the bottom line, on-time and under budget?

if so, C is nearly powerless! We do this with Java consistently.

Maybe "power" means, capable of addressing the issues faced in developing mission-critical solutions in a rapidly-changing business climate using interchangeable development resources?

if so, C is nearly powerless! We do this with Java consistently.

if power means, it can be used to build esoteric proprietary hardware interfaces, well, then, C has the edge for sure!


money makes the world go around....

xplasma
06-Feb-2004, 09:02 PM
Originally posted by Mordred
Sockets will also support ICMP and RAW connections now.

w00t! Its about time. I am about to start writing an article about Raw Sockets and Uses in Network Exploitation. I am going to have to look into Java Raw Sockets and include it. Damn, that means I finally have to upgrade the jdk on my server from 1.3 to 1.4.

By power I mean, you can make C basically do anything you want. Where in Java, you will have to wait for upgrades and in the case of ICMP it took 11 years.

You guys are acting like I hate Java I have said twice already that Java is my second favorite language next to C. In fact I tend to intergrate the 2 languages often. It just that Java still depends heavily on a buit in api where C only uses a Standard Library and not defined by it, like Java.

Mordred
10-Feb-2004, 03:36 AM
By power I mean, you can make C basically do anything you want. Where in Java, you will have to wait for upgrades and in the case of ICMP it took 11 years.

No, you don't have to. You extend it by using a mechanism like JNI, which we have already talked about.

xplasma
10-Feb-2004, 05:26 AM
No, you don't have to. You extend it by using a mechanism like JNI, which we have already talked about.
So your argument is the Java is powerful because you can use the Java Natice Interface to invoke other program that are written in more powerful language like C. By that logic, I can write everything in A Shell langauage like bash. There I can invoke any local code, even Java!

Mordred
10-Feb-2004, 05:59 AM
No, I'm only saying that you don't need to wait for Sun to implement the functionality you need in the Java class library. You can extend the language to include the functionality you need. There are also numerous open source web sites with Java projects - adding and expanding what you can do.

If you feel that you need to be able to do everything in only one language, then great, stick with C. I'd rather use a combination of languages to achieve a goal.

xplasma
10-Feb-2004, 06:21 AM
No, I'm only saying that you don't need to wait for Sun to implement the functionality you need in the Java class library. You can extend the language to include the functionality you need. There are also numerous open source web sites with Java projects - adding and expanding what you can do.

If you feel that you need to be able to do everything in only one language, then great, stick with C. I'd rather use a combination of languages to achieve a goal.
Actaully I used C, C++,Java, PhP, Bash, x86 Assembly, x86 Shellcode on a regular basis, diving in the Haskell, Prolog, and Perl if Needed. Currently, I am back at school and away from work and I cry at the amount of people is my Graduate Level Systems Programming Class who are struggling with C basically cause they only learned Java and a little C++ in their undergradate courses. Then I heard the whinning outside one of the professor's office becuase she graded her algorithms assignement by how fast their program ran. She said "Your grade will be determined by how long you program takes to complete, you can use any language" Well, the program had to be pretty practical to use an academic language like prolog and haskell was pretty undoable. Therefore, the logical attack for this problem would be C . Nope, These people insisted on using Java! So wehen the grades come out, everyone who used java got C,D or F. While poeple who used C got a A or B. Why the Java programs took around 1 min while C programs were taking 20 or 30 seconds. Java is slow! So I am getting sick or all this Java crap. I love java for what it can do, but it has major downfalls, and poeple refuse to see that.

WhiteWizard
10-Feb-2004, 08:31 AM
Java is slower than C obviously because you have to run the java byte code rather than pure assembly. personally if given the same assesment i would have used C as i know it would be faster due to it being at a lower level.

Many people just dislike C because lets be honest its a horrible way of programming despite how fast it is and the tools for it are pretty mince basically because it was invented by a bunch of geeks who never thought they would have to debug code.

People will take the easy way out most of the time hence Java is very much easier to program in C then they will pick Java. Both language have their merits that is what xplasma is trying to say

OMG someone else who knows Haskell so it isn't just Glasgow University that use the language :)