 |
 |
Java tool help (my assignment is due soon!)
|
 |
|
 |
|
Forum Regular
Join Date: May 2001
Location: Brisbane
Status:
Offline
|
|
I have been doing a first year java subject this semester (my first taste of programming), but this problem has never been a serious issue until now (class files in project builder - java tool)
Normally, our assignments have several java files that need to be modified/completed. There is also normally a bunch of class files that are included as a demo to show what the final project is supposed to look like.
I have never been able to figure out how to run the class files, but that has never affected my ability to complete the java files (its all been pretty basic so far)
Problem - My final assignment includes a class file that has been completed for us, but when I try to run the main.java, PB says it can't find the destination its looking for.
Any ideas?
Thanks in advance
|
|
The Duke
|
| |
|
|
|
 |
|
 |
|
Mac Elite
Join Date: Sep 2000
Location: Edmond, OK USA
Status:
Offline
|
|
Originally posted by Il Duce:
I have been doing a first year java subject this semester (my first taste of programming), but this problem has never been a serious issue until now (class files in project builder - java tool)
Normally, our assignments have several java files that need to be modified/completed. There is also normally a bunch of class files that are included as a demo to show what the final project is supposed to look like.
I have never been able to figure out how to run the class files, but that has never affected my ability to complete the java files (its all been pretty basic so far)
Problem - My final assignment includes a class file that has been completed for us, but when I try to run the main.java, PB says it can't find the destination its looking for.
Any ideas?
Thanks in advance
I might be able to help, but am kind of confused about the description. For this final assignment, is the completed file a .class file or a class in a .java file (you mentioned a completed class file but that doesn't make sense)? Second, can you compile your main.java and can't run it, or is the problem with compiling it?
If your instructor gives you class files, probably the easiest way to use Project Builder is to jar them up, then use Add Framework to add the jar file to the project - I don't think PB will use a directory of classes (You might be able to do that explicitly in the settings panels).
An alternative is to use a simple ant build script that will compile the classes and you can still use PB for editing (using 'open' from the terminal). If you don't know ant, I can write a simple build.xml script that will make it easier.
(Last edited by absmiths; Oct 17, 2002 at 09:16 AM.
)
|
|
|
| |
|
|
|
 |
|
 |
|
Forum Regular
Join Date: Oct 2002
Location: Left Coast
Status:
Offline
|
|
Without seeing your actual setup...
Are you trying to add the .class files directly to PB or are you trying to launch your supplied .class files from the command line (i.e. from a terminal)?
If you are trying to get PB to launch them you have to tell PB the name of the class that contains the main() function of the class.
If you are trying to launch them from the command line you have to make sure the .class file is defined in the classpath.
A bit more info about exactly what you are doing would help.
|
|
|
| |
|
|
|
 |
 |
|
 |
|
|
|
|
|

|
|
 |
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
|
|
|
|
|
|
 |
 |
 |
 |
|
 |