joconner's Blog
Test post: Fight 文字化け!
This is a test of the java.net blogging system to see how well it supports non-ASCII, UTF-8 text.
Fight 文字化け!
I notice that many of my older posts from the pre-Drupal days are now munged; non-ASCII, UTF-8 chars are now garbage characters.
Sigh...but new blogs seem to be correct.
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 801 reads
Java 7 Locale and ResourceBundle Problems
I was experimenting with Java 7's Locale and ResourceBundle classes recently. Java 7 introduces two new Locale categories: DISPLAY and FORMAT. You can set the default locale for localizable user interface resources independently from the default locale for data Format subclasses. For example, you supposedly can set up a DISPLAY locale to display Spanish (es) resources for the user interface text but use American English (en-US) for date formats.
Sorry for the redirect at this point. I tried to submit the full blog post here, but had so much trouble with formatting the code snippets, that I have to send you to the full blog post elsewhere...sorry, really.
Read this and other blog entries at my blog site: joconner.com
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 1526 reads
Changes in Java 7 Locale
I admit that I haven't been particularly active in the i18n or Java standards bodies in the last few years. Pardon me, but I had a wild rumpus in a startup for almost 3 years, then joined Yahoo for a couple years, and BAM! ... during that time, the Unicode Consortium added emoji, and the Oracle Java folks overhauled the once relatively simple java.util.Locale class among other things. That'll teach me to turn my back on those folks.
You can almost forgive the Unicode people for their addition of emoji... BUT more interesting to me right now...have you seen java.util.Locale lately? What the heck happened there? Java 7 introduces Locale.Builder, Locale.Category, and a Locale.forLanguageTag method. With Java 7's support of BCP 47 (the best practices for language coding), the Locale got a beefy new Builder inner class to help with...well, to help with building BCP 47 compliant locales. More on this in a different post. With the BCP 47 support, I suppose you might need the forLanguageTag method too. Now here's what stumps me though -- that Category class!
As far as I can tell, this category is to help you differentiate a locale instance for two different purposes: user interface language and locale-sensitive data formats. The new categories are the following:
- DISPLAY
- FORMAT
Do we really need a separate Category class to make that explicit?
Locale has another new method: setDefault(Locale.Category, Locale newLocale). I can't wait to play with this a bit more. I suspect that this will set the default resource bundles (DISPLAY) for UI language and the default FORMAT for things like DateFormat, etc. However, I can't understand why these two categories are actually needed in the platform libraries. Convenience maybe? You could always use two different Locale instances for this in the past, but I suppose this makes that easier? I'll have to play around with these to find out more.
You can see this blog and followups on my own joconner.com site.
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 4882 reads
Java 7 on Mac OS X?
I recently installed Java 7 on my Mac OS X system. Although the installation went smoothly, I did run into one problem that might not be a big issue for you.
I didn't go through the hassle of compiling it for myself. Instead, I opted to grab a precompiled JDK from here: http://code.google.com/p/openjdk-osx-build/downloads/list?q=label:Featured
Specifically, I chose the OpenJDK 1.7 universal (32/64 bits) from Mac OS X branch download. Then I ran the /Applications/Utilities/Java Preferences.app to 1) pull both 1.7 versions to the top of the list, and 2) select those 1.7 versions, and 3) unselect the 1.6 JDK I also have installed.
NetBeans seems to run just fine. I'm able to create a new target JDK for the IDE, etc.
Now the problem: I tried running jrunscript from the command line to do some simple tests of new functionality in Java 7. I have found the simple jrunscript JavaScript interpreter to be an excellent way to quickly access Java classes for simple tests, confirmation of APIs, etc. Oddly, the tool didn't run correctly despite being available in the JDK's bin directory. Here's the output of my attempt:
$ which java /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin/java $ which jrunscript /Library/Java/JavaVirtualMachines/1.7.0.jdk/Contents/Home/bin/jrunscript $ jrunscript script engine for language js can not be found
Apparently, the JavaScript engine isn't also included in this download? Ever see this? Hava a solution?
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 11729 reads
Comments
sorry if this is a naive response, but it appears that the ...
by svoeller99 - 2011-08-22 21:56
sorry if this is a naive response, but it appears that the copy of rt.jar included in the download you chose (referring to OpenJDK-OSX-1.7-universal-20110818.dmg, specifically) is missing com.sun.script.javascript.RhinoScriptEngineFactory (per the META-INF/services/javax.script.ScriptEngineFactory entry, as follows, since the service provider mechanism is used to locate instances):
com.sun.script.javascript.RhinoScriptEngineFactory #javascript
In my Win x64 install of JDK 7, I find this file present in jre/lib/resources.jar/META-INF/services. I don't see this present in resources.jar in OpenJDK-OSX-1.7-universal-20110818.dmg, though.
Afraid I'm not sure what accounts for this in terms of the openjdk-osx-build package.
This exactly topic is discussed at the ...
by ixmal - 2011-08-24 04:31
This exactly topic is discussed at the MacOSX OpenJDK port alias:
http://mail.openjdk.java.net/pipermail/macosx-port-dev/2011-August/000767.html
In a few words: Rhino-based implementation of JavaScript is not a part of OpenJDK and therefore not inherited by MacOSX port.
Artem
To add this anything that uses the classes such as ...
by ddcruver - 2011-08-25 13:25
To add this anything that uses the classes such as com.sun.* may not be included in the OpenJDK and can only be found in the official distribution.
Hi to all, I'm the guy behind OpenJDK OS/X Build ...
by henri_gomez - 2011-09-27 08:01
Hi to all,
I'm the guy behind OpenJDK OS/X Build project
The miss in Rhino and scripting has allready been discussed with some users in the past. I'll be happy to add jrunscript + rhino support but I need more information to add this in the OpenJDK current build.
Advices and contributions are more than welcomed.
Encoding URLs for non-ASCII query params
NOTE: I've updated this blog to avoid "mojibake" -- garbled characters. For some reason, the word TA in TANAKA in the name query key in examples was garbled. Originally all occurences of the word 中 were prefixed with the character for TA...for the common family name TANAKA. After removing the mojibake, I think you can still understand the purpose of the blog. But it does make me ask....just what is wrong with displaying TA under this system.
Are you a web service API developer? A good one? Even great? Wherever you are on the greatness spectrum, I have a tip today that is going to make you better. But first, I have something to say. Yes, it is obvious really, but it's worth repeating. The web truly is a world-wide web. Unfortunately, a great number of globally unaware developers are on the global web. This creates an odd situation in which web services are globally accessible but only locally or regionally aware.
There are a few important things to remember when creating a global web service. Let's just cover ONE today: non-ASCII query parameters are valid, useful, and often necessary for a decent, global web service.
It seems so obvious to me, and it probably does to you. Sometimes a service needs to exchange or process non-ASCII data. The world is a big place, and although English is an important part of the global web, more people speak a different language. English is a big percent, but lots of people use Chinese or an Indic language too. Let's make sure your web service can process all those non-ASCII characters in English or any other language!
Let's look at some examples of non-ASCII query params:
- http://example.com?name=中&city=東京
- http://example.com?名前=中&市=東京
In these examples, you must perform two steps to get the query params (both keys and values) into the correct form:
- Convert the keys and their values to UTF-8 if they are not already.
- Perform the "percent encoding" on each UTF-8 code unit
To do #1, you'll need to use whatever character conversion utility you have: iconv, the Java charset encoding converters, whatever.
The #2 step is the important one for this blog. For each hexadecimal code unit in the UTF-8 query portion, you must "percent encode" the code unit. Let's look at the first example query params:
name=中&city=東京
The JavaScript function encodeURI actually does a good job of doing this for us:
encodeURI("name=中&city=東京") produces the string:
name=%E4%B8%AD&city=%E6%9D%B1%E4%BA%AC
Notice that you should also include this encoding for the keys in the param list. In the next example, I've used Japanese values for both keys and values.
encodeURI("名前=中&市=東京") produces this string:
%E5%90%8D%E5%89%8D=%E4%B8%AD&%E5%B8%82=%E6%9D%B1%E4%BA%AC"
Note that both the keys and vaues have been "percent encoded".
On the server side, your server will understand how to decode these values into their correct UTF-8 string values if you have configured it correctly. Correct configuration of a server usually involves a charset conversion filter for a servlet container and sometimes just a config setting for Apache.
More on this at a later time.
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 1453 reads
Comments
<p> I have tried posting this particular blog 2x. ...
by joconner - 2011-07-09 10:54
I have tried posting this particular blog 2x. However, *something* is changing the content. All the non-ASCII content is being mangled. This is typical in a system in which there is an inconsistency among the charsets used at different points in the technology stack: drupal, database, app server. In this case I suspect that your database is not set up to properly store UTF-8 content, and is mangling it. See the misformed characters in the above blog.
<p> So far I couldn't find in the specification that ...
by rvantwisk - 2011-07-04 09:53
So far I couldn't find in the specification that get parameters couldn't be in utf-8 (I might be wrong).
I have seen websites that use greek characters within get parameters and this get's indexed and linked properly in search engines.
What RFC states it's not possible?
<p>I have one web application, and one of the parameters is ...
by arturotena - 2011-07-01 00:49
I have one web application, and one of the parameters is sector. The tipical URL goes like this: http://www.example.com/MyApp/servlet?param1=abc§or=2...
Well, I recieve a lot of requests with the parameter §or=2. Why? Because some browsers and search engines translate "§" as an HTML entity character, although the standard says it must be "§".
Next time I choose the name of a parameter, I will checkout the HTML specifications :-)
Getting MarsEdit to work with java.net
I've wanted to know how to do this for over a year. Not having the time in the past, well, the task just got delayed over and over. Now I finally figured this out, and I'm sharing with you. Surely there are other bloggers that prefer to use their own blog client and MarsEdit in particular if you're using an OS X client.
So, without further delay, here is how I set up my own MarsEdit client to blog on java.net:
- Create a new blog account. Name it "java.net" or whatever you prefer.
- Provide the blog url as "http://java.net/blogs/<username>". For me, this was "http://java.net/blogs/joconner".
- For the System Name setting, choose "Drupal".
- For the System API, I chose Metaweblog. However, you may also be able to use the Blogger API or even AtomPub.
- The API endpoint URL is this: http://java.net/xmlrpc.php
- Maybe the most important part of this is the your blog id setting is "blog"....not anything numeric as you may have expected or have used in the past. Do not use a number here, use the text string blog.
- Your username is the same as <username> above.
- When asked for a password, you need to use the long blog password generated here: http://java.net/blogpass.php
I have one last problem to resolve. When I send my blog entry to java.net, the resulting entry is in draft state. I had to go up to java.net, log in and manually change this from draft to published. That's inconvenient.
If you know how to get me over this last hump, I'd very much appreciate it. I want to blog at java.net again, but I just would really prefer to use my own tool instead of the drupal web interface.
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 1246 reads
Writing CSV files as UTF-8 for Excel
Yesterday a coworker complained that Excel wasn't displaying a CSV (comma separated values) file correctly. Our application allows the user to send a report via email. The application provides the report as a CSV file. Because the report can contain multilingual text, we've decided to encode it in UTF-8. Unfortunately, when users click on the file to display it, usually in Excel, all of the multi-byte UTF-8 characters display incorrectly.
The problem was immediately clear to me...Excel was opening the UTF-8 encoded files, but it was incorrectly identifying them as Latin-1 encoded files. In the absence of any charset identification, Excel must guess about a file's content encoding. In our environment, many host PCs use en_US locales with Latin-1 as the typical charset. Excel uses that default to read and display CSV files.
My solution to the problem was to use the byte-order marker (BOM) to identify the CSV file as a Unicode file. I instructed my colleague to prepend the FEFF character to the file. The Java application that writes the file uses a FileWriter that encodes to UTF-8 to create the CSV file. It was simple to just output the BOM as the first character in the file.
Now when our customers double-click on these files, Excel opens the file, notices the BOM, and automatically selects UTF-8 as the file's charset encoding. Now Excel displays the previously mangled characters correctly. And I was able to help resolve a problem with an easy solution.
Maybe you can give your applications a hint about plain text files as well. Writing the BOM to your file can help Unicode-enabled applications know how to decode your Unicode files.
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 9363 reads
Comments
CSV as utf-8
by velups - 2010-03-29 01:12
Hi, I tried the option, but still having the same problem. After adding the BOM, when i open the CSV from EXCEL -> open file --> csv then its ok. when i double click on the csv, getting junk characters, Please help for some solution.Geeky predictions for 2010
Everyone has something to say about the past. Few can see the future. Here are my predictions for 2010!
- Oracle will prefer Eclipse and will let NetBeans go. I don't like it anymore than you, but why would they support two (three with JDeveloper?) competing IDEs? Oracle's existing staff knows and loves Eclipse, their tooling is built around Eclipse, their plugins are built for Eclipse. Why change something if you don't need to? My only question is who will pick up the support for NetBeans, which is otherwise a great product and is definitely worth saving...just not worth it for Oracle.
- Chrome OS and Android OS will converge. The world doesn't need two new operating systems from Google, not for web apps. I know that these two OSes are coming at web apps from two different scales: desktop/laptop/notebook vs mobile phone. However, the APIs should be the same for maximum acceptance from the community, and that means these two will become one. You can read more about this prediction in one of my prior blogs.
- Google will buy LinkedIn. Although useful and still a great site, LinkedIn is getting a bit stale. Google could inject new ideas to make a good product even better.
- Oracle will sell off Sun's hardware business. Oracle with hardware? I can't believe it. It's too much of a departure from their software business. I think Oracle will push the hardware off to HP.
- Adobe will steal some of JavaFX's thunder this year prior to JavaOne by announcing its own, improved designer tool for Flex that actually exists and is available at the time of their announcement. Sun's JavaFX Designer tool will limp into existence at JavaOne 2010 and everyone will forget that Sun promised it before the end of 2009.
Got predictions of your own? Let's hear them!
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 3272 reads
Comments
RE:Geeky predictions for 2010
by manishhiray - 2010-01-06 02:57
The hardware part of sun (app servers,storage,networking etc.) will be quite useful to Oracle if they are planning to venture into cloud software service offerings, where they wont have to rely on/procure 3rd party physical infrastructure by paying up additional costs. One thing to watch for in 2010 will be where Oracle parks the MySQL or how it plugs that in the existing RDBMS game plan. i also see Java Fx Vs. Flex in the same boat as the Netbeans Vs. Eclipse. Both of them are good tools but challenges are in terms of current market share/developer community support.I don't make predictions as
by fabriziogiudici - 2010-01-06 09:04
I don't make predictions as 99% of predictions are wrong, so I frankly find them a wasted effort ;-)
ButI think that NetBeans is palatable for Oracle for some reasons, one very important being the NetBeans Platform. JDeveloper doesn't have anything similar; IDEA has recently introduced it, but it's focused on IDE tasks; so basically there are only two products around, NetBeans and Eclipse RCP. Sun, among other bad things, has never historically pushed it, and in spite of it there's a huge platform of users - it sufficed for Geertjan Wielenga to devote some time to this task, and it discovered dozens, and many are very large (manufacturers, telcos, military). If you read at the interviews, most of these customers choose the NetBeans RCP because it's Swing and would never go the way of the Eclipse RCP - thus, basically the two products fit two very complementary portfolio of users. Sun's management, also considering the input from the community, has acknowledge that and recently changed attitude towards it. This segment alone can be immediately profitable by selling consultancy and education - after all, third parties and freelances (as me) are already doing business on it.
IDE Platform
by gdavison - 2010-01-07 06:47
Actually JDeveloper does have an equivalent core platform that is used to build other tools in Oracle such as SQL Developer; but it is not something that has been externalized. GerardJavaOne 2010?
by dwalend - 2010-01-05 17:34
"... limp into existence at JavaOne 2010" You're predicting that there will be a JavaOne 2010?
Well, considering that there
by fabriziogiudici - 2010-01-06 09:07
Well, considering that there has not been any CFP, that usually took place in Fall, I'd bet that there will no J1 2010, or it won't be in June, or it will be very different from the past (refinement process for talks has always been very complex, with multiple reviews and edits - too complex IMO - and took months).
For the record, the Moscone
by fabriziogiudici - 2010-01-06 09:09
For the record, the Moscone is still booked for J1 2010: http://www.moscone.com/site/do/event/view?nav.type=0&nav.filter=1005&nav...
No way
by rdelaplante - 2010-01-05 07:38
Oracle really WANTS Sun's hardware business, it was a major reason they bought Sun. Just look at their Exadata system. They used to build a "database appliance" with HP hardware to compete with Teradata, but now Exadata 2 is build with their own hardware. Plus Solaris is the most popular platform for running the Oracle database, and therefore Sun hardware is very popular with Oracle customers. Now Oracle can provide an end to end stack, from the CPU and hardware right up to the middleware and services. I also disagree with you point on NetBeans. Based on your logic, they would have dumped JDeveloper a long time ago. They didn't. That's because there is a large number of internal employees that use it, it is used for some of their tools like SQL Developer, and there are a lot of Oracle customers that use it for Oracle specific development. Once they buy Sun, there will be a lot of Sun employees that use and prefer NetBeans, and Sun products built on the NetBeans platform like Visual VM, and GlassFish Enterprise Monitor. There is a PDF on Oracle's website that talks about the future of many Sun software products including NetBeans, and Oracle said they will continue to develop NetBeans to provide choice to their customers. There would be LOT of angry developers if they cut NetBeans loose because the large NetBeans fan base finds it far superior to Eclipse. I don't get your point about Adobe announcing a designer tool. They already have one, and I doubt they will ever touch JavaFX. I predict that the release of JavaFX 1.3 along with the 1.0 release of the designer tool and composer tool (like matisse) will be the real 1.0 release. Once developers have a full stack that they can use, then I predict most *Java* developers using Adobe Flex will choose Java FX instead because it is an all Java solution, and integrates really well with existing Java code and technologies. The same reason .NET developers prefer Silverlight over Flex. Even if some existing Java developers who use Flex choose not to abandon their new Flex skills, anyone new to RIA will find the use of Java FX a much better option than Flex.Oracle will not sell Sun's hardware business
by fauigerzigerk - 2010-01-04 15:41
I'm surprised about (4). Why would anyone spend billions of dollars to buy a hardware company just to sell off its hardware business? I don't think Sun has significant software revenues and what it has is closely linked to the hardware business. I think Oracle wants to be the one stop shop for big enterprises and to keep IBM and HP out Oracle needs to sell servers and storage.hope you are wrong
by lstroud - 2010-01-04 12:35
1. I think this would be detrimental for java. Eclipse was already having trouble keeping pace. Not having a competitor would make it worse. More over, IBM will become Oracle's chief rival. I would imagine they would like to force IBM to spend money on dev tools.2. don't care, but this would seem better
3. Don't care...but this would seem better
4. Oracle needs the hardware to compete with IBM for the BIG contracts. IBM's bundling of software with hardware has been a thorn in Oracle's side. If they can offer the hardware as well, then oracle gains a strategic selling advantage. I think this may be real. However, I would expect it to focus on midrange and high end and let the commodity stuff go.
5. I think the authoring tool will be announced as soon as the merger is final. I have no way of knowing, but that is my suspicion. Of course, this would be a dev preview with the final release occuring at JavaOne...which will be OracleWorld.
agree w/lstroud's #4, except...
by johnl4 - 2010-01-04 12:48
I read a comment somewhere a while ago (on slashdot, I think, which has a few thinkers mixed in w/all the kiddies) that said Oracle probably wanted a complete stack (hardware up) to go head-to-head against Microsoft.Sounds plausible to me, as does your comment. The only thing is: you cannot sacrifice the entry-level. That's how MS became so big.
JavaFX Authoring Tool
by wsnyder6 - 2010-01-04 12:14
My pessimistic side would agree with you about the JavaFX authoring tool. Sigh. Why annouce it, saying a dev preview by end of 2009 - then keep absolultey silent about it?
Speculations regarding Google Chrome OS
Today's announcement of Google's Chrome OS is exciting in a few ways. I think it has implications for Java developers. With hindsight, I now think that Larry Ellison was hinting about Google's Chrome OS when he expressed some of his desires for JavaFX on small netbook-like devices.
So, without any real knowledge and armed with nothing more than a vivid imagination, I provide some of my predictions/speculations for the upcoming Google Chrome OS and the devices it will power:
- Google Chrome OS will be a slightly more beefy Android OS. More beefy because it will have additional hardware driver support you might find in a netbook. However, its essence will be Android OS.
- The Chrome browser (or a slimmed down cousin) will be the primary application on that OS. It's already integrated into Android via Webkit
- The developer API will be very similar to what Android G1 developers already use. Android G1 apps are essentially Java apps written to a Java-like API. Same Java language on top of the most important, core packages of the Java SE platform. And, of course, Google won't be able to call it a "Java" platform because it will be stripped down to what Google engineers consider only the core, "good" parts of Java SE APIs + Google's own Android APIs of course.
- Google Chrome OS will be attractive to Java engineers because it looks and feels so much like the the JVM...except it's really the Dalvik VM. Many simple applications that run on Java SE will be able to run on the Dalvik VM after a recompile. Or maybe you'll just have to run your class files through a simple converter to target the Dalvik VM. At any rate, Java developers will feel right at home.
- Google Chrome OS devices will need to get onto the network easily, seamlessly, regardless of Wi-Fi availability. Google really does believe that "the network is the computer". Without the internet, these devices will be severely hampered. Expect these devices to have multiple network access technologies built in. Wifi hardware will obviously be on board. But you can imagine it also having a cellular transmitter/receiver built-in too.
- Remember all that cellular radio spectrum that Google was interested in only one or two years back? Wouldn't it be just an awesome thing if Google purchased a huge portion of that and used it to make their Google Chrome OS devices be able to instantly jump onto that for network access? You buy the device, punch in a pre-purchased code for access, and your notebook is on the net in 5 minutes! It will be incredibly, insanely easy to get on the network with your Google Chrome OS-powered device.
- Hey, what's that Google Voice project anyway. Only one of the coolest telephony projects around! Maybe Google will leverage this service? Here's a scenario for you: you buy a Google Chrome OS device, open it up, agree to the terms of a Google voice membership, get a Google voice number and Google account (if you don't already have one), and the device then connects to the network using the built-in cellular hardware to connect to some of that cellular spectrum that Google will or has already purchased.
- After all of this, or perhaps even before this, we all start to feel a little uneasy about just how pervasive Google really is. And despite Google's mistrust and derision of Microsoft, they begin to look a little bit like Microsoft too...really, really big and really, really powerful and located at every digital turn. But this time, instead of controlling your PC, they control your network. Ooh, there's a suspenseful novel in there somewhere.
Ok, some of that's just silly, crazy talk...or is it? We'll see over the next few months.
Oh, one last thing. I just cannot resist the urge to compare Google Chrome OS to Sun's Java OS. Do you remember that? I could hardly find any references to it, although I did find an old article called Inside the IBM JavaOS Project. At some point, Sun apparently enslisted IBM to help. At any rate, the Java OS project started (and ended) a long, long time ago. It's been a decade at least. Remember the Hot Java browser? I actually ran it and used it. I remember that one of our tests at Sun was to run the SwingSet demo on it. But now I'm just distracted. What was I saying? Oh yes, there are even more similarities. Java OS is to Google Chrome OS as the Hot Java browser is to the Chrome browser. Maybe Google Chrome OS will finally be the successful reincarnation of JavaOS?
It's all fun to think about, and as I suggested, pure speculation at this point.
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 2823 reads
Comments
by comrad - 2009-07-13 04:06
If it should be a WebOS it should also have support for Flash 10+, Silverlight, Java, JavaFX, Adobe AIR and stuff. A self called web-OS without those technologies might be difficult to be sold to Joe Customer.by coxcu - 2009-07-10 17:37
I have lobbied (well, the occasional annoying email and random blog or forum post) Sun in the past to release the sources for both JavaOS and HotJava. Much of that was driven wanting to see what they could do for the Java Isolate problem space. http://books.google.com/books?id=w7BQAAAAMAAJ&q=javaos&dq=javaos&ei=tMxX...by fabriziogiudici - 2009-07-10 11:48
"add Isolates support to the JVM." Do you know that there is a complete specification for that? It's JSR 121 and it's three years old. Nothing has been done after the specification.by fabriziogiudici - 2009-07-10 11:46
"Google can do technically to stop somebody else to provide a JRE" Technically. In the perspective of "moral suasion", I'm sure Google can do a lot (surely a lot on Sun in the current situation, maybe after the Oracle buy things will be different). This would not be a problem for Java, as it's FLOSS and everybody could do the port. It could be a problem for JavaFX. I think there are no technical reasons for not having JavaFX on Android, but...by mikeazzi - 2009-07-09 11:59
The one thing I like about the Chrome OS/Browser is that they are taking the isolation concept to a new level within the browser with the use of separate address space for each tab. I wonder when Sun will wake up and smell the coffee and add Isolates support to the JVM.by opinali - 2009-07-09 08:28
If the Chrome OS's browser is basically identical to the Chrome we know, i.e. a full featured browser including the interfaces necessary for plugins, then there's litte Google can do technically to stop somebody else to provide a JRE. Even in Android it should be relatively easy to port Java, remarkably after they introduced the native SDK. And considering that Chrome OS will be a browser-centric OS, I doubt very much that Google would remove the plugin capacity to exclude not only Java but other important plugins like Flash, Acrobat Reader, custom security plugins used by online banks, etc. Smartphones can get away with this because the devices are not powerful enough, have no decent displays or keyboards, for a first-class unrestricted browsing experience; and users don't expect full PC-level functionality from these devices.by fabriziogiudici - 2009-07-09 06:36
"Chrome OS will be powerful enough to run the full Java SE" ... it depends on whether Google will allow us to run it.by opinali - 2009-07-09 06:28
According to some reports, e.g from Ars, you are off the mark with some items: Chrome OS will not be based on Android, will not have a Java SDK - unless they add this as a bridge to run Android apps but that would be certainly secondary, and probably optional. Its browser will be Google Chrome with the V8 JavaScript VM (Android uses SquirrelFish); and the brower will be the primary SDK - augmented by Google's RIA tech like Google Gears and O3D. In this sense, the best comparision is with Palm's new webOS. Of course I'd expect Google to reuse many low-level components from Android, like their customized Linux kernel, network stack, core media support, and other components that would be needed in a netbook. Chrome OS will be powerful enough to run the full Java SE, so we can forget the major distraction that Android was. ;-)Link and run: Binding var and def variables
The Flex guys have enjoyed this for a long time. When I discussed JavaFX with a friend who is familiar with Flex, he shrugged the feature off, clearing unimpressed with JavaFX despite his appreciation for the feature itself. Still, for Java enthusiasts, bind is a welcome language feature.
Another link and run post. Read more about using the bind keyword in JavaFX in the blog tip Binding var and def variables.
- Login or register to post comments
- Printer-friendly version
- joconner's blog
- 946 reads




Comments
Amazingly, this change broke our app. Quite aside ...
by trejkaz - 2011-11-21 16:06
Amazingly, this change broke our app.
Quite aside from introducing the categories (which in my opinion is fine), they also changed the return value from Locale.getDefault() to return "en_US" instead of "en_AU" - Locale.getDefault(Locale.Category.FORMAT) is now the "en_AU". So all the formats throughout our app which was developed in JDK6 are now in the wrong locale and need to be manually fixed. It would have been nice if they at least kept the behaviour for the other method the same as before. It seems like they should have deprecated it, too, and they didn't.
Besides breaking our own code, it also breaks Joda Time, since they call Locale.getDefault() as well. So of course any application relying on Joda Time picking the right default locale for formatting dates is also broken. Now every time you use a DateTimeFormater, you have to manually set the locale appropriately. I'm sure they will get around to fixing this (hopefully sooner rather than later.)