您的位置:首页 > 移动开发 > Objective-C

How to install WebObjects in Ubuntu for free(III)

2008-06-04 08:15 531 查看
Right now you got WebObjects frameworkes, Eclipse and WOLips on your Linux box. Next question is how to config/setup them together.



1. wobuild.properties file
After you open WOLips in Eclipse, the wobuild.properties file is created in your box.
for example, my WO stuff is sitting under /home/username/Apple, the new file would be in /home/username/Library folder.



#Thu Dec 04 08:20:52 GMT+12:00 2008
wo.system.root=/home/username/Apple/System
wo.user.frameworks=/home/username/Library/Frameworks
wo.system.frameworks=/home/username/Apple/System/Library/Frameworks
wo.bootstrapjar=/home/username/Apple/System/Library/WebObjects/JavaApplications/wotaskd.woa/WOBootstrap.jar
wo.network.frameworks=/Network/Library/Frameworks
wo.api.root=/home/username/Apple/Developer/ADC%20Reference%20Library/documentation/WebObjects/Reference/API/
wo.network.root=/Network
wo.extensions=/home/username/Apple/Library/WebObjects/Extensions
wo.user.root=/home/username
wo.local.frameworks=/home/username/Apple/Library/Frameworks
wo.apps.root=/home/username/Apple/Library/WebObjects/Applications
wo.local.root=/home/username/Apple/
I think that's all basic setup for development environment in Ubuntu.

2. Ubuntu and Eclipse
One thing you need to do is install java-1.5.0-sun version, not the default java with Ubuntu.
Then in Eclipse, Window->Preferrences->Java->installed JREs, select java-1.5-sun (not java-1.5.0-gcj version).

3. Test WO by your own default WO application
How do you know you are the right track?under WOLips perspective

In Eclipse->NEW ->WebObjects Application->Project name (TEST)-> Finish

Right click and Run as WOApplication, select Application ->your.app (default)

Then copy the URL like: http://127.0.0.1:52469/cgi-bin/WebObjects/TEST.woa
to your browser, you can get "hello world" text in the page.

If you got 127.0.1.1 in URL, you need to modify /etc/hosts file change 127.0.1.1 to 127.0.0.1
in WOlips change WOAdaptorURL=http://127.0.0.1/cgi-bin/WebObjects.

4. Run the existing WO example applications

I copied all examples source from Apple/Developer/Examples/JavaWebObjects to my workspace.

in Eclipse, Import ->Existing projects into Workspace -> NEXT-> select root dir to "HelloWorld" in your workspace -> Finish

If you got the little red x at Chinese.lproj, just delete it from your project. Don't know why, i think it's encoding problem.

IN Eclipse, change project properties, change the Text file encoding to UTF-8.

Run WO application
Right click HellowWorld project and Run as WOApplication, select Application ->webobjectsexamples.helloworld.
then link to your URL in your Console.

5. WONDER

WONDER is perfect framework for WO. There are some new frameworks, ajax frameworks, examples and WOAdaptor source for Apache2 for Linux.

You can follow the tutorial in http://wiki.objectstyle.org web site. try example in WONDER project as well.

enjoy it.
本文出自 “我爱我家” 博客,请务必保留此出处http://speedooo.blog.51cto.com/226772/80213
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: