12-05-2008 03:50 PM
I don't have, nor do I want, the Eclipse editor. But I am interested in doing some development for the BlackBerry Storm. So I've downloaded the JDE Beta 4.70, and also the Getting Started document. As I opened everything up, and was hoping to follow the directions explicitly, I realized the Getting Started document specifically covers the Eclipse editor, and only that editor.
Ok, so I've tried to fumble my way through it, but there's some disconnects in the guide and using the JDE. For example, in the document on page 12 there is the following text:
The .java source file name must match the name of the public class or interface in the file. It must also be located in a folder structure that matches its package name.
For example, if the workspace file is C:\name\ws.jdw and it contains a com.mycompany.MyClass class, then you must name the project (.java) source file MyClass.java, and store it in C:\name\com\mycompany\MyClass.java.
Why would the workspace contain this file to begin with if I'm creatign a new project? If there's already a file in there with a .class extension, you can't very well create a .java file for it, because the .java is the uncompiled source code, and the .class is the compiled .java file.
So I'm a bit confused here...
Also in the JDE, a the package statement has nothing behind it, it merely shows package ; Am I supposed to put something there, and if so, what?
It's be nice if this JDE had some BlackBerry project templates with all the specific imports, properties set, etc... But at the very least, I'd like to see a Getting Started guide that was specific for the JDE I'm using, as opposed to the environemnt I'm not using (i.e. Eclipse).
For the record, I'm not a java developer normally. I have done C, C++, Delphi, and C# code professionally for over 12 years, so am not a complete noob when it comes to development. But this is the first time I've thought about dabbling in the Java arena, I've always avoided it like the plauge before. Unfortunately, due to my desire to experiment with custom Stom applications, I guess I have to jump into the Java pool.
12-09-2008 12:43 PM
In the paragraph you quote, the class name it refers to is the name of the class you are creating. Meaning if you want to create a class called "MyClass" its source file name should be MyClass.java.
The package name should match the directory structure of the source files. The isn't enforced by the BlackBerry JDE, but some IDEs do. Classes in the same package can reference each other without requiring import statements.