Welcome to the MacNN Forums.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

You are here: MacNN Forums > Software - Troubleshooting and Discussion > Developer Center > java-project in project builder - some newbie questions

java-project in project builder - some newbie questions
Thread Tools
Junior Member
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 29, 2001, 01:12 AM
 
hi

i've imported a complete project in the apple project builder by adding all .java- files in a group(folder). my problem is to get this thing to run. therefor a few questions.

- how can i choose the starting class. the class, in which the project builder shall start the program?
- do i need to make some preferences in my project builder, that it finds the defined packages for import in other .java-files?
- the adding function offers some more options which are 1.copy items into destination group's folder (if needed) 2. reference style 3. recursively create groups ... 4. create folder references .... -> do - and if: how - this options influence the build-process and other things?

thx to all. greets,
granny
grannysmith
     
Fresh-Faced Recruit
Join Date: Feb 2001
Location: Canada
Status: Offline
Reply With Quote
May 29, 2001, 12:02 PM
 
how can i choose the starting class. the class, in which the project builder shall start the program?
In the MRJApp.properties file, open it, and where it says "com.apple.mrj.application.main =", should be the first line. After the equals sign, type out the class name that contains the main method. ie:Controller.java, the line should read com.apple.mrj.application.main = Controller

that's the only question i can answer.

     
Fresh-Faced Recruit
Join Date: Feb 2001
Location: Canada
Status: Offline
Reply With Quote
May 29, 2001, 12:04 PM
 

dp

[This message has been edited by freestyler (edited 05-29-2001).]
     
Fresh-Faced Recruit
Join Date: Apr 2001
Location: brooklyn, ny
Status: Offline
Reply With Quote
May 29, 2001, 02:20 PM
 
The following worked for me last night.

I had a complete CodeWarrior project that would compile and run an application (not applet).
- I created a Project Builder java application with the same name as my .java file with the main method. For example MyJava.java in CodeWarrior called main(String args[]).
- So I created a Project called MyJava.
- I closed the project and moved copies of my codewarrior java files into the folder that PB had put MyJava.java.
- And I replaced MyJava.java with the one from CodeWarrior
- I opend the project back up and added the new files.
- It compiled and ran on first attempt. although this wasn't a very complex application. 5 .java files and maybe 400 lines of code.
     
Junior Member
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 29, 2001, 07:01 PM
 
does anyone of you know what the message 'cannot resolve symbol' is all about? i get this error msg all the time...

thx,
granny
grannysmith
     
Fresh-Faced Recruit
Join Date: Apr 2001
Location: brooklyn, ny
Status: Offline
Reply With Quote
May 29, 2001, 08:23 PM
 
Cannot resolve symbol seems to be fairly generic. In my limited experience the PB compiler doesn't seem to do as well as the CodeWarrior compiler when it comes to reporting errors.

Anyway here is an example I got. look at what is says the symbol is (in my case it is the method valueOf(int)

What happened was this is an ambiguous method. I had to fully qualify it as 'java.lang.String(int). Also look for where the caret (^) is pointing. I got Cannot Resolve Symbol for a couple different things as well. So you just have to dig.

BtnListener.java:31: cannot resolve symbol
symbol : method valueOf (int)
location: class BtnListener

valueOf(XrowID);
^
     
Junior Member
Join Date: Apr 2001
Status: Offline
Reply With Quote
May 30, 2001, 02:11 AM
 
hi, brooky *g*

i've installed my project the way you told me in your second last post. it seems to work (ok - the cannot resolve-error comes a few times, but...) - i probably did something wrong with the add-process of my files last time. the goups were 'blue'-colored instead of the yellow(er) color they've now. (i don't know what this is all about with the color-stuff of groups)...
you were right at the 'resolve-error', i'll try to dig these errors out

do you know an official package called javax.servlet.* ??? it seems that i need to get this package.

thx,
granny
grannysmith
     
Fresh-Faced Recruit
Join Date: Apr 2001
Location: brooklyn, ny
Status: Offline
Reply With Quote
May 30, 2001, 10:10 AM
 
servlet.jar (with javax.servlet.*) is here
http://java.sun.com/products/servlet/download.html

At least I think that's where I got it from. I compiled a servlet in Project Builder a few months ago on the Public Beta. I haven't tried it recently so my memory may be a bit rusty. But I think you just need to get servlet.jar and put it in your CLASSPATH and import javax.servlet.*
     
   
Thread Tools
Forum Links
Forum Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Top
Privacy Policy
All times are GMT -5. The time now is 03:16 PM.
All contents of these forums © 1995-2011 MacNN. All rights reserved.
Branding + Design: www.gesamtbild.com
vBulletin v.3.8.7 © 2000-2011, Jelsoft Enterprises Ltd., Content Relevant URLs by vBSEO 3.3.2