 |
 |
Classpath / which Dir for classes
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Aug 2001
Location: Germany
Status:
Offline
|
|
I develop an app with PB.
Now I always get an error while running the app that a
java.lang.ClassNotFoundException: myClass
How could I edit the Classpath or where should I place the myClass.java ?
I tried it in the dir of the application, but this doesn't work.
Mark
|
|
|
| |
|
|
|
 |
|
 |
|
Fresh-Faced Recruit
Join Date: Jan 2001
Status:
Offline
|
|
Originally posted by Mark Goebl:
<STRONG>I develop an app with PB.
Now I always get an error while running the app that a
java.lang.ClassNotFoundException: myClass
How could I edit the Classpath or where should I place the myClass.java ?
I tried it in the dir of the application, but this doesn't work.
Mark</STRONG>
If you're developing it in PB, then you should let it handle the location of the files if you're not sure where they go.
If this is a new project, you might just try starting a new one and pasting in what code you have. If this works, look around and take note of the file locations.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
PB is really simplistic in it's handling of files. I keep my source files in a package heirarchy under the project root just like I would in any other project, and I add them to project builder the same way - so that the package heirarchy is represented in the folder list. Of course, package declarations must jive with the directory structure and you're there. My guess is that one of a couple of things happened:
1 - You removed myClass.java from the project
2 - You renamed myClass.java to something else.
3 - You changed the package declaration within myClass.java
The solution to all of these is the same. Locate your main class, then go into the Target->Executable->Argument settings and change the class name from myClass to whatever it needs to be.
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
I have to really say, that developing java apps in PB sucks.
I am a NetBeans/Forte biggot, but I decided to give PB a fair shake.
Kids, it's like comparing a casio watch calculator to an HP 48 GX.
It's like a go-ped to a harley...
like a hang-glider to a harrier...
like a ...well, you get the point.
|
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by Kristoff:
<STRONG>It's like a go-ped to a harley...
like a hang-glider to a harrier...
like a ...well, you get the point.</STRONG>
I wouldn't go quite that far - Forte has its' advantages and disadvantages and so does PB. One of those happens to be that if you want to write Java cocoa apps PB is the only option. I have personally resorted to using Ant for builds and BBEdit for editing. Once I discovered 'open' from the command line everything fell into place...
[ 01-17-2002: Message edited by: absmiths ]
|
|
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
Do You know Netbeans/Forte has ANT support?
|
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: in front of the keyboard
Status:
Offline
|
|
Originally posted by absmiths:
<STRONG>
I have personally resorted to using Ant for builds and BBEdit for editing. Once I discovered 'open' from the command line everything fell into place...
</STRONG>
Why don't you use JADE? 
|
|
signatures are a waste of bandwidth
especially ones with political tripe in them.
|
| |
|
|
|
 |
|
 |
|
Professional Poster
Join Date: Feb 2001
Status:
Offline
|
|
Originally posted by Mark Goebl:
<STRONG>How could I edit the Classpath or where should I place the myClass.java ?</STRONG>
I don't have PB in front of me, but to edit the classpath, you go to the build options target and the classpath variable is in one of the tabs. It's one of the "Advanced" options, so it's a little hard to find.
|
|
The 4 o'clock train will be a bus.
It will depart at 20 minutes to 5.
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
Forum Rules
|
 |
 |
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is Off
|
|
|
|
|
|
 |
 |
 |
 |
|
 |
|