Who needs JDK 1.2.2 API support?

A discussion forum for JFreeChart (a 2D chart library for the Java platform).
david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Who needs JDK 1.2.2 API support?

Post by david.gilbert » Wed Nov 23, 2005 5:20 pm

JFreeChart requires JDK 1.2.2 or later to run, but a bug that I'd like to fix (concerning access to the listeners registered with a ChartPanel) requires the use of a method from JDK 1.3. So I'm considering dropping support for JDK 1.2.2 and requiring JDK 1.3 or later. I don't think that will bother anyone, but I'm asking just in case. Does anyone need JDK 1.2.2 support?
Last edited by david.gilbert on Thu Dec 01, 2005 12:58 pm, edited 1 time in total.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Fri Nov 25, 2005 3:19 pm

Update: I've decided to make JDK 1.3 the minimum requirement going forward as I don't think there is anyone that still needs JDK 1.2.2 support.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

mhilpert
Posts: 497
Joined: Wed Apr 02, 2003 1:57 pm
Location: Germany

Post by mhilpert » Mon Nov 28, 2005 11:15 am

I would have prefered 1.5 but I strongly encourage you to use at least 1.4 instead of 1.3 now that you make a change of the JVM requirement. 1.4 is out long enough for most people to have it.
Java 11, JFreeChart 1.0.15, JFreeSVG 4.0

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Nov 28, 2005 12:11 pm

There would be many complaints if JFreeChart did require JDK 1.5. We could probably get away with 1.4, but since there is no compelling need yet I'm happy to leave the requirement at JDK 1.3 for the 1.0.x series of JFreeChart.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Guest

Post by Guest » Mon Nov 28, 2005 4:48 pm

Of course I understand that 1.5 is still a bit new. But the change of the JRE requirement should be used to advance further than just the minimum requierement to fix 1 bug. In case you find something else that works with 1.4 you would bite yourself not to have made the bigger step. Why not post a polling where the users can vote for the JRE requierement. Then you will see what versions your user base is running JFreeChart on.

You find some of the benefits using 1.4 in favour of 1.3 here:

Summary of New Features and Enhancements

Some of them that JFreeChart might benefit from are:

* XML API
* enhanced Java 2D with considerably higher performance
* Logging API
* Print Service API
* Collections enhancements (e.g. rotate)
* regular expressions

mhilpert
Posts: 497
Joined: Wed Apr 02, 2003 1:57 pm
Location: Germany

J2SE 1.3.1 end of life

Post by mhilpert » Mon Nov 28, 2005 4:51 pm

Other than that:

J2SE 1.3.1 has begun the Sun End of Life (EOL) process. The EOL transition period is from Oct 25, 2004 until March 30, 2006. With this notice, customers should now begin to move to current product versions.

During the EOL transition period, the products will be supported as per existing customer support agreements. After this period, these products will no longer be supported by Sun.


Source: J2SE 1.3
Java 11, JFreeChart 1.0.15, JFreeSVG 4.0

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Mon Nov 28, 2005 5:47 pm

I'm deliberately being conservative about the JDK requirement, in part to minimise the effort required to get JFreeChart running on alternative runtimes such as those based on GNU Classpath. It is rumoured to be switching over to a Cairo-based Graphics2D implementation soon, and I'm looking forward to seeing how well that works.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Mon Nov 28, 2005 5:47 pm

JDK 1.4 did not add anything to the API that was so new and great that it encourages switching:

* XML API
JAXP is old and stable and not dependend on JDK 1.4. With JDK 1.4 this API has moved into the standard API set - before that it was an extension API.

* enhanced Java 2D with considerably higher performance
If you run JDK 1.2 programms on JDK 1.4 the performance is automaticly increased. The improved the implementation, but the API is still the same.

* Logging API
The logging framework in JCommon allows to implement a JDK 1.4 log target. JFreeReport has one implemented.

* Print Service API
For Components, which should be printed, that API does not add anything new. Implementing the Printable interface is enough to support printing. The API, however, is great if you want to control printing or have to initialize it specificly. As this is part of the application domain, JFreeChart is not much affected of that.

* Collections enhancements (e.g. rotate)
The base collections are implemented since JDK 1.2. New utility methods are surely helpfull, but surely no reason to switch. When it comes to performance critical code, dropping collections altogether and switching to Arrays speeds up things greatly.

* regular expressions
Once again. Great for general development, but JFreeChart does not use regular expressions. The datasets are not text based.


I prefer to keep barriers low - especially when this does not cause huge trouble. As long as Java is backward compatible, users are free to use any newer JDK for their development - but all these users who cant switch (for whatever reasons) will be thankfull to get JFreeChart running on their systems.

Regards,
Thomas

mhilpert
Posts: 497
Joined: Wed Apr 02, 2003 1:57 pm
Location: Germany

Post by mhilpert » Wed Nov 30, 2005 1:30 pm

Taqua wrote: I prefer to keep barriers low - especially when this does not cause huge trouble. As long as Java is backward compatible, users are free to use any newer JDK for their development - but all these users who cant switch (for whatever reasons) will be thankfull to get JFreeChart running on their systems.

Regards,
Thomas
All users who can't switch won't be able to run JFreeChart. So they have to switch and it's no difference to download version 1.3 or 1.4. They probably will have more trouble to find a 1.3 Version ...
Java 11, JFreeChart 1.0.15, JFreeSVG 4.0

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Nov 30, 2005 1:43 pm

mhilpert wrote:All users who can't switch won't be able to run JFreeChart. So they have to switch and it's no difference to download version 1.3 or 1.4. They probably will have more trouble to find a 1.3 Version ...
I don't understand what you mean by that? No-one has to find JDK 1.3 to run JFreeChart, you can use the latest JDK 1.5 (or 1.4). But I know that some companies are still running tried-and-tested systems on JDK 1.3, and see no reason to exclude them from using JFreeChart.
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

kianfatt1982
Posts: 21
Joined: Fri Sep 30, 2005 4:00 am
Location: Malaysia
Contact:

JRE 1.3 cant suport JFreeChart 1.0

Post by kianfatt1982 » Wed Dec 14, 2005 8:54 am

Dear Gilbert,

As I have a developement environment of JRE 1.4, I have no problems running the programs, but once I port my class files over to my customers environment the problem comes in.

Becuase the JRE on the customer's site is 1.3, the snippet of my codes that caused the error are as listed below :_

Code: Select all

	private JFreeChart createChart(CategoryDataset categorydataset, String strProfileDesc) throws Exception{
		logger.debug("[createChart] -> Start");
		JFreeChart objFreeChart = null;
		NumberAxis objNumAxis   = null;
		CategoryPlot objCatPlot = null;
		CategoryAxis objCategoryAxis 	= null;

		try{
			objFreeChart =	ChartFactory.createLineChart(strProfileDesc,"Time Series","YTM",categorydataset, PlotOrientation.VERTICAL,true,	true, false);
			objCatPlot = objFreeChart.getCategoryPlot();
			objNumAxis = (NumberAxis)objCatPlot.getRangeAxis();
			
			objFreeChart.setBackgroundPaint(Color.white);
			objNumAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
			objNumAxis.setAutoRangeIncludesZero(true);

			objNumAxis.setUpperMargin(0.05);
			objNumAxis.setLowerMargin(0.05);
			objNumAxis.setLabelAngle(1.5707963267948966D);
			logger.debug("Untill Here Ok  !!!!");
			objCategoryAxis = objCatPlot.getDomainAxis();
			objCategoryAxis.setUpperMargin(0.05);
			objCategoryAxis.setLowerMargin(0.05);
			objCategoryAxis.setTickLabelFont(new Font("SansSerif",0,6));
			
			// Set Plot Area Color
			objCatPlot.setBackgroundPaint(Color.lightGray);//new Color(238, 238, 255));
			objCatPlot.setDomainGridlinePaint(Color.white); // Vertical Grid Line
			objCatPlot.setRangeGridlinePaint(Color.white); // Horizontal Grid Line
			
			// Show Graph Grid lines
			objCatPlot.setDomainGridlinesVisible(true);
			objNumAxis.setAxisLineVisible(true);
			
			// To Get The Dot Marks On The Line
			LineAndShapeRenderer lineandshaperenderer = (LineAndShapeRenderer)objCatPlot.getRenderer();
			lineandshaperenderer.setShapesVisible(true);
		    lineandshaperenderer.setDrawOutlines(true);
			//lineandshaperenderer.setUseFillPaint(true);
			//lineandshaperenderer.setFillPaint(Color.red);  
			
			// To get value label mraks on the Dot    
			lineandshaperenderer.setItemLabelsVisible(true);
			lineandshaperenderer.setItemLabelGenerator(new StandardCategoryItemLabelGenerator());        
            
			// Set lable of Axis X to display vertically 
			objNumAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());					
			objCategoryAxis = (CategoryAxis) objCatPlot.getDomainAxis();
			objCategoryAxis.setCategoryLabelPositions(CategoryLabelPositions.UP_45);
			
			logger.debug("Font = "+objCategoryAxis.getTickLabelFont());	
		}catch(Exception e){
			logger.error("[createChart]",e);
			throw e;	
		}
		return objFreeChart;
	}
Please advise ? I am in a crisis now....
Ting Kian Fatt
(Software Engineer)
kianfatt1982@gmail.com

kianfatt1982
Posts: 21
Joined: Fri Sep 30, 2005 4:00 am
Location: Malaysia
Contact:

The problem is JRE 1.3 does not support JFreeChart 1.0

Post by kianfatt1982 » Wed Dec 14, 2005 8:57 am

I came to this conclusion is because, I cant capture any exception at the try catch block in the codes above, the error must have had been caught in the one of the class file in the JFreeChart 1.0 apit.
Ting Kian Fatt
(Software Engineer)
kianfatt1982@gmail.com

kianfatt1982
Posts: 21
Joined: Fri Sep 30, 2005 4:00 am
Location: Malaysia
Contact:

CategoryAxis class is not supported by JRE 1.3

Post by kianfatt1982 » Wed Dec 14, 2005 9:00 am

I later had found out that, it is the CategoryAxis class that is the culprit of the exception, because, then I try to refer to this class the program will halt and Exception would be thrown, but what exception it is I dont know, cause the exception is not thrown out by the JFreeChart 1.0 API
Ting Kian Fatt
(Software Engineer)
kianfatt1982@gmail.com

Taqua
JFreeReport Project Leader
Posts: 698
Joined: Fri Mar 14, 2003 3:34 pm
Contact:

Post by Taqua » Wed Dec 14, 2005 11:25 am

Hi,

as Sun, as often when doing major releases, changed the class-file format, you have to recompile with a JDK 1.3 compiler. You most likely get 'ClassVersionNotSupportedExceptions', but that's hard to tell without any error messages posted.

Regards,
Thomas

david.gilbert
JFreeChart Project Leader
Posts: 11734
Joined: Fri Mar 14, 2003 10:29 am
antibot: No, of course not.
Contact:

Post by david.gilbert » Wed Dec 14, 2005 11:37 am

I can think of two possibilities here:

(1) The "headless" Java problem often shows up as a class not found error in the CategoryAxis class - see item 10 in the FAQ:

http://www.jfree.org/phpBB2/viewtopic.php?t=8420

(2) There is a minor problem in the 1.0.0 release that prevents compilation with JDK1.3, this will be fixed in the next release:

http://cvs.sourceforge.net/viewcvs.py/j ... 2=1.13.2.8

(the changes shown include a lot of reformatting, the fix is just changing Color.BLACK --> Color.black).
David Gilbert
JFreeChart Project Leader

:idea: Read my blog
:idea: Support JFree via the Github sponsorship program

Locked