Hacker News new | past | comments | ask | show | jobs | submit login
Free Interactive Java Tutorial (learnjavaonline.org)
81 points by ronreiter on March 9, 2013 | hide | past | favorite | 16 comments



The jobs section claims:

"Our website has over 50,000 monthly hits - programmers from all around the world visit LearnJavaOnline.org to increase their professional programming expertise in the Java programming language."

However, I notice that the domain was registered very recently (on 19-Feb-2013) and there are hardly 15 tutorials on the site and most of these pages are blank.

Edit: looks like this site is just using a template. Please see the OP's response to this comment.


Sorry, my fault. I replicated http://www.learnpython.org and I forgot that I wrote that there.


BTW, do you have permission to use the Python and Java logos?


As it says here, I think that I can't use it if it's the logo.

http://www.oracle.com/us/legal/third-party-trademarks/index....

The question is, when is it considered to be part of the logo, and how can I change it so that it complies, if I need to do so?

As for Python, yes.


They are probably counting their monthly hits on http://www.learnpython.org/ and http://www.learn-c.org/ ( http://www.learnjavaonline.org/static/img/code.jpg style reflect the adaptation from their python website)

« By running real Java code directly from the web browser, students are able to try out Java without installing it. » their "directly from web browser" solution is using http://learnpythonjail.appspot.com/ so I wonder if it's using jython to interpret the java code.


The code engine used is a paid API service - http://www.ideone.com/api.

My Python website (http://www.learnpython.org) uses Google App Engine's eval (which is pretty safe, since Google secures the environment).


The .appspot.com subdomain tells us his site runs on Google App Engine.

Now, as it happens, I have some experience trying to get Java to compile and run on Google App Engine. Actually, at the outset I thought it was impossible because of the way the sandboxing works on App Engine (writes to the file system are disallowed and the javax.tools. package is not part of their white list). So straightforward approaches such as invoking the Java compiler from code will not work.

Here are various approaches that I have tried and the results:

1. Use Beanshell and approximate Java:

Beanshell is a scripting language for the JVM with Java like syntax. It also has a "strict" mode where it will behave like a strongly typed language.

Pros: you can run this on App Engine and can trust Google Engineers to worry about security of their sandbox. You also get the scalability of App Engine.

Cons: It is not really Java and language features like Generics are not supported. The error messages are also not as useful as what the regular Java compiler outputs.

2. Get users to compile code on their own machines and upload the .class file. Then write a class loader that will load this class and then execute whatever method you need to.

Pros: Works perfectly and no language issues.

Cons: The interactivity is lost to an extent. Also, beginners need to start worrying about installing Java and configuring CLASSPATH etc. from get go.

3. Use an in-memory compiler like Janino. Pros: Works like the Java compiler and error messages are useful.

Cons: it does not support generics and it also does not support other features like the for(String value : values) {} syntax.

4. Use Google App Engine as the front-end and then run a compiler-as-a-service somewhere else (Linode etc.).

Pros: Full language and you are in control.

Cons: You better know how to sandbox the code (chroot / SecurityManager etc).

5. Use Google App Engine as a front-end and outsource compilation and execution to some other service like Ideone.

Pros: Full language support and someone else worries about security issues.

Cons: Expensive (the Ideone API only allows 1000 free submissions per month).

If you know some other method, please let me know. I love trying to see how to make things work on App Engine (I learn quite a bit this way).

(minor edits)


It's an honest mistake with the job section. Check out http://www.learnpython.org/ There he does have more than 50,000 monthly visitors. I'm sure he just copied the page and didn't notice.


A number of the pages don't exist or work when clicked on. Seems pretty poorly coded.


We're still working on the advanced tutorials.


Is there something similar for Android programming?


I'd recommend the sample projects from google & just having a muck around. Learning the debugger in eclipse is also a very useful tool for understanding what's going on.


?? Could you elaborate a little more? Thanks.

EDIT: OK, I now noticed you were replying to a sub-comment and not the main thread (missed that earlier). Still, a link or two be helpful in directing the rest of us to the 'source'.



I jumped head first into Android and learned both Java and Android at the same time. It's doable, if you know something like C or C++ already.


Programr has some things for Android: http://www.programr.com/zone/android




Consider applying for YC's Summer 2025 batch! Applications are open till May 13

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: