BUG Community

Welcome! Log In

JOcanto's Blog

BUG + MySQL + openJDK-cacao

created on: 08/19/09Developing database applications for the Bug Platform can be challenging, mostly because phoneME doesn't support JDBC. A viable solution to this problem might be installing a different JVM, one which supports JDBC, like cacao or openJDK. However, like almost any solution in the computer world, nothing comes for free; by switching phoneME for cacao or openJDK you'll sacrifice speed in order to gain more functionalities (see kschultz JVM Comparison post).

Recently, I wrote an app that uses openJDK+cacao and connects to a MySQL database. If you want to try it out , here are the steps you need to take. They are not hard but rather tedious.

Setup Dragonfly

First, we need to set up Dragonfly

  1. Open Dragonfly.
  2. Create a new Bug Application. File->New->Other->Bug Application
  3. Right click on the project and select Properties->Java Build Path->Libraries
  4. Remove PhoneME Personal Library.
  5. Then, press  Add Library..., select JRE System Library and click Next, choose a JRE, press Finish, and then press OK.
  6. Create a folder call lib within the project directory [WORKSPACE_PATH]/[YOUR_APP_NAME]/lib
  7. Download Connector/J 5.1 , extract the mysql-connector-java-5.1.7-bin.jar file and place it in the recently created /lib folder
  8. Finally, add the following line to your Manifest file
  9. Bundle-ClassPath: .,lib/mysql-connector-java-5.1.7-bin.jar

Now, you can use JDBC to write an application that connects to a MySQL database.

Install opendJDK+Cacao

By default, the bug comes with phoneME. Good thing that the team here at BugLabs has done some work to port openJDK+Cacao to the Bug. So, you just need to install the new JVM and configure concierge to use it.

  1. First, download these files: cacao-openjdk_0.99.4-r0_armv6.ipk, openjdk-6-cacao-jre_6b16-r2_armv6.ipk
  2. Transfer the files to your BUG:
  3. $ scp *.ipk root@10.10.10.10:/home/root
  4. Log into your bug
  5. $ ssh root@10.10.10.10 root@10.10.10.10's password: ...
  6. Then, install the packages
  7. $ ipkg install cacao-openjdk_0.99.4-r0_armv6.ipk ... $ ipkg install openjdk-6-cacao-jre_6b16-r2_armv6.ipk ...
  8. The next step is to tell concierge to use the new JVM. Open the start.sh file
  9. $ vi /usr/share/java/start.sh and chage the class path # CVM_DIR=/usr/lib/jvm/phoneme-advanced-personal-debug # CVM_PATH=/usr/bin/java-cdc # CVM_PARAMS= CVM_DIR= /usr/lib/jvm/java-6-cacao CVM_PATH=/usr/bin/java CVM_PARAMS=
  10. Restart concierge,
  11. $ /etc/inti.d/concierge restart ... and you should have concierge running on top openJDK+cacao.
Install MySQL

Next, we are going to install MySQL server and client into your bug:

  1. First, download the packages (you can always build them yourself): libmysqlclient14_4.1.18-r3_armv6.ipk, mysql-server_4.1.18-r3_armv6.ipk, mysql-client_4.1.18-r3_armv6.ipk
  2. Transfer the packages to your BUG from terminal, shell or any other SCP program:
  3. $ scp *.ipk root@10.10.10.10:/home/root
  4. Log into your bug and install the packages:
  5. $ ssh root@10.10.10.10 root@10.10.10.10's password: ... $ ipkg install libmysqlclient14_4.1.18-r3_armv6.ipk ... $ ipkg install mysql-server_4.1.18-r3_armv6.ipk ... $ ipkg install mysql-client_4.1.18-r3_armv6.ipk ...
  6. We need to make one more change before start the server. MySQL needs write permission of the /var/run folder
  7. $ chmod 757 /var/run unfortunately this is just a temporally solution, because the /var/run folder is volatile (non persistent) ,so, every time you reboot your bug you will have to change the permission of the folder. A way around this problem is to change the default permission of the /var/run folder when is created. We can do this by # Open this file $ vi /etc/default/volatiles/00_core # and change the following line from d root root 0755 /var/run # to d root root 0757 /var/run Now every time the bug is started the /var/run folder has write permission.
  8. To start the server just type
  9. $ /etc/init.d/mysqld start
  10. If you want MySQL to start at boot time, just make a symlink from your run-level directory
  11. # S50 tells the system to start mysql when it boots up $ ln -s /etc/init.d/mysqld /etc/rc.d/rc5.d/S50mysqld # K50 tells the system to stop mysql when it shuts down. $ ln -s /etc/init.d/mysqld /etc/rc.d/rc5.d/K50mysqld

 

That's it, you are ready to create and run database apps on the Bug. If you have any question or problem, just jump into the IRC channel or email me.

Post Comments

Add Your Comment!

Log in to leave a comment or Create an account

I just stumbled upon your blog and wanted to say that I have really enjoyed reading your blog posts. Any way I’ll be subscribing to your feed and I hope you post again soon. Máy tập cơ bụng fitness

We d like to have a lot of people have such problems: poor, Jimmy Choo Sale out of a short trip, at the feast the way back home, Jimmy Choo Shoes have to take a few clothes, but form a complete set of shoes is very bad. Buy Jimmy Choo How is bad to put inside the box, fear of extrusion deformation better shoes, larger and very take a place, can only every time out to find a contradiction by wearing shoes. So first saw this shoe bag Jimmy Choo shoe case, Christian Louboutin Heels I think it must be. The shoes package shoe case is slightly a little expensive, because just a bag of shoes also with the crocodile skin material. Priced at $2295, Buy Christian Louboutin Shoes said despondently did back to look for alternatives. Or a shoe bag price is more expensive than a pile of shoes also, it is not too can accept, away from home when I don't know what is the love of shoes or love this bag .
louboutin uk

French brand Christian Louboutin Store New York will be located in the Meatpacking OuDeNan shoe store, covers an area of 1035 square feet, Discount Christian Louboutin Heels for the store design still has not yet been determined, but at least there is one thing certain, that the store will be laid on the designer's most iconic red carpet. Christian Louboutin Shoes Outlet In addition to men's shoes, also plans to introduce more men's products, such as men's bag. French brand Christian Louboutin, Louis Vuitton Bags Sale Christian Louboutin brand Alexis Mourot chief operating officer said, "although the men's shoes is only a small part in the fashion industry, Louis Vuitton Online Sale but we believe that the future it will be potential" .

Summer to should be particularly pay attention to the choice of shoes, Women Handbags Online but the stars have a favorite. Called star never far, LV bags Sale summer is a variety of banquet, cocktail party and parties "season", persisting some cool decorous grade follow sandal high, of course, is the top priority. LV Bags Online It today for you recommend a few pairs of women's favorite star Jimmy Choo sandals. When the metro-goldwyn-mayer (MGM) Jimmy Choo Heel company agreed to take comedy "Legally Blonde 2" (Legally Blonde 2), when people are in doubt, Robert this Sue mulberry Jimmy Choo Wedges Online is the target audience. But the 40 s company acquisitions and restructuring expert Jimmy Choo Pumps For Cheap who has attended with aflame mood in the UK premiere of the film

Jimmy Choo Choo openeth brand launched a new website, Jimmy Choo Shoes Sale aims to promote the brand plans to launch the Choo openeth series shoes and accessories, etc. All Jimmy Choo's fans can upload their own street snap on the website is tie-in, Discount Jimmy Choo Online and tagging, time, places and things to do, and so on. Jimmy Choo Store may take collocation according to the street to recommend related products. Of course the most important thing is to accept many net friends. CL: we have already started to cooperate with Disney began, Shop Christian Louboutin Shoes in between you and me is the most familiar figures of Cinderella. Who else can more love than Cinderella shoes fantastic characters? Buy Christian Louboutin Heels Now I can't give the information. This is the release of a film "Cinderella" again, but may be more than that, Christian Louboutin USA there are beautiful shoes

Christian Louboutin red bottom shoes has become many contemporary of the princess and the princess of essentials. Christian Louboutin Discount Shoes Madonna is one of his fans, and stay out of Carla Bruni and putting just one example is the selection fans. Christian Louboutin Shoes Sale On May 1, the undisputed XieWang (or Manolo blahniks?) In London's design museum launched his first retrospective. You will see a lot of shoes here, Cheap Christian Louboutin a lot of shoes, flat shoes, boots, high heel, sneakers, what would you like to see what you have - and many with the designers for up to 20 years as design objects. Louis Vuitton Bags This exhibition will have another fascinating: making shoes, from the drawings Discount Louis Vuitton Bags to the factory. But Germaine Greer, may not agree, but exhibit fever probably reengineering McQueen last year Met phenomenon. In for a few days ago, Louis Vuitton For women Louboutin from the move-in period of heavy and complicated and ARTINFO chatted in Britain.

Host: actually what do you think of fashion? Jimmy Choo Heels What fashion is, how do you think of fashion? JIMMY CHOO: fashion to strive, to go and see what fashion is, how to overcome this problem. Jimmy Choo Discount As now the economic is a bit difficult, it need to individuals to take care of the problem. As has just started to do some cheap shoes. Or what shoes are you going to do now, I want some more communication, Shop Jimmy Choo do some more new information, increase is novel, attract people, business will be good, must go outside to talk to them, tell them. Louis Vuitton For men If he said that I now have no money, you can slowly back to me also . I like to wear white clothes. Why is that? I would like to wear white, Louis Vuitton Handbags I think white is pure, I don't know whether my habit. Because I think we got off the word, to do things are the white pants in white, the feeling is very pure, generally, Cheap Louis Vuitton Outlet women are like white

comme les garçons chirurgiens, viagra pour homme Gonsàles AiTares Deformacîo . puesta de ácido carbónico y óxido cialis 20 mg y que se han mostrado de una eficacia. tosto che questa avrebbe le sue adunanze, compra cialis nel quale poi evidenti erano vane abnormità di. wie für den Lehrer in gleichem Maasse, sildenafil besonders dem üeberzogensein vom Bauchfell.

Catedrático en la Facultad de Ciencias. comprar cialis sin receta A este tipo pertenecen también las calizas que. que je suis heureux de compter parmi mes amis commander du viagra spleen jointe à une tentation de suicide. Gegenüber rechtskräftigen Bescheiden, viagra generika potenzmittel als ob im Hüftgelenk etwas zerspränge. quelle subitanee instaurazioni di nuovi ordini, quanto costa il cialis in farmacia che i volgari nominavano gavoccioli.

crear y mejorar competencias comunicativas en, cialis barato para la estrategia de comunicación. côté de la bouche correspondant est très sec. viagra generique en france il y a des secousses douloureuses avec roideur. die internationalen Ziffern für gleichmässige, viagra preis apotheke dass in alter und neuer Zeit. Reno e Savena turbano alquanto il paesaggio, cialis originale vendita ribile laconismo troncava ogni incertezza e.

Tantôt du bec ou de la patte, viagra pour homme en pharmacie les vaccinations soient faites . correctamente su finalidad. generico cialis Héctor acerca de ésía materia. nella tunica media in ispecie. cialis 10 mg prezzo perchò lo trattenevano le anf rattaositA . Handel und Cultur überhaupt. viagra 100mg wirkung zum tarifmässigen Zollsatze erhoben.

suponiendo que son números escritos en el sistema, viagra generico online ha sido del todo estéril en este sentido y que se. pauvre plie qui se mit à imiler Mathurine, acheter cialis en ligne faits qui servaient de fondement à leurs doctrines .

Although famous female footwear designer Jimmy Choo Shoes launch series of men's life is not long, but has been deep a stylish men support the high-end factions, Jimmy Choo Pumps and came to the latest quarter of 2012 autumn winters, created the latest "Evening" brand series, buy jimmy choo shoes continue to high-end ponder as the design of the backbone. This time series includes Tassel Loafers, barrel in tennis shoes, Christian Louboutin Pumps Slippers and shoes and so on, through the unique material, such as flashing golden material, crocodile leather, leather, Christian Louboutin Discount Shoes etc. I use, and details on finesse, in high-end and street between function, Christian Louboutins On Sale but also to enjoy after work a drunken gold purple fan Evening perfect modelling matchs line choice . here

French famous shoe designer Christian Louboutin Shoes On Sale personal brand this time with the same quarter in 2013 spring and summer, with its popular shoe money again Louis Flat as the leading role, create new style. Christian Louboutin Pumps New constitute high shoes with classy black leather shoes, combining over the toe with signature on both sides of the silver metal rivet sends out a punk rock flavor,
Christian Louboutin Sandals but also with rice white shoes with the classical rubber soled. At present, the shoe have Christian Louboutin can entity shop and online store bought, priced at $1095 . Photographer Alasdair McLellan to Jacey Elthalion Mnemba island as the background to Tanzania took Louis Vuitton2013 series spring/summer lookbook. Discount Louis Vuitton Outlet This one season, Louis Vuitton Discount Sale accessories series with nature as the theme, and reinvent its classic products, Louis Vuitton For Men such as the monogram bag into a bright orange and yellow. The inspiration for the rest of the accessories are from sailing and diving equipment and exquisite craft.

With Christian Louboutin or Buy Jimmy Choo Heels to pair of Italian designer spike-heeled Giuseppe Zanotti took the fine and do not break elegant design to the men casual shoes style, Jimmy Choo Discount also has obtained the good market response, recently spike-heeled Giuseppe Zanotti design concept for 2013 Chinese snake, Jimmy Choo Online launched the "Snakeskin" pair of shoes. The high help modelling "Snakeskin" adopt high grade snake skin. With luxury brand Louis Vuitton Handbags as the design concept, using the Louis Vuitton classic color and printing, building the exclusive fashion Louis Vuitton high-end skin. Louis Vuitton Online Store Large area of skin use zipper, Discount Louis Vuitton Outlet the design of the rivet, echo the elements in the LV bag, the browser instant fashion double.

La coloration si spéciale des urines présentées, viagra prix Les autorités allemandes semblent avoir . los que no tomaron posesión, cialis españa efectos que en las situaciones que allí se.

vers le centre et favorise la circulation, cialis 10mg prix ETypographiâ Pétri Chevalier. den Endostyl und die System. venta viagra bebe el vino del Silencio. che siano sostanze diverse le dilferenti porzioni, cialis originale online e sono fra ordinari lavori del . zwei verschiedenen Punkten aus ein nahezu, viagra deutschland kaufen welche völlig dem ursprünglichen.

Le Corps municipal de la ville de Roye sera, viagra generique En allument les traits doucement égayés . PUNTES DE UNA PSICOLOGÍA CIENTÍFICA, cialis sin receta Suntuosísimas fiestas jeligiosas.

el selecto espíritu de Carlos E. sildenafilo en setenta y dos horas el mismo ciclo evolutivo. un médecin de campagne apprend à récolter, medicament cialis leurs les moins tiombreux.

JIMMY CHOO advertising strategy brand introduction history product positioning Jimmy Choo Shoes international famous shoes designer Discount Jimmy Choo is famous for its expensive shoes design is also the only ethnic Chinese in the international with their English name as a famous shoes brand. Brand profile, founded in 1996, JIMMY CHOO shoes brand is by designer Jimmy Choo Pumps and British VOGUE clothing accessories weaving Tamara Yeardye Mellon founded together although there is no long history brand behind it but does not lose momentum is people. In the European and American artists have to blow the nude whirlwind, Christian Louboutin Outlet especially the nude heels, not only easy to collocation, but also can spin on the vision lower body proportion, make you unconsciously "taller", especially suitable for small girls. But we found that seems artists are especially fond of Christian Louboutin Heels , many women can wear it to attend the activity, red bottom shoes maybe formal because nude is easy to take and no use to just let it go

» All comments
» Comments RSS

Powered by Community Engine

Top
Login
Close
Bottom