Author Topic: Discussion: Why do java?  (Read 794 times)

0 Members and 1 Guest are viewing this topic.

Offline Clone

  • Peasant
  • *
  • Posts: 50
  • Cookies: 2
  • Always trying to find the value of x
    • View Profile
Discussion: Why do java?
« on: March 08, 2014, 11:46:21 pm »
Maybe I am asking the wrong guys or the wrong question but i don't really see why java is liked so much. first and for most,  to executed programs one needs a JVM, second, its slow and third, its not used in hacking unless the other side has a JVM.......maybe i need some inspiration the only thing little bit of motivation i have for it, is that Android apps are basically java based.....help me out guyz...some inspiration.
« Last Edit: March 08, 2014, 11:48:27 pm by Clone »
One who walks the line between light and dark, with no ties to either side. No morals or emotions clouding their judgment,able to accomplish tasks and solve problems in the most efficient and logical way.

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: Discussion: Why do java?
« Reply #1 on: March 08, 2014, 11:51:22 pm »
Your intuition is right, but for the wrong reasons. I've elaborated before and there's plenty of others who have done it more eloquently than me anyway.

The only reason to use Java is out of necessity. That's it.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline Clone

  • Peasant
  • *
  • Posts: 50
  • Cookies: 2
  • Always trying to find the value of x
    • View Profile
Re: Discussion: Why do java?
« Reply #2 on: March 08, 2014, 11:54:39 pm »
Indeed
One who walks the line between light and dark, with no ties to either side. No morals or emotions clouding their judgment,able to accomplish tasks and solve problems in the most efficient and logical way.

Offline Kulverstukas

  • Administrator
  • Zeus
  • *
  • Posts: 6627
  • Cookies: 542
  • Fascist dictator
    • View Profile
    • My blog
Re: Discussion: Why do java?
« Reply #3 on: March 09, 2014, 10:31:58 am »
It has been discussed many times, just search around.

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Discussion: Why do java?
« Reply #4 on: March 09, 2014, 12:59:17 pm »
Maybe I am asking the wrong guys or the wrong question but i don't really see why java is liked so much. first and for most,  to executed programs one needs a JVM, second, its slow and third, its not used in hacking unless the other side has a JVM.......maybe i need some inspiration the only thing little bit of motivation i have for it, is that Android apps are basically java based.....help me out guyz...some inspiration.

Java and liked: The question is by whom?
Schools like to teach it, because Java was considered as an easy language to teach OOP. Schools are usually slow with implementing new stuff once something worked out, so they stay with Java. There are a lot of people who are able to code in Java and for the same reason you have a lot of tutorials, libraries, forums, teachers, books and so on. Java is used A LOT in enterprises. I mean almost every job advertisment I see at my university is either for Java or C#. And schools like to say, that they teach something that is actually needed.

Some other people probably like it, because they got taught in school and it is something they are familiar with.
And reasons mentioned above are valid here as well. Once a language is popular it stays popular.

Why enterprises like it? I honestly don't know. I am disgusted by their framework bullshitting. I have been working in enterprise development and it was horrible. It is just glueing frameworks together, glueing stuff together, making the right settings. There is almost no coding involved. You just take pieces and put glue on them and hope that it works. And these people from human resources, they really like those terms like Hibernate, Seam, Java, JSF, OOP, ... They get a glare in their eyes if you name them and they love to talk about them although they have no clue what they are talking about.
Note: I know that this is very subjective and just my experience, but arrrgh.

Quote
to executed programs one needs a JVM

No, you don't.
1. The JVM is not the only VM that is able to run Java. Just have a look at: https://en.wikipedia.org/wiki/List_of_Java_virtual_machines
2. This is implementation specific and has nothing to do with the language. Everyone can write a native compiler for Java and so you get binaries that have no dependencies at all. Example: http://gcc.gnu.org/java/
3. You can create executables with a small embedded VM, so the other side doesn't need a JVM as well. That's actually also a pretty good reason for some malware writers to use Java. I.e. I have seen a crypter code that used Java and an embedded VM as stub and as the writer claims this wasn't detected by any AV for a very long time.
4. How is a JVM a disadvantage for a language that was created with portability in mind?

Quote
second, its slow

This is one of the myths that had truthfullness before 1.2, which was before JIT was used (assuming the most popular implementations here and in the following lines -- languages per se are not fast or slow).
Java can be much faster than Python, PHP, Ruby and similar languages at the same abstraction level and no one ever complains about these language being slow. I would like you to read the highes voted answer here: https://stackoverflow.com/questions/2163411/why-did-java-have-the-reputation-of-being-slow

Of course if you compare it with the capabilities of C, Fortran or assembly, Java will be slower, but so will other languages as well that are not that low-level.
Not to mention the drawbacks that low level languages have. Most people are not able to write more efficient code with them. You might have the best tools that give the most control over the code, but if you don't know how to use them right, your can even make it worse. One example is memory management. People who are bad at that, will probably write more efficient code in a language like Java than in C.
In most cases you don't need that little performance gain you are able to get with lower level languages. What you need instead is stability, scalability, maintainability and fast development and that's where you are better off with a high level language.

Quote
its not used in hacking

You don't know what hacking is.
And even if you only look at it security related: what do you think why people look for security flaws in the language implementation? Does "Silent Java Drive By" ring the bell?
And what about reverse engineering? Or malware (like mentioned above)?
Hacking--even if only security related--is not tied to any language, any operating system, any software or any single skill. Limiting the idea of hacking to only a few of all that just limits yourself and action radius a lot. You need an open mind and creativity for hacking. Not limitations.
« Last Edit: March 09, 2014, 01:00:15 pm by Deque »

Offline Clone

  • Peasant
  • *
  • Posts: 50
  • Cookies: 2
  • Always trying to find the value of x
    • View Profile
Re: Discussion: Why do java?
« Reply #5 on: March 09, 2014, 01:26:01 pm »
first of all sorry ma'am! for  underestimating the power of java.
                                                             Point me to the best java tutorial and I will begin java.Damn! I didn't know half of the things you posted thats why I am reacting like this,... I guess your r the Java queen.
« Last Edit: March 09, 2014, 01:26:46 pm by Clone »
One who walks the line between light and dark, with no ties to either side. No morals or emotions clouding their judgment,able to accomplish tasks and solve problems in the most efficient and logical way.

Offline Deque

  • P.I.N.N.
  • Global Moderator
  • Overlord
  • *
  • Posts: 1203
  • Cookies: 518
  • Programmer, Malware Analyst
    • View Profile
Re: Discussion: Why do java?
« Reply #6 on: March 09, 2014, 08:38:21 pm »
first of all sorry ma'am! for  underestimating the power of java.
                                                             Point me to the best java tutorial and I will begin java.Damn! I didn't know half of the things you posted thats why I am reacting like this,... I guess your r the Java queen.

Uh, it really wasn't meant as advertisment for Java. Not at all. I just gave you an answer to your question.
Java still has a lot of drawbacks, but the things you named as such weren't valid ones in my opinion.
And to make one thing clear: Java is not my favourite language and I hope not the only language I am fairly good at.
I just want you to be open minded about things. There is no language that is not able to be used for hacking.
« Last Edit: March 09, 2014, 08:45:07 pm by Deque »

Offline Matriplex

  • Knight
  • **
  • Posts: 323
  • Cookies: 66
  • Java
    • View Profile
Re: Discussion: Why do java?
« Reply #7 on: March 09, 2014, 11:16:08 pm »
Deque pretty much covered it all. I'm just going to add in a weak little bit to her great explanation: It's a fun language.
\x64\x6F\x75\x65\x76\x65\x6E\x00

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Discussion: Why do java?
« Reply #8 on: March 10, 2014, 12:09:26 am »
I went through advanced Java at university, and I liked it at first. Until I found I could do the same thing with half the code in Python or Ruby.

The ONLY reason I would ever run Java is if a platform doesn't offer anything else. Android applications for example, and there's no need to use the JNI for anything high-level. The JNI is only useful for low-level access to the operating system, and you will be using C for this.

As stated above, Java's strength is portability(write once, run anywhere); however the language itself is way too verbose. You abstract so much in the language because Java is highly object-oriented. I would much rather use Python or Ruby if I can accomplish the same goal. I'll do it in roughly half the time a Java programmer would take to accomplish the same task.
My two cents.
« Last Edit: March 10, 2014, 12:09:59 am by frog »

Offline iTpHo3NiX

  • EZ's Pirate Captain
  • Administrator
  • Titan
  • *
  • Posts: 2920
  • Cookies: 328
    • View Profile
    • EvilZone
Re: Discussion: Why do java?
« Reply #9 on: March 10, 2014, 02:02:50 am »
The ONLY reason I would ever run Java is if a platform doesn't offer anything else. Android applications for example...

Android NDK (native development kit) = c++ so you don't NEED to know Java for android development
[09:27] (+lenoch) iTpHo3NiX can even manipulate me to suck dick
[09:27] (+lenoch) oh no that's voluntary
[09:27] (+lenoch) sorry

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: Discussion: Why do java?
« Reply #10 on: March 10, 2014, 02:12:54 am »
You don't need NDK either, you can write apps in HTML/CSS/JavaScript using PhoneGap.

It offers full functionality on par with the standard Android API, so it's not hindering you. For smaller apps, there's API bindings for Ruby and Python that can be used to make standalone programs.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Discussion: Why do java?
« Reply #11 on: March 10, 2014, 02:45:30 am »
Android NDK (native development kit) = c++ so you don't NEED to know Java for android development

I meant NDK when I said JNI; I forgot JNI is the bridge between Java and C.

I know you can code in Python and Ruby on Android but can you access all of the API? Probably not, as you're limited to what the Python/Ruby modules provide. Seems there's more work to be done there.

Also It would be counter-productive to use the NDK for Android apps unless you need lower-level access to the OS(things you can't access using the native Java API). That's how Android malware writers are installing local transparent SMS proxies for command and control of their remote shells. There are videos that brief Android malware dev and they always mention the NDK.

What is the scope of PhoneGap in regards to how much of the Android API it can provide?

Offline vezzy

  • Royal Highness
  • ****
  • Posts: 771
  • Cookies: 172
    • View Profile
Re: Discussion: Why do java?
« Reply #12 on: March 10, 2014, 03:01:39 am »
Full API compatibility.
Quote from: Dippy hippy
Just brushing though. I will be semi active mainly came to find a HQ botnet, like THOR or just any p2p botnet

Offline frog

  • Knight
  • **
  • Posts: 232
  • Cookies: 16
    • View Profile
Re: Discussion: Why do java?
« Reply #13 on: March 10, 2014, 03:19:23 am »
Full API compatibility.

Nice, what about Python/Ruby? Can I pack Python/Ruby script into .apk?
« Last Edit: March 10, 2014, 03:20:34 am by frog »