Home Accessibility Courses Twitter The Mouth Facebook Resources Site Map About Us Contact
 
For 2023 (and 2024 ...) - we are now fully retired from IT training.
We have made many, many friends over 25 years of teaching about Python, Tcl, Perl, PHP, Lua, Java, C and C++ - and MySQL, Linux and Solaris/SunOS too. Our training notes are now very much out of date, but due to upward compatability most of our examples remain operational and even relevant ad you are welcome to make us if them "as seen" and at your own risk.

Lisa and I (Graham) now live in what was our training centre in Melksham - happy to meet with former delegates here - but do check ahead before coming round. We are far from inactive - rather, enjoying the times that we are retired but still healthy enough in mind and body to be active!

I am also active in many other area and still look after a lot of web sites - you can find an index ((here))
Java -making sure you have the right versions

"Java is a portable language" ... "The binary .class files will work across platform". And indeed they will - within limits. I was teaching Java earlier today, using a Linux operating system on one of our delegate machines, and this evening I'm writing up examples on my backroom laptop - a system that has lots of interesting stuff (!) loaded onto it, some of which is older versions. Alas, when I compile an updated example from today, this is what I got:

  WomanWithCat:dvla_4 grahamellis$ javac Cornet.java
  warning: ./WellHouseInput.class: major version 51 is newer than 50,
  the highest major version supported by this compiler.
  It is recommended that the compiler be upgraded.
  1 warning
  WomanWithCat:dvla_4 grahamellis$


What happened?
• If you compile a class with a particular compile version, you cannot use the .class file on another system with an earlier java compiler.
• Classes should only be run on systems witha JVM at least of the level of the compiler you have used.

In my case, I had tripped over the first of these - copying our training class WellHouseReader as a .class file as well as a .java file from my up-to-date delegate machine to my more mature backroom system. And the compiler grabbed that .class file to check my compile against, and grumbled.

Since I have all the source of the examples and my classes with me, the solution was simple - delete the .class files from the more recent compile and let my local java compile regererate them.

  WomanWithCat:dvla_4 grahamellis$ rm *.class
  WomanWithCat:dvla_4 grahamellis$ javac Cornet.java
  WomanWithCat:dvla_4 grahamellis$


Whilst I need to update my Java on my own machine, it's not wise for me to do so via a mobile phone link tonight!




On all of our courses, we set exercises for delegates to try out to cement what we've taught. Sample answers are available on our web site for them to look back to after the course. From time to time, we'll update the examples and that's what I'm doing this evening - with some very early examples of array handling.

Sources updated:
Flute.java - [here]
Cornet.java - [here]
(written 2015-02-02, updated 2015-02-04)

 
Associated topics are indexed as below, or enter http://melksh.am/nnnn for individual articles
A502 - Web Application Deployment - Java - Basic Tools
  [754] tar, jar, war, ear, sar files - (2006-06-10)
  [1082] Straight from the .jar - (2007-02-16)
  [1192] What are WEB-INF and META-INF directories? - (2007-05-18)
  [1562] Java Compiler - needs all classes, compiles them all too - (2008-03-03)
  [1771] More HowTo diagrams - MySQL, Tomcat and Java - (2008-08-24)
  [1909] javax.servlet cannot be resolved - how to solve - (2008-11-26)
  [2153] Class Loading and Variable Conversion in Java - (2009-05-02)
  [2422] Looking inside Java classes - javap and javadoc - (2009-09-25)
  [2859] Using java, javac, jar, and CLASSPATH - a simple example - (2010-07-07)
  [3151] Disassembling Python and Java - previously compiled code - (2011-01-29)
  [3819] Packing a tar, jar or war file - best practise - (2012-07-26)

J050 - Java - General
  [2087] Comparing Java Courses - what can we do? - (2009-03-17)
  [2091] C, C++ and C# ... Java and JavaScript - (2009-03-20)
  [2114] Which Version of Java am I running? - (2009-04-02)
  [2417] Java Programming Fundamentals - (2009-09-24)
  [2420] Exceptions in Java - why and how - (2009-09-24)
  [2504] Learning to program in ... - (2009-11-15)
  [2861] MySQL and Java - connectivity past, present, and future thoughts - (2010-07-09)
  [3573] New in Java 7 - and why we are not running public Java 7 courses - (2012-01-08)
  [4305] Learning to program in Java - yes, we can help. - (2014-09-26)
  [4317] Java - an update of the basics - (2014-11-16)
  [4430] The spirit of Java - delegating to classes - (2015-02-18)


Back to
Location, location location. And a chance of a giggle!
Previous and next
or
Horse's mouth home
Forward to
Binomial Coefficient (Pascal Triangle) objects in Java
Some other Articles
Challenging the IT course business model
Buffet review - taking the price into account
Java - converting an integer to a fixed length string
Binomial Coefficient (Pascal Triangle) objects in Java
Java -making sure you have the right versions
Location, location location. And a chance of a giggle!
A good example of recursion - a real use in Python
Setting up and using a dict in Python - simple first example
Additional Python courses added to our schedule
Python - even named code blocks are objects
4759 posts, page by page
Link to page ... 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 95, 96 at 50 posts per page


This is a page archived from The Horse's Mouth at http://www.wellho.net/horse/ - the diary and writings of Graham Ellis. Every attempt was made to provide current information at the time the page was written, but things do move forward in our business - new software releases, price changes, new techniques. Please check back via our main site for current courses, prices, versions, etc - any mention of a price in "The Horse's Mouth" cannot be taken as an offer to supply at that price.

Link to Ezine home page (for reading).
Link to Blogging home page (to add comments).

You can Add a comment or ranking to this page

© WELL HOUSE CONSULTANTS LTD., 2024: 48 Spa Road • Melksham, Wiltshire • United Kingdom • SN12 7NY
PH: 01144 1225 708225 • EMAIL: info@wellho.net • WEB: http://www.wellho.net • SKYPE: wellho

PAGE: http://www.wellho.info/mouth/4412_Jav ... sions.html • PAGE BUILT: Sun Oct 11 16:07:41 2020 • BUILD SYSTEM: JelliaJamb