• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

How to do interesting personal stuff using Java

 
Ranch Hand
Posts: 649
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ranchers,
Daily I saw the python and javascript programs doing some interesting stuffs for making their life easy. Like, making extension for crome, having some popup notification for live updates on games, etc etc.
Can I do such stuffs using java or do i need to learn python/JS for them ?
If yes, then how to code such stuffs using java?

Thanks
 
Saloon Keeper
Posts: 6589
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
In the past my personal projects have tended to be standalone Swing apps, but more recently they're mostly Java web apps, since I have always Tomcat running. So the apps are always accessible with no startup time, and can do things in the background if necessary.

So while you can't write browser extensions in Java, you can do many other interesting things.
 
Ranch Hand
Posts: 182
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Well, the basic difference between JavaScript/Python and Java is that the first one is interpreted language whereas the latter one is compiled.

So its very easy to add support for interpreted languages out of box due to less complexity and JavaScript being the standard (not based on ECMAScript), you will find many browsers supporting it.

For java, one point in time (around 2003-09), people were making lot of interesting stuff in Applet which is HTML embedded client side java class. But then there was client dependency of installing JRE. So it was thick but bulky client. Now when JavaScript itself is being enriched with tons of frameworks like jQuery, AngularJS, Node3JS, etc. even Adobe flash is in the downtrend.

Also interesting person stuff can have many diffent connotations... for example, i keep doing many personal things in Excel!

About learning, JavaScript has derived much of its syntax from Java (and its name also!), so for Java person, it should be very easy to learn JavaScript and eventually you will understand the subtle differences.

All the best for your stint!
 
Tim Moores
Saloon Keeper
Posts: 6589
160
Android Mac OS X Firefox Browser VI Editor Tomcat Server Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

manoj r patil wrote:Well, the basic difference between JavaScript/Python and Java is that the first one is interpreted language whereas the latter one is compiled.


I think in the context of personal projects it is more important where the code can run. JavaScript generally implies web apps or more specialized areas such as browser extensions, whereas Java code can run in the browser (applets or WebStart apps, both not recommended any more) or desktop (using Swing or JavaFX) or web apps. Python code could be part of either desktop or web apps.
 
Puspender Tanwar
Ranch Hand
Posts: 649
2
Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Manoj
Thanks Tim

Tim Moores wrote:So while you can't write browser extensions in Java, you can do many other interesting things.


Like what ?
 
Master Rancher
Posts: 3921
36
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

other interesting things

Like what ?


What else do you use your computer for (besides using a browser)?  I've written lots of tools in java for different projects on my PC.
For example I'm working on a bridge game program that can save played hands in files.  I have several utilities to search and order those files as needed.
Another example is a search program that reads text files and creates an html page of found files.
Another example is a program that reads the html file from the search program and calls a specified program to open the file listed in the html page.
NOTE: Some of these programs are over 10 years old, written long before current versions of standard utilities had the capabilities.
Another program does a backup of source files as needed according to filtering parameters.
Another program will load and execute other java programs in the same JVM as the starting program.  When java was soooo slow, having a running JVM made loading a new program faster.
A program to do bulk renames as per filters and parameters.
A slideshow program - this ported nicely to Android so slideshows created on my PC  can be copied to my tablet
A waypoint library program - this was ported to Android so routes and waypoints can be copied back and forth
A jarfile class file checker - scans class files in a jar to be sure all referenced classes are present and that there aren't any class files that aren't used. I manually create jar files with a batch file. No IDE
 
Bartender
Posts: 7298
65
Eclipse IDE Firefox Browser MySQL Database VI Editor Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Off the top of my head, some of my projects are:

  • Read the first tab of a spreadsheet and present a row as a form. Allows searching. Some day edit spreadsheet entry via form. (Swing,POI)
  • Download images and videos from camera chips with my particular naming conventions. (Swing)
  • Track and plot my investments. (Swing,JFreeChart)
  • A file search utility similar to UNIX "find" command. (Command line)
  • Duplicate file finder with optional deletion. (Swing)
  • File renaming based on regular expressions. (Swing)
  • Web site polling to notify me of changes. (Command line, JSoup)
  • A code generator for any MySQL database. Gets column specs by querying database then generates DAO and CRUD java code to be included in other projects. (Command line)
  • Various games: Life, Qwirkle, Mines, Mandelbrot, Sudoku. (Swing)
  • Image slide show with two scrolling rows of rescaled images. (Swing)
  • Graphics: Some programs to generate POV-RAY modeling files for later rendering by POV-RAY. (Command line)
  • Clock widget. (Swing)

  • Some of these I could have downloaded a program for but for various reasons I decided to re-invent the wheel. This gave me ultimate control to get something exactly the way I wanted it, and to be able to add features later. As always, these are great opportunities to learn something new.

    [Edit:] A program to parse Oracle's Java API Javadocs, break class names into pieces base on camel case conventions, then create an extended index in HTML, and lastly, re-insert the index into a downloaded copy of the javadocs. This was very handy for finding things buried in the docs.

    Example of part of the index. In the actual index these were hyperlinks.


     
    Puspender Tanwar
    Ranch Hand
    Posts: 649
    2
    Java
    • Mark post as helpful
    • send pies
    • Quote
    • Report post to moderator
    Thank you all for your suggestions
    Norm & Carey, these are good stuffs I can work on. Thanks
     
    Fire me boy! Cool, soothing, shameless self promotion:
    Thread Boost feature
    https://coderanch.com/t/674455/Thread-Boost-feature
      Bookmark Topic Watch Topic
    • New Topic