[Bluej-discuss] netbeans

Jobling C.P. C.P.Jobling at swansea.ac.uk
Thu Aug 31 17:49:20 BST 2006


I think you may be better off opening the BlueJ project in netbeans rather
than copy and paste from BlueJ code editor. There's nothing special about a
BlueJ project apart from a couple of extra files that it keeps for the
purposes of class diagram layout and the user interface components. It's
just a folder. Netbeans also uses a folder as the container for a project:
it will only care about the *.java files and will ignore the *.ctxt files
and the BlueJ project file. 

I don't have a copy of Netbeans to hand, but I imagine that there is an
"import" option in the new project menu (or somewhere) that will allow you
to pull the contents of a BlueJ project (which will be a folder) into a
netbeans project. (This may produce a copy of the original project)

Furthermore, if you're using Netbeans 5 BlueJ Edition it is designed to open
a BlueJ project directly (here's a quote from the page at
http://www.bluej.org/netbeans/tutorial/index.html:

  "NetBeans IDE 5.0 BlueJ Edition is a variant of standard NetBeans, with
two significant differences:

    * It can open, work with and create BlueJ projects.
    * The standard NetBeans interface has been simplified.") so there's
probably a menu item that allows you to open a BlueJ project. 

In fact the documentation states that Netbeans 5 BlueJ Edition uses the same
folder, so you can switch back an forth between Netbeans and BlueJ!

If you have any libraries in your BlueJ project (e.g. external *.jar files),
they will have to be attached to your netbeans project's "classpath" as
project properties. Again, Netbeans BlueJ Edition may pick up the
information it needs from the BlueJ project file and BlueJ preferences to do
this for you automatically.

Hope this helps.

Chris

Dr Chris P. Jobling [C.P.Jobling at Swansea.ac.uk] 
School of Engineering
University of Wales Swansea, Singleton park, Swansea SA2 8PP, UK.
Tel: +44 1792 295580; Fax: +44 1792 295676
WWW: www.engineering.swan.ac.uk

 

> -----Original Message-----
> From: caramail [mailto:d2i at caramailmax.com] 
> Sent: Thursday, August 31, 2006 3:17 PM
> To: Jobling C.P.
> Subject: Re: [Bluej-discuss] netbeans
> 
> the problem occured with the IDE (netbeans alone) and the 
> bluej/Netbeans IDE the same way
> 
> 	----- Original Message ----- 
> 	From: Jobling C.P. <mailto:C.P.Jobling at swansea.ac.uk>  
> 	To: 'caramail' <mailto:d2i at caramailmax.com>  ; 'General 
> discussion for users of BlueJ' <mailto:bluej-discuss at bluej.org>  
> 	Sent: Thursday, August 31, 2006 3:44 PM
> 	Subject: RE: [Bluej-discuss] netbeans
> 
> 	It sounds like your IDE creates a new unnamed 
> source-code file (presumably called *.java) when you open a 
> new class window. You need to save it as Classname.java 
> (where Classname is the same as the name of the class [as 
> stated in the statement: class Classname { } in the code 
> editor]) before you attempted to compile it. 
> 	 
> 	In BlueJ when you create a new class, it produces the 
> correct compilation unit file automatically (essentially the 
> source code file).
> 	 
> 	If you are using netbeans, a better alternative might 
> be to use the "new project wizard" to open the BlueJ project 
> directory inside netbeans and you should then have complete 
> access to the Java source files. Also, you might like to try 
> the "BlueJ version of Netbeans" mentioned in this mailing 
> list and on the BlueJ.org website. I haven't tried it myself 
> but it is designed to be an intermdeiate stage between BlueJ 
> and the full-blown netbeans IDE.
> 	 
> 	Good luck
> 	 
> 	Chris
> 	 
> 
> 	Dr Chris P. Jobling [C.P.Jobling at Swansea.ac.uk] 
> 
> 	School of Engineering
> 	University of Wales Swansea, Singleton park, Swansea 
> SA2 8PP, UK.
> 
> 	Tel: +44 1792 295580; Fax: +44 1792 295676
> 
> 	WWW: www.engineering.swan.ac.uk 
> <http://www-ee.swan.ac.uk/DeptEEE/People/cv/cpj.html> 
> 
> 	 
> 
> 	 
> 
> 
> ________________________________
> 
> 		From: bluej-discuss-bounces at bluej.org 
> [mailto:bluej-discuss-bounces at bluej.org] On Behalf Of caramail
> 		Sent: Monday, August 28, 2006 2:37 PM
> 		To: bluej-discuss at bluej.org
> 		Subject: [Bluej-discuss] netbeans
> 		
> 		
> 		i have written a little program which works 
> very well if i use Bluej, if i copy and paste this program in 
> netbeans/bluej impossible to compile: error message class * 
> is public should be declared in a file named *.java. How to do that?
> 
> 


More information about the bluej-discuss mailing list