|
Author |
Topic: Processing java classes not in proper package (Read 721 times) |
|
oneyoon
|
Processing java classes not in proper package
« on: Feb 21st, 2004, 3:22am » |
|
Processing is great, and I would love to use the java libraries but having the java classes like BApplet, etc. live in the default package space (as in NO package) is a big problem. You would have to refactor all the classes to at least have a package like "package org.processing;" If you're using the Jikes compiler, you can get away with the current situation, but if you use Sun's or Borland's then you'll get this problem: http://developer.java.sun.com/developer/bugParade/bugs/4361575.html It's actually illegal to reference classes in the default package from within a class that does have an explicit package declaration. As in: "package com.foo; import BApplet; class MyAnimation extends BApplet{ ... } " This will not compile with standard comiplers. Leaving out the "package" line will let you compile. Sun's compiler was actually lax until ver. 1.4, and for inexplicable reasons they decided to enforce the spec. A lot of people are pissed. So, in JBuilder, which I use, the only way I can use Processing is through classes that have no package declared which will get messy really quick. Either that or use the jikes compiler which I haven't tried yet. Anyways, it seems to make sense to have Processing conform to the "proper" standards especially for the long term and to prevent name collisions with other rogue libraries. Hope you can fix this Danny
|
|
|
|
fry
|
Re: Processing java classes not in proper package
« Reply #1 on: Feb 21st, 2004, 7:46pm » |
|
bagel will soon become a package named processing.core. this will happen with the uber-release (presumably 69, though we may have another smaller release so it would be in 70) that includes multiple files and whatnot. the shift has already been made but there's still a lot of work to be done before that release is usable.
|
|
|
|
kevinP
|
Re: Processing java classes not in proper package
« Reply #2 on: Jun 12th, 2004, 1:46am » |
|
on Feb 21st, 2004, 7:46pm, fry wrote:bagel will soon become a package named processing.core |
| Not that I care one way or the other, but being curious, why not "org.processing" Or does the nature of the beast (standalone application) make it even more than unlikely that there might ever be another package with the same name
|
Kevin Pfeiffer
|
|
|
|