TOKYO—During a business trip to Japan in 2004, technology analyst Michael Gartenberg caught a glimpse of Sony Corp.'s 6758.TO -2.94% Librie, the first e-book reader with an electronic ink display.

Mr. Gartenberg was impressed. He saw it as a harbinger of a new wave of products that would hit the U.S. But there were problems. The software was in Japanese. It required a computer to download a book and selection was limited.

From Sony's Walkman cassette player, which changed the way people listened to music, to Apple's iPad, which forged a new category of computing, see some of the biggest trendsetting electronic devices.

Today, Amazon.com Inc.'s AMZN +1.16% Kindle dominates the e-reader business and the Librie is little remembered. Sony is playing catch-up with a successor device, which ranks a distant third in the global market.

It is a story that has played out repeatedly over the past 20 years for Japan's once-world-dominant electronics firms. Japanese companies have beaten rivals to the market with hardware breakthroughs—from flat-panel televisions to advanced mobile phones.

But in each case, foreign rivals have cashed in by delivering faster improvements, integrating the products with easy-to-use software and online services, and delivering a smarter marketing message.

That has left one of Japan's prized electronics manufacturers, Sharp Corp., IT +0.19% teetering, as it grapples with an acute cash crunch and plunging stock price. Sony is in the midst of another restructuring after four years in red ink. And Panasonic Corp. is pulling back from consumer electronics.

"Japanese firms were too confident about our technology and manufacturing prowess. We lost sight of the products from the consumer's point of view," said Panasonic President Kazuhiro Tsuga at a news conference in June upon taking over as the company's new leader after it posted the biggest annual loss in its 94-year history.

Sony, Sharp and Panasonic combined to lose about $20 billion in the past fiscal year. That is a contrast with the glory days of the late 1970s and early 1980s, when Japan started to dominate the world of consumer electronics. As the Japanese economy surged, the electronics conglomerates ruled the market for memory chips, color TVs, and videocassette recorders, while their research labs gave birth to gadgets that would define an era: the Walkman, CD and DVD players.

Japan's current weakness is rooted in its traditional strength: a fixation with "monozukuri," or the art of making things, focused on hardware advances.

This concept, a source of national pride, pushed Japan's electronics firms to strive for products that were often the world's thinnest, smallest, or delivered other incremental improvement—while losing sight of factors that really mattered to people such as design and ease of use.

In the case of the e-reader, Sony was focused on selling devices, while Amazon was focused on selling books. As a result, the Kindle was more in tune with the raison d'être for purchasing the device: to buy and read books.

"Even though the first device definitely pointed the way to the future, it's a market that got away from Sony," said Mr. Gartenberg, research director at Gartner Inc. "Others have far more successfully capitalized."

To compound matters, the strong yen has made it more difficult to follow up new innovations with the requisite cost reductions to appeal to the mass market. For cutting-edge products, Japanese firms often rely on domestic production and then sell the goods abroad.

The strong yen, near record levels, has narrowed the profit margin of Japanese goods sold abroad—a problem that Korean manufacturers have avoided with the relatively weaker won. The erosion in earnings has also made it difficult to invest in future products and technologies.

In the latest example of the country's lose-the-lead affliction, Japanese companies are falling behind in the race to develop what is likely to become the dominant technology format for next-generation televisions: OLEDs, or organic light emitting diodes. The new displays are thinner and require less energy.

Samsung, Korea's top TV maker, already dominates the market for smaller-size OLED displays featured in smartphones and other mobile devices. Now Samsung and domestic rival LG Electronics Co. 066570.SE +0.76% each plans to launch a 55-inch OLED television later this year.

It is a major step forward compared with the Japanese firms—Sony, Panasonic, Sharp, and Toshiba Corp. 6588.TO -1.23% —that have spent years developing the technology while struggling with how to commercialize it.

In an attempt to close the gap on their Korean rivals, Sony and Panasonic, once bitter rivals, agreed to an unprecedented alliance in June to develop OLED production technology together.

That is a poignant comedown for Sony, which five years ago became the first manufacturer to sell an OLED television. At the time, company executives hailed it a "symbol of Sony's comeback." The 11-inch model—with a screen about one-tenth of an inch thick—was a technological marvel. But at $2,500 a pop, the OLED TV was a financial flop.

The OLED stumble came just a few years after a similar setback in the last generation of TV technology. In 2004, Sony was the first company to introduce LCD televisions that replaced the TV's fluorescent backlight with brighter and more energy efficient light-emitting diodes, or LEDs. It also introduced the first TV that arranged the LEDs around the edges in 2008 to allow the screens to be thinner.

When Samsung came out with its models a year later, the company called them "LED TVs," a moniker to distinguish the new TVs from existing LCD models.

The marketing strategy was a success and Samsung was able to get consumers to pay a premium for the new LED models, helping to slow the sharp decline in TV prices.

According to research firm NPD, Samsung accounts for nearly half of all the LED televisions sold in North America while Sony didn't rank among the top five sellers in the first half of 2012.

After years of missed chances, Sony has now officially shifted gears, deciding recently that it actually makes more sense to let Samsung and others take the lead in developing innovations.

For all its pains of delivering groundbreaking technologies first, Sony executives concluded they were only creating targets for competitors to pursue and possibly imitate at a cheaper cost.

"The first runner has to face the wind—sometimes, it's easier to run from behind," said Tadashi Saito, who took over in April as Sony's chief strategy officer.

Another official familiar with Sony's thinking said the losses at its television business made it harder to take a "gamble" on aggressively pursuing OLED.

That is a far cry from the early days of Sony when founders Akio Morita and Masaru Ibuka nearly bankrupted the company in order to build a new type of color television. After unveiling prototypes in 1964, Sony struggled to develop the technology for mass production as the company burned through money. It took four years of development before Sony unveiled the Trinitron, a product that would underpin the company's success for the next three decades.

These days, the feeling is: "Financially, the Japanese firms can't take the risks," said Yuji Fujimori, a Tokyo-based electronics analyst for Barclays.

But the choice not to take risks has its own risks: the danger of falling into a downward spiral. Losses can lead to smaller investments in future technologies or new products.

Better-funded rivals can gain a leg-up with new products or developing new technologies that may make gadgets from Japan less competitive and ultimately lead to more losses for the Japanese firms.

The danger is evident in the gap in research and development spending between the Japanese and Korean leaders. Historically, Sony and Panasonic outspent Samsung on R&D, but starting in 2009, the Korean firm surpassed its Japanese rivals and the gap has widened.

In 2011, Samsung spent about $8.7 billion on R&D, compared with $5.5 billion for Sony and $6.6 billion for Panasonic in their fiscal years.

TOKYO—The first floor of the Bic Camera electronics store, a mammoth eight-story building covering an entire block here, is ground zero for Japan's electronics industry.

Japanese companies have beaten rivals to the market with hardware breakthroughs. But in each case, foreign rivals have cashed in by delivering faster improvements, integrating the products with easy-to-use software and online services, and delivering a smarter marketing message. Read More

Flat-panel television sets, most bearing Japanese brands, have long filled the north end of the sales floor, where the store's best-selling products reside.

These days, amid slumping sales, the rows of TVs are relegated to the store's cramped second-floor quarters to make room for hundreds of accessories for smartphones—specifically the distinctively non-Japanese iPhone from Apple Inc. AAPL +0.66%

The store's decision shows the what has befallen Japan's technology industry. Once-powerful electronics conglomerates, which bet it all on TVs and missed the smartphone wave, are on the outside looking in.

Smartphones are now playing center stage in the consumer-electronics world, not only delivering staggering sales growth, but also cannibalizing sales of digital cameras, portable game machines and other strongholds of Japanese electronics.

Today Apple and Samsung Electronics Co.'s 005930.SE 0.00% are enjoying record profits and are combining for some 54% of global smartphone shipments in the first quarter, according to research firm Strategy Analytics.

In an effort to catch up, Japanese companies are redoubling their smartphone push with varying degrees of ambition.

Sony is making the most aggressive move among Japanese brands after failing to dent the market in the past decade through its troubled Sony Ericsson joint venture. No longer bound to that partnership, Sony Chief Executive Kazuo Hirai has pledged to make smartphones a pillar of its business.

Panasonic, Fujitsu and Sharp—the top three domestic handset manufacturers—are looking at a modest return to the global scene after all but backing out during the early age of so-called "feature phones."

But a full-fledged global push won't be easy, especially in such a cutthroat industry that requires constant innovation.

"Both at home and abroad, we are in a tough situation" with smartphones, says Panasonic Managing Director Hideaki Kawai, who oversees the company's finances.

People in and outside the industry cite a number of factors for why Japanese companies missed the trend: Too much focus on the domestic market; too slow and inflexible to adapt to dynamic conditions; a misread of consumer preferences and a dose of arrogance about hardware superiority.

Starting in the 1990s, Japanese cellphones were technological marvels packed with hardware breakthroughs. Sharp in 2000 was the world's first company to add a camera to a mobile phone.

By 2006, a year before Apple introduced the iPhone, Japanese consumers could watch broadcast TV on their phones.

Yet, for all the advances, Japanese manufacturers struggled to challenge Finland's Nokia Corp. NOK1V.HE +5.97% and U.S.-based Motorola Inc. abroad because the Japanese firms had churned out phones for the domestic market throughout the late 1990s and early 2000s based on a telecommunications standard used only in Japan. In order to sell phones abroad, the companies had to modify the handsets to work on foreign networks.

Late to the market, Japanese manufacturers struggled to gain a foothold with foreign carriers, unlike South Korea's Samsung, which forged relationships with network operators around the world and worked quickly to supply products tailored to overseas markets. Japan's electronics makers were making money in a protected home market, and overseas expansion was seen as risky.

The inward-looking mentality earned Japan's devices the moniker, "Galápagos" phones: a reference to the uniquely evolved creatures that Charles Darwin found on the Galápagos Islands that served as the foundation for his theory of evolution.

The most popular Japanese feature phones were often long, skinny versions of clamshell-type phones. They came with a host of features unique to the Japanese market such as digital money to make purchases, the ability to double as a monthly pass for trains and buses or a function to swap contact details with a push of a button.

The iPhone's debut in 2007 changed everything.

While the rest of the world saw the iPhone for what it was—a game-changing product—some executives in Japan dismissed it, believing their phones were already smart enough.

In July 2008, a few weeks after Softbank Corp. 9984.TO -0.77% introduced the iPhone in Japan, Tadashi Onodera, chief executive of Japan's No. 2 carrier, KDDI Corp., 9433.TO -0.71% said the device couldn't "fully satisfy the needs of [Japanese] cellphone users." Three years later, KDDI, under new management, began to offer the iPhone and it became KDDI's best-selling smartphone.

"The Japanese firms misread the market," said Ryuji Ono, a Tokyo-based partner at consulting firm Roland Berger. "They weren't watching the rest of the world."

Smartphones now account for 56.6% of all new mobile phones shipped in Japan, according to Tokyo-based market research firm MM Research Institute. Apple and Samsung accounted for more than 20% of the Japanese market in the past fiscal year, compared with five years ago, when there were almost no foreign brands.

Apple was the top smartphone manufacturer in Japan in the past fiscal year. And Samsung cracked the top five in the domestic smartphone market.

By the time Japanese manufacturers jumped on the trend—the first Japanese smartphones running Google Inc.'s GOOG +0.50% Android operating system appeared in the domestic market in 2010—Samsung was already flooding the Europe and the U.S. with a wide range of models, including the high-end Galaxy S.

Backed into a corner in their own country, the leading handset makers have had no choice but to consolidate and re-enter foreign markets.

NEC Corp., Hitachi Ltd., 6501.TO +5.63% and Casio Computer Co. 6952.TO +1.08% in 2010 joined forces to form a cellphone joint venture majority owned by NEC. Later that year, Toshiba Corp. 6588.TO +1.25% sold its phone business to Fujitsu. In February, Sony bought out its joint-venture partner, Sweden's Telefon AB L.M. Ericsson, ERIC-B.SK +1.16% giving the Japanese company full control over its money-losing smartphone business.

But times remain tough. In the most-recent quarter, Fujitsu, NEC, Sharp, Sony and Panasonic all reported losses in their handset business segments.

What's more, Sony, Panasonic and Sharp are backing away from the TV business, unable to withstand another round of competition with already battered balance sheets.

"The golden age of TV is over, and TV will never be king again in the consumer-electronics space," Kunio Nakamura, a former president and chairman at Panasonic, said in an interview last month with the Nikkei newspaper.

Panasonic recently came to Europe with a new waterproof smartphone called the Eluga, selling it in Italy and Germany with a target to ship 1.5 million units in Europe this fiscal year.

NEC Casio, which sells shock-resistant G'zOne handsets through Verizon Wireless in the U.S., plans to ship about two million phones outside Japan this fiscal year, or about 40% of its total target of five million units.

Sharp is focusing on the Chinese market, though the company doesn't specify how many of its targeted 7.7 million handset shipments will go outside Japan. Fujitsu, meanwhile, aims to reach a deal with an overseas carrier later this year.

For Sony, the bulk of its phones are sold outside Japan. With a flurry of new models this fiscal year, Sony plans to ship 34 million smartphones world-wide, surpassing the targeted output of its four closest Japanese rivals combined. Sony plans to offer more unique models that take full advantage of Sony's entertainment assets such as videogames.

In a sign of the changing attitudes, NTT DoCoMo Inc. 9437.TO +0.08% President Kaoru Kato arrived at an interview with a reporter last month carrying a Samsung Galaxy phone.

It would have been unthinkable even three years ago for the president of Japan's largest carrier and the mobile arm of NTT Corp., 9432.TO +0.26% which is one-third owned by the Japanese government, to carry a Korean phone.

"The Galaxy is really selling well in Japan," Mr. Kato says. "It has quite a bit of appeal."

Mr. Kato says he uses the Galaxy because it was the first available summer smartphone model running on DoCoMo's 4G networks. He says he may switch to a Fujitsu or Sony model eventually.

"I'm not trying to be a pitch man for Samsung all of a sudden, but it has a nice, clear screen," Mr. Kato says. "Everything is really improved."

Spurred by recent struggles that have culminated in record annual losses and management reshuffles, Sony Corp., 6758.TO +1.94% Panasonic Corp., 6752.TO +2.62% and Sharp Corp. 6753.TO +5.14% are striving to reinvent themselves. Panasonic and Sharp are pushing into green energy. Sony has jumped into medical devices.

Japan's electronics sector became a pillar of the country's postwar expansion by manufacturing televisions, stereos, and other technological hardware for the mass market. But the long-term survival of Japanese firms will depend on escaping the margin-killing rat race of the consumer electronics market.

Japanese companies have beaten rivals to the market with hardware breakthroughs. But in each case, foreign rivals have cashed in by delivering faster improvements, integrating the products with easy-to-use software and online services, and delivering a smarter marketing message.

The transition from analog to digital technology—a shift that replaced the Walkman with the iPod, the VCR with the TiVo, and bubble-tube TV sets with flat-panel displays—made it easier to produce goods in a uniform way with off-the-shelf parts, discounting the manufacturing skill that once made Japan an industry force. As a result, hardware became a commodity that needed to be enhanced by elegant software or engaging services, areas where the Japanese have been weak.

"No one is making money from televisions so Panasonic is trying to shift from an audiovisual, home-appliance oriented business to a B-to-B business," Panasonic Chairman Fumio Ohtsubo told reporters in January. He was the company's president at that time, and was replaced and became chairman in June.

Health care and energy are a natural fit for these companies given Japan's limited natural resources and an increasingly aging population.

As their losses piled up in the past several years, the companies pursued deals in these sectors to help lessen their reliance on the consumer electronics segment.

Despite the promise, these new markets could create the same old problems: A crowd of Japanese companies jump into a promising sector. The abundance of competitors drives down prices, pressuring profitability, while making it difficult for any company to stand out globally.

In Japan alone, no fewer than seven companies including Sharp and Panasonic are selling solar panels; at least five major companies are developing rechargeable batteries for electric vehicles; and most Japanese camera or electronics makers are targeting some part of the health-care market.

Japanese manufacturers are also piling into the market for replacing incandescent and fluorescent lights with light-emitting diodes, or LEDs, which last longer and use less energy.

"Japanese companies are notorious for one competitor raising their hand to do something new," said Melissa Otto, a director at TIAA-CREF Investment Management who oversees a portfolio of Japanese stocks. "And then, they all follow suit."

Sony is also in talks with Olympus Corp. 7733.TO +0.41% —the troubled Japanese medical equipment maker that admitted to an accounting scandal —to take as much as a $633 million capital stake, according to people with knowledge of the discussions.

Panasonic also considered taking a stake in Olympus although it decided against making an offer, these people said. Olympus has said it is still weighing its options.

The deal is appealing to Sony because of Olympus's 70% share in endoscopes, medical instruments used to peer into the body.

Olympus already uses Sony's image sensors, and Sony aims to place more of its components into other Olympus medical devices while also tapping Olympus's sales channels, according to a Sony executive not permitted to speak publicly on the matter.

In April, Sony Chief Executive Kazuo Hirai called the medical devices business a "future pillar" of the company, saying he expects annual sales from its health-care operations to eventually generate more than $1.2 billion.

In the year ending in March 2015, Sony expects sales of its medical monitors, printers, and other equipment to reach about $630 million, or less than 1% of its total revenue in the past fiscal year.

"It's something that they have to do," said Yuji Fujimori, a Tokyo-based analyst for Barclays Capital. "The medical world is getting closer to the electronics world. There is a lot of electronics technology that can be used in medical equipment."

The global market for medical equipment is large and growing, and expected to rise 28% over the next five years to $348.6 billion in 2016, according to health-care research provider Espicom Business Intelligence.

Toshiba Corp., one of Japan's leading television and computer manufacturers, expanded its atomic energy business when it acquired a majority stake of nuclear energy firm Westinghouse in 2006.

Seeking a way to ease the burden of earnings volatility from memory chips and consumer electronics, Toshiba is also active in rechargeable car batteries, LED light bulbs, and renewable energy systems.

Panasonic has made the most pronounced—and costly—move to change the composition of its businesses.

Over the span of two years ending in late 2010, Panasonic spent $10.4 billion to acquire Sanyo Electric Co., targeting its small rival's solar panel operation and rechargeable car batteries for electric vehicles.

In addition, it spent more than $3 billion to make majority-owned subsidiary Panasonic Electric Works Co. into a wholly owned unit to accelerate its push into building systems.

Panasonic's strategy is to avoid getting dragged down by low-cost Chinese makers of solar panels—that is, to avoid having solar panels turned into commodities like TVs or memory chips—by selling the cells as part of a broader renewable energy system for homes and offices.

It expects its battery business to expand on orders from five different auto makers using Panasonic batteries for electric or hybrid vehicles.

That strategy hasn't paid off yet. Panasonic's energy business, which includes the battery and solar units and accounts for about 6% of the company's total revenue, lost $263 million in the past fiscal year, as the company struggled with a sharp decline in prices for photovoltaic cells and low-end batteries in consumer electronics.

But company executives remain optimistic. Panasonic says it can increase revenue in that sector by at least 60% over four years, to more than $12.6 billion, in the year ending March 2016.

That compares with overall expected revenue growth of about 10% over the same period, according to analyst forecasts. The company expects profit margins for the unit to exceed 10%—well above the low-single-digit margins expected for the company as a whole.

Sharp acquired Recurrent Energy LLC, a San Francisco developer of solar power generation projects, for $305 million, in November 2010.

Sharp was profitable at the time, but its finances have since collapsed, and rather than acquire more companies, it was forced earlier this year to agree to sell a stake in itself to Taiwan's Hon Hai Precision Industry Co. 2317.TW +0.48%

Amid its struggles, Sharp still sees a ray of hope for its renewable energy business. When Sharp this month announced its first round of job cuts since 1950 and a forecast for a $3.2 billion annual loss, President Takashi Okuda singled out the solar business, lifted by new laws forcing utilities to buy from more renewable sources.

Demand from the domestic residential market, said Mr. Okuda, is "in extremely good shape." The solar business accounted for about 8% of Sharp's total revenue in the last year.

"No one is making money from televisions so Panasonic is trying to shift from an audiovisual, home-appliance oriented business to a B-to-B business," Panasonic Chairman Fumio Ohtsubo told reporters in January. He was the company's president at that time, and was replaced and became chairman in June?