So Dev
Wednesday, May 25, 2005
Eclipse Visual Editor Mystery solved
I finally figured out why Eclipse Visual Editor was not working on my machine. That's because I didn't install the entire required component with the right version. Based on the instruction at http://www.eclipse.org/vep/ , the current build only support Eclipse 3.0.1. Thus it didn't work for 3.0.2. In addition, I need to install EMF build 2.0.1 and GEF Build 3.0.1, which I didn't do previously. Now everything is working on the Eclipse 3.0.1 on my office machine.However, I found the editor kind of slow. I am pretty sure that my machine itself should be fast enough, so maybe Java visual components are intrinsically slow.
Tuesday, May 24, 2005
A day with Eclipse 3.0.2
I took a day off and spent almost all the time messing with Eclipse 3.0.2 trying to make all sort of works working. At the end of the day, some was successes and some failed. Here’s sort of a quick founding and progress:- Visual SourceSafe is working with Eclipse now
o I actually didn’t know what I did to make the one working. One thing for sure, though, is that the system that runs Eclipse on must have Visual SafeSource installed.
- JavaDoc working with JavaVM 1.4, but not the Java Wireless Toolkit 2.1.01
o At the beginning of the day, I couldn’t have tooltip with JavaDoc text displaying while I was editing code. Later, I figured out that if I use a JRE Library other than the one in the Eclipse 3.0.2 folder, like, for instance, the “G:\Apps\Development\j2sdk1.4.2_08”, the JavaDoc started working.
o Making JWT 2.1 working for JavaDoc setting is much more tricky. I already follow the instruction documented in “Adding Javadoc or Source links to WTK components” (http://eclipseme.org/docs/advJavadoc.html). Yet I still couldn’t get the JavaDoc working. Guess I have to give it up for a short while.
- Visual Editor 1.0.2 doesn’t wok with both Eclipse 3.0.1 and Eclipse 3.0.2. Don’t know why. The entries show up in “About Eclipse Platform Plug-ins” screen, yet I cannot get the Visual class wizard started.
So you see I didn’t make much progress today. But then I slept a lot today, which was pretty sweet :-> ..
Monday, May 23, 2005
Web.Config and Data Access Application Block
I was puzzled at first about how to configure the web.config file for use with Data Application block, when actually all it takes is use the Enterprise Library Configuration tool to open the web.config file, and then enter database configuration information.Setting up ASP.Net to use Oracle
I was a bit shocked when I saw the “Cannot Load oci.dll” error when I wrote some Data Access block code to access some data from an Oracle 10g database. It turned out that the problem has nothing to do with Application Block, but similar a matter of configure the ASPNET impersonate user account to have fun access to the Oracle directory.Here’s a detail instruction I found on a web page:
----------------------(start)--------------------
Oracle 9.2 Client software requires that you give the Authenticated User privilege to the Oracle Home by following these steps:
1. Log on to Windows as a user with Administrator privileges.
2. Launch Windows Explorer from the Start Menu and and navigate to the ORACLE_HOME folder. This is typically the "Ora92" folder under the "Oracle" folder (i.e. D:\Oracle\Ora92).
3. Right-click on the ORACLE_HOME folder and choose the "Properties" option from the drop down list. A "Properties" window should appear.
4. Click on the "Security" tab of the "Properties" window.
5. Click on "Authenticated Users" item in the "Name" list (on Windows XP the "Name" list is called "Group or user names").
6. Uncheck the "Read and Execute" box in the "Permissions" list under the "Allow" column (on Windows XP the "Permissions" list is called "Permissions for Authenticated Users").
7. Re-check the "Read and Execute" box under the "Allow" column (this is the box you just unchecked).
8. Click the "Advanced" button and in the "Permission Entries" list make sure you see the "Authenticated Users" listed there with:
Permission = Read & Execute
Apply To = This folder, subfolders and files
If this is NOT the case, edit that line and make sure the "Apply onto”drop-down box is set to "This folder, subfolders and files". This should already be set properly but it is important that you verify this.
9. Click the "Ok" button until you close out all of the security properties windows. The cursor may present the hour glass for a few seconds as it applies the permissions you just changed to all subfolders and files.
10. Reboot your computer to assure that these changes have taken effect. Re-execute the application and it should now work.
----------------------(end)--------------------
Actually, I didn’t follow the detail instruction above, and simply select the “C:\oracle\product\10.1.0” in the file system, and give ASP.Net all the right to the all files (including sub-directory). This will work on development environment. But for production environment, you should set up in the way that only enough right given to the user ASPNET.
How to unhide the folder security tab in Windows XP
I know Microsoft was in good intention when they hide a lot of administration detail on Windows XP, but it could be painful when I tried to use XP as a development work station. For instance, I was trying to configure ASP.NET so that it can access Oracle client, and I need to set Security (安全性) of a folder. However, since by default the“使用簡易檔案共用” setting under Folder Setting was checked, thus I don’t see安全性 tab in folder properties. Of course I eventually sort this out and fixed the problem, but I have to admit that it was a pretty frustrating experience.
Failed to install Flash 5 update on my NX70V
Kind of pissed now. I wasted 25 minutes and still couldn't figure out why I am not able to update the Flash player on my NX70V. I tried both the US and Japanese update and they both failed. Very pissed. Oh screw it. All I miss is a bit text editing and audio play back. Which doesn't hurt way too much.Eclipse and J2ME
Writing Java application rarely provides such much instant gratification as writing Windows application, and I am all for quick thrill (pardon my MTV generation attitude. Nevertheless, I constantly force myself to do some Java development knowing that it’s important to continue understand both Windows and Java technology in order to make sound architectural decision. And with me getting a Java enabled phone, I am more incentive to write some J2ME code that I can use while I am on the road.My J2ME development continues with the StopWatch tutorial was following. The tutorial was originally come from the JBuilder 2005 enterprise edition. I found that tutorial simple enough to following, and also the fact that the Java developed in that tutorial can be compile in other Java IDE. I knew it because I tried compile to code in Eclipse 3.1 without any major problem. The port was not as straight forward as I expected, for I don’t have a best way to important the JBuilder project into Eclipse. I had to, instead, create a regular MIDlet in Eclipse, and then copy and paste the code across. I also have to remove the package information at the top of each Java file. Nevertheless, the port runs fine. I used to bitch about how JBuilder create applications which lock you in the JBuilder environment, but this time I think JBuilder does a good job my making J2ME development a real cross platform or even cross IDE experience.
I was also glad that the code I wrote so far is device independent. That means the code will run on almost all Java enabled mobile phone, and not just my Motorola E398. After I started getting familiar with the platform, I may add some E398 specific code, but I don’t envision that day coming soon since it will take me a long while before I can proficient in J2ME development.
I love zero installation application and software development environment. So every time I try out an IDE I always try whether I can put all the application in my removable hard disk and start the environment. With a combination of Eclipse, Java Wireless Toolkit 2.1 and Java2SDK 1.4.2.08 on my removable hard disk, I am able to do J2ME development wherever I can attach my removable hard disk to and without a need to go through installation. Of course, I need to find a system that doesn’t have Java runtime in order to make sure that this is indeed the case, for all the system that I deal with these days has Java VM already installed.
Wednesday, May 11, 2005
Accessing Oracle database with Microsoft Data Access Application Block
(Haven't been updating my blog for so long!!!)After being fustrated for more than 6 hours yesterday, I finally figured out how to access Oracle database under .Net Framework 1.1 using Microsoft Application. Here's some tidbits:
- After you created a new App.config file using Enterprise Library Configuration, save it at the root directory of your Visual Studio .Net project, and MAKE SURE you add the App.config in your project. That way the VS.Net will automatically generate a proper .config file in your bin folder based on your App.config. I got stuck at this exact spot for more than several hours.
- Use the following command as the post-build event command line:
copy "$(ProjectDir)*.config" "$(TargetDir)"
- For the connectionstring setting, simply mimic the fields in the plain old ADO.Net conenction string for Oracle.
