Java (programming language) and Socialism: Difference between pages

(Difference between pages)
Content deleted Content added
Added link to Jamie Zawinski article
 
NWOG (talk | contribs)
No edit summary
 
Line 1:
{{Socialism}}
The '''Java''' language is an [[object-oriented]] [[programming language]] created by [[James Gosling]] and other engineers at [[Sun Microsystems]].
[[Image:Redflag.jpg|frame|right|The color [[red]] and particularly the [[red flag]] are traditional symbols of Socialism.]]
It was developed in [[1991]], as part of the [[Java platform#History|Green Project]], and officially announced on [[May 23]], [[1995]], at SunWorld; being released in November. Gosling and friends initially designed Java, which was called '''Oak''' at first (in honour of a tree outside Gosling's office), to replace [[C Plus Plus|C++]] (although the feature set better resembles that of [[Objective C programming language|Objective C]]).
The Java specifications are community-maintained through the Sun-managed [[Java Community Process]]. Sun holds a [[trademark]] on the Java name.
 
'''Socialism''' is an [[ideology]] with the core belief that a [[society]] should exist in which popular collectives control the means of [[Power (sociology)|power]], and therefore the means of [[production]]. In application, however, the [[de facto]] meaning of socialism has changed with time. Although it is a politically [[Loaded language|loaded]] term, it remains strongly related to the establishment of an organized [[working class]], created through either [[revolution]] or [[social evolution]], with the purpose of building a [[classless society]]. It has also increasingly become concentrated on [[social reform]]s within modern [[democracy|democracies]]. This concept and the term '''Socialist''' also refer to a group of ideologies, an [[Social economy|economic]] system, or a [[state]] that exists or has existed.
== Overview ==
 
In [[Marxism|Marxist]] theory, it also refers to the society that would succeed [[capitalism]], and in some cases develop further into [[communism]]. Marxism and communism are both branches of socialism.
There were four primary goals in the creation of the Java language:
 
The word dates back at least to the early [[Nineteenth Century|nineteenth century]]. It was first used, self-referentially, in the English language in 1827 to refer to followers of [[Robert Owen]]. In France, again self-referentially, it was used in 1832 to refer to followers of the doctrines of [[Claude Henri de Rouvroy, Comte de Saint-Simon|Saint-Simon]] and thereafter by [[Pierre Leroux]] and J. Regnaud in ''[[l'Encyclopédie nouvelle]]''<!--pages 1 and 2, ''A History of Socialist Thought, Volume 1, (1965)-->. Use of the word spread widely and has been used differently in different times and places, both by various individuals and groups that consider themselves socialist and by their opponents. While there is wide variation between socialist groups, nearly all would agree that they are bound together by a common history rooted originally in [[Nineteenth Century|nineteenth]] and [[Twentieth Century|twentieth-century]] struggles by [[industrial]] and [[agricultural]] [[worker]]s, operating according to principles of [[solidarity]] and advocating an [[egalitarian]] society, with an [[economics]] that would, in their view, serve the broad populace rather than a favored few.
* It is [[object-oriented]].
* It is independent of the host platform (more or less).
* It contains language facilities and libraries for [[Computer network|networking]].
* It is designed to execute code from [[remote source]]s securely.
 
== An ideology or a group of ideologies ==
=== Object orientation ===
According to [[Marxist]]s (most notably [[Friedrich Engels]]), socialist models and ideas are said to be traceable to the dawn of human social history, being an inherent feature of human nature and early human social models. During [[the Enlightenment]] in the [[18th century]], revolutionary thinkers and writers such as the [[Marquis de Condorcet]], [[Voltaire]], [[Jean-Jacques Rousseau|Rousseau]], [[Diderot]], abbé de Mably, and [[Morelly]] provided the intellectual and ideological expression of the discontented social layers in [[France|French]] society. This included even the [[bourgeoisie]], at that time kept out of political power by the ''[[ancien régime]]'', but also the &quot;popular&quot; classes among whom socialism would later take root.
 
The earliest ''modern'' socialist groups shared characteristics such as focusing on general welfare rather than [[individualism]], on [[co-operation]] rather than [[competition]], and on laborers rather than on industrial or political leaders and structures<!--page 3, ''A History of Socialist Thought, Volume 1, (1965) -->. They did not generally think in terms of [[class struggle]], but argued that the wealthy should join with the poor in building a new society. Class struggle, the challenge to [[private property]] and the accompanying notions of the special role of the [[proletariat]] in the [[revolution]] find their earliest origins in the [[Conspiracy of Equals]] of [[François-Noël Babeuf|Babeuf]], an unsuccessful actor in the [[French Revolution]]<!--pages 12-22, ''A History of Socialist Thought, Volume 1, (1965)-->. Later, they were much greatly developed by the Marxist branch of socialism.
The first characteristic, [[Object_(object-oriented_programming)|object orientation]] ("OO"), refers to a method of programming and language design.
The main idea of OO is to design software around the "things" (ie. objects) it manipulates, rather than the actions it performs. This is based on the notion that the former change less frequently and radically than the latter, making such objects (actually the entities containing data) the more stable foundation for a software system's design. The intent is to make large software projects easier to manage, thus improving quality and reducing the number of failed projects.
 
[[Elie Halevy]] claims that the term "socialism" was coined independently by two groups advocating different ways of organizing society and economics: the [[Claude Henri de Rouvroy, Comte de Saint-Simon|Saint-Simonian]]s, and most likely [[Pierre Leroux]], in the years [[1831]]-[[1833|33]], and the followers of [[Robert Owen]], around 1835.
=== Roles ===
 
By the time of the [[Revolution of 1848]] there were a variety of competing "socialisms", the most influential being those founded by Saint-Simon, Owen and [[Charles Fourier]]. [[Karl Marx]] and [[Friedrich Engels]] by this time were referring to themselves as "communists", in large part to distinguish themselves from the above ideologies, which they described as "[[utopian socialism]]". (Engels later used the term "[[scientific socialism]]" to describe Marxism.)
The Java software plays three crucial roles or identities in the field of software:
# as a programming language.
# as [[middleware]].
# as a [[platform (computing)|platform]].
 
Depending on the context, the term socialism may refer either to these ideologies or any of their many lineal descendants. While these cover a very broad range of views, they have in common a belief that [[feudalism|feudal]] and [[capitalism|capitalist]] societies are run for the benefit of a small economic elite and that society should be run for the common good. "Socialist" ideologies tend to emphasize economic cooperation over economic competition; virtually all envision some sort of economic planning (many, but by no means all, favor [[planned economy|central planning]]). All advocate placing at least some of the means of production -- and at least some of the distribution of goods and services -- into collective or cooperative ownership.
A crucial component of Java is the [[Java virtual machine|Java Virtual Machine]] (JVM).
The availability of the JVM on almost all types of device, chips and software package enables Java to function both as [[middleware]] and a computing [[platform (computing)|platform]]. The JVM enables Java to be "platfom independent" since the JVMs on each device/chip interprets the standard Java bytecode. This means you can develop code on your PC and expect it to run on Java-enabled phones as well as on mainframes equipped with Java without any adjustments. Hence the expression "[[Write once, run anywhere]]." This also represents a huge amount of savings for software developers as code can be developed locally and cheaply.
 
Historically, the ideology of socialism grew up hand in hand with the rise of [[labor union|organized labor]]. In many parts of the world, the two are still strongly associated with one another; in other parts, they have become two very distinct movements.
=== Platform independence ===
 
===Branches of socialism===
The second characteristic, platform independence, means that [[computer program|program]]s written in the Java language must run similarly on diverse hardware. One should be able to write a program once and run it anywhere.
[[Image:Socialismchart.png|thumb|right|A chart of some branches of socialism.]]
This is achieved by most [[compiler|compilers]] by compiling the Java language code "halfway" to [[bytecode]]&mdash;simplified machine instructions specific to the Java platform. The code is then run on a [[Java virtual machine|virtual machine]] (VM), a program written in native code on the host hardware that translates generic Java [[bytecode]] into usable code on the hardware. Further, standardized libraries are provided to allow access to features of the host machines (such as graphics, [[thread (computer science)|threading]] and [[Computer network|networking]]) in unified ways.
 
Since the [[19th century]], socialist ideas have developed and separated into many different streams. Notable ideologies that have been referred to using the ''label'' "socialism" are:
There are also implementations of Java compilers that compile to native [[object code]], such as [[GCJ]], removing the intermediate bytecode stage, but the output of these compilers can only be run on a single [[architecture]].
 
* [[African socialism]]
Sun's license for Java insists that all implementations be "compatible". Some vendors, notably [[Microsoft]], have insisted on adding platform-specific features (for example, in Microsoft's case, for Windows) and Sun has reacted strongly. After Microsoft insisted on retaining its incompatible variations, Sun sued and won both damages (some $20 million dollars) and a court order enforcing the terms of the license from Sun.
* [[Anarchism]], especially [[Libertarian socialism]]
* [[Anarcho-syndicalism]]
* [[Christian socialism]]
* [[Communism]]/[[Marxism]]
* [[Democratic socialism]]
* [[International socialism]]
* [[Nazism|National Socialism]]
* [[Syndicalism]]
* [[Utopian socialism]]
 
The socio-political or intellectual movements basing themselves in the Marxist-Socialist tradition can generally be further divided into:
Microsoft has taken the position that a compliant Java, meeting the terms of the license as ordered by the court, is inadequate and has decided to leave out any Java system at all in future versions of Windows. This means that stock versions of Internet Explorer in such versions of Windows will break for Web sites using Java applets. Sun and others have made available Java run-time systems at no cost for those versions of Windows without Java. The necessity to download them is a consequence of the litigation and Microsoft's decision to comply with the court's order by leaving out Java support.
* [[Albanian Party of Labour|Hoxhaism]]
* [[Baathism]]
* [[Burmese Way to Socialism]]
* [[Castroism]]
* [[Council communism]]
* [[Arab Socialism ]]
* [[Juche]]
* [[Angka]]([[Pol Pot]]s [[Cambodia]]n political way)
* [[Left communism]]
* [[Leninism]]
* [[Rosa Luxemburg|Luxemburgism]]
* [[Maoism|Mao Zedong Thought]] or "Maoism"
**[[Abimael Guzmán|Gonzalo Thought]]
* [[Marxist humanism]]
* [[Socialism with a human face]]
* [[Stalinism]]
* [[Trotskyism]]
* [[Situationism]]
 
Several forms of "socialism" are considered by those further to the left to be [[reformist]] or [[revisionist]]. These include:
The first implementations of the language used an interpreted virtual machine to achieve [[portability]], and many implementations still do. These implementations produce programs that run more slowly than the fully-compiled programs created by the typical [[C Plus Plus|C++]] compiler and some later Java-language compilers, so the language suffered a reputation for producing slow programs. More recent implementations of the Java VM produce programs that run much faster, using multiple techniques. There is still a speed difference, but it is much smaller.
 
* [[Austromarxism]]
The first technique is to simply compile directly into native code like a more traditional compiler, skipping bytecodes entirely. This achieves great performance, but at the expense of portability. Another technique, the ''just-in-time'' compiler or "JIT", compiles the Java bytecodes into native code at the time that the program is run.
* [[Deformed workers' state]]
More sophisticated VMs even use ''[[dynamic recompilation]]'', in which the VM can analyze the behavior of the running program and selectively recompile and optimize critical parts of the program. Both of these techniques allow the program to take advantage of the speed of native code without losing portability.
* [[Degenerated workers' state]]
* [[Evolutionary socialism]]
* [[Fabianism]]
* [[Social democracy]]
* [[Popular Socialism]]
* [[Yellow socialism]]
* [[Socialism with Chinese characteristics]] and other forms of [[market socialism]]
* [[Bernsteinism]]
* [[Kautskyism]]
* [[Titoism]]
* [[Labor Zionism]]
 
===Other ideologies including the word "socialism"===
[[Portability]] is a technically difficult goal to achieve, and Java's success at that goal is a matter of some controversy. Although it is indeed possible to write programs for the Java platform that behave consistently across many host platforms, the large number of available platforms with small errors or inconsistencies led some to parody Sun's "[[Write once, run anywhere]]" slogan as "[[Write once, debug everywhere]]".
Like other political terms, such as ''[[liberal]]'', ''[[conservative]]'' and ''[[democracy|democratic]]'' (see, for example, the [[Liberal Democratic Party of Russia]], which is neither liberal nor democratic), the words ''socialism'' or ''socialist'' have sometimes been used in self-description by groups that had little or no connection with the historical socialist movement, and who sometimes openly and virulently opposed the socialists in their countries.
 
The German [[National Socialist]]s (Nazis) used the word "socialist" in their official name much like any branch of Socialism, but most scholars argue that the term "socialism" in "national socialism" did not meaningfully extend beyond propaganda purposes. However, rightwing [[Hayek|F.A. Hayek]], [[Nobel prize]]-winning [[economist]], in his ''[[The Road to Serfdom]]'', notes that [[National Socialists]] did indeed "socialize" the economy. In practice, the Nazis allowed (friendly) capitalists to thrive while liquidating socialists everywhere else (including from within their own party in the [[Night of the Long Knives]]). Hayek points out that this state involvement in the economy, while not [[left-wing politics|left]] socialism, is socialism nevertheless. Unlike 'national socialists,' many [[left-wing politics|left]] socialists who consider themselves nationalist reject the [[Racialism|racialist]] theories and totalitarianism of the Nazis, unlike socialists, who are known for struggling for a classless society where everyone is equal. (see: [[Nazism in relation to other concepts#Nazism and socialism|Nazism and Socialism]]).
Platform-independent Java is, however, very successful with server-side applications, such as [[web service]]s, [[servlet]]s, or [[Enterprise Java Beans]].
 
Some [[Japan]]ese right-wing and [[nationalists]] thinkers, such as [[Kita Ikki]], also used the term from the 1920s to the [[Pacific war]] period, referring to a [[state socialism]], rooted in the Japanese feudal [[Shogunate]] and [[Meiji period|Meiji]] periods. This was based on socialist theory, which arrived to Japan in 1901, introduced by Western [[missionaries]], and built on the work of Japanese socialists thinkers, [[Kotoku Shusui]] and [[Katayama Sen]], as well as [[social Darwinism]], [[Marxism]], and similar ideas. These ideologies were continued in the work of [[Yoshino Kazuko]] and [[Minobe Tatsu Kichi]], in "[[minponshugi]]" and "[[minshushugi]]", Japanese socialist philosophies. Yoshino Kazuko also founded the [[Reimeikai Party]], a movement based on [[Christian Socialism]], [[Confucian]] politics, Marxism and [[syndicalism]], with some [[populism]]. In this period, the first nationalist [[secret societies]] were born.
=== Secure execution of remote code ===
<!-- why more later if development,how [[Aikukosha]] ([[Patriotic]] Society), founded in Osaka during 1875 for [[Itagaki Taisuke]], for leading the flag of popular cause front government actions,based in "[[Minken]]" antigovernment movements why surging for the people scarcies and protect your rigths in 1873. -->
During the [[Showa]] Epoch, the final developments of these ideologies combined Japanese state socialist thinking with contemporary European [[fascist]] ideals and the Japanese WW2 radical right-wing ideology of [[Militarism-Socialism]]. Under this movement ideologists such as [[Sadao Araki]] founded the right-wing [[Kodoha]] party; [[Hachiro Arita]] organized the [[Greater Asian Co-Prosperity Sphere]] concept and [[Naoki Hoshino]] organized the foundation of puppet state of [[Manchukuo]] along with local nationalist groups;the local left socialism along [[Russia|Russian]] and [[Chinese Communism|Chinese]] [[soviet]]s elements conduct in development of Japanese local [[communist]] thinking. (''See also'' [[Socialist thinking and the Empire of Japan]], [[Japanese nationalism]],[[Japanese fascism]] and [[Communist Party of Japan]])
 
Another party who employs the word "socialist" in its name but is viewed by many as being not genuinely socialist, is the [[Ba'ath Party|Arab Socialist Ba'ath Party]] which rules [[Syria]] and also ruled [[Iraq]] under [[Saddam Hussein]]. It claims a tradition of secular, non-Marxist socialism, but most political theorists (as well as nearly all other socialists) argue that, in fact, it persecutes socialists (who wish to redistribute wealth more equally in the country) while promoting capitalists from within the [[dominant minority]] ethnic group that controls the Party and, decisively, the Syrian armed forces. The [[Central Intelligence Agency|CIA]] assisted Saddam Hussein with [[death squads]], effectively whiping out the Iraqi communists.
The Java platform was one of the first systems to provide wide support for the execution of code from remote sources. An applet could run within a user's browser, executing code downloaded from a remote [[HTTP]] server.
The remote code runs in a highly restricted "[[sandbox]]", which protects the user from misbehaving or malicious code; publishers could apply for a certificate that they could use to [[digital signature|digitally sign]] applets as "safe", giving them permission to break out of the sandbox and access the local filesystem and network, presumably under user control.
 
For a discussion of the controversial views of one [[philosophy of history|philosopher of history]] who sees a close, though antagonistic, relationship between the left and the right descendants of [[Hegelianism]], see [[Eric Voegelin]].
=== Automatic garbage collection ===
 
Various [[Catholic Church|Catholic]] clerical parties have at times referred to themselves as "Christian Socialists." Two examples are the [[Christian Social Party]] of [[Karl Lueger]] in [[Austria]] before and after [[World War I]], and the contemporary [[Christian Social Union in Bavaria]]. Most other socialists would consider these two parties to be "socialist" in name only. However, there are other individuals and groups, past and present, that are clearly both Christian and Socialist, such as [[Frederick Denison Maurice]], author of ''The Kingdom of Christ'' (1838), or the contemporary Christian Socialist Movement (UK) (CSM), [http://www.christiansocialist.org.uk] affiliated with the British [[The Labour Party (UK)|Labour Party]]. (''See main article [[Christian socialism]]; see also [[Christian left]] and [[social gospel]]'')
One major problem with languages such as [[C Plus Plus|C++]] is the need for manual memory management. In C++, memory must be allocated by the programmer to create an object, then deallocated to delete the object. Often a programmer forgets or is unsure when to deallocate, leading to a [[memory leak]], where a program consumes more and more memory without cleaning up after itself. Even worse, if a region of memory is deallocated twice, the program can become unstable and crash.
 
Some [[individualist anarchist]]s, such as [[Benjamin Tucker]], refer to their philosophy as "anarchistic socialism," though supporting private property in the produce of labor, including capital, and opposing collectivism. Tucker defines "state socialism" as "the doctrine that all the affairs of men should be managed by the government, regardless of individual choice."
In Java, this problem is solved by [[automatic garbage collection]]. Objects are created and placed at an address on the [[heap]]. The program or other objects can reference an object by holding a reference to its address on the heap. When no references to an object remain, the Java garbage collector autmatically deletes the object, freeing memory and preventing a [[memory leak]]. Memory leaks, however, can still occur if a programmer's code holds a reference to an object that is no longer needed&mdash;in other words, they still occur but at higher conceptual levels. But on the whole, Java's automatic garbage collection makes creation and deletion of objects in Java much easier and safer than in C++.
 
===A Evaluationnote on usage===
Some groups (see above) have called themselves socialist while holding views that most socialists consider antithetical to socialism. The term has also been used by some politicians on the [[right-wing politics|political right]] as an epithet for certain individuals who do not consider themselves to be socialists and policies that are not considered socialist by their proponents (e.g. referring to all [[publicly funded medicine]] as "socialized medicine" or to the [[United States Democratic Party]] as "socialist"). This article touches only briefly on those peripheral issues.
 
===What distinguishes the various types of socialism===
Most consider Java technology to deliver reasonably well on all
There are a few questions that point out some of the big differences among socialisms:
these promises. The language is not, however, without drawbacks.
 
* Do advocates of this ideology say that socialism should come about through [[revolution]] (e.g. Leninism, Trotskyism, Maoism, revolutionary Marxism) or through [[reform]] (e.g. Fabianism, reformist Marxism), or do they view both as possible (e.g. [[Syndicalism]], various Marxisms) or do they fail to address the question of how a socialist society would be achieved (e.g. utopian socialisms)?
Java tends to be more high-level than similar languages (such as [[C Plus Plus|C++]]), which means that the Java language lacks features such as hardware-specific data types and low-level pointers to arbitrary memory.
* Do they advocate centralized state control of the socialized sectors of the economy (e.g. [[Leninism]]), or control of those sectors by [[workers' council]]s (e.g. syndicalism, left and [[council communism]], [[Marxism]], [[Anarcho-communism]])? This question is usually referred to by socialists in terms of "ownership of the [[means of production]]." None of the social democratic parties of Europe advocate total state ownership of the means of production in their contemporary demands and popular press, but most contain rhetoric in their platform which state that in the event the capitalists fail to meet up to their end of the social contract, the workers have the legitimate historical basis to assume or seize total control of the means of production, should those conditions ever arise in the future.
Although these features are frequently abused or misused by programmers, and make it harder (though far from impossible) to write a reliable, secure program, they are also powerful tools. However, the [[Java Native Interface]] (JNI) does provide a way for a Java program to call non-Java code in order to leverage the capabilities of other languages when necessary.
* Do they advocate that the power of the workers' councils should itself constitute the basis of a socialist state (coupled with [[direct democracy]] and the widespread use of [[referendum]]s), or do they hold that socialism entails the existence of a legislative body administered by people who would be elected in a [[representative democracy]]? In other words, through what legal and political apparatus will the workers maintain and further develop the socialization of the means of production?
* Do they advocate total or near-total socialization of the economy (e.g. revolutionary Marxism, Leninism, Stalinism, Trotskyism, Left and Council Communism, anarcho-syndicalism and syndicalism), or a mixed market economy (e.g. Bernsteinism, reformism, reformist Marxism)? [[Mixed economy|Mixed economies]], in turn, can range anywhere from those developed by the social democratic governments that have periodically governed Northern and Western European countries, to the inclusion of small [[cooperative]]s in the planned economy of [[Socialist Federal Republic of Yugoslavia|Yugoslavia]] under [[Josip Broz Tito]]. In a related, but not identical, question, do they advocate a fairer society within the bounds of capitalism (e.g. most social democrats) or the total overthrow of the capitalist system (most Marxists).
* Did the ideology arise largely as a philosophical construct (e.g. libertarian socialism), or in the heat of a revolution (e.g. early Marxism, Leninism), or as the product of a ruling party (e.g. Stalinism), or as the product of a party or other group contending for political power in a democratic society (e.g. social democracy).
* Does the ideology systematically say that "[[bourgeoisie|bourgeois]] liberties" (such as those guaranteed by the U.S. [[First Amendment]] or the [[Charter of Fundamental Rights of the European Union]]) are to be preserved (or even enhanced) in a socialist society (e.g. social democracy), or are undesirable (e.g. Maoism), or have they held different opinions at different times (e.g. Marx and Engels), or is this a dividing point within the ideology (e.g. different strains of Trotskyism)?
* Does their critique of the existing system center on the ownership of the means of production (e.g. Marxism), on the nature of mass and equitable distribution (e.g. most forms of utopian socialism), or on opposition to industrialism as well as capitalism (common where socialism intersects [[green politics]])? Utopian Socialists, like [[Robert Owen]] and [[Claude Henri de Rouvroy, Comte de Saint-Simon|Saint-Simon]] argued, though not from exactly the same perspective, that the injustice and widespread poverty of the societies they lived in were a problem of distribution of the goods created. Marxian Socialists, on the other hand, determined that the root of the injustice is based not in the function of distribution of goods already created, but rather in the fact that the ownership of the means of production is in the hands of the upper class. Also, Marxian Socialists maintain, in contrast to the Utopian Socialists, that the root of injustice is not in how goods ([[commodity|commodities]]) are distributed, but for whose economic benefit are they produced and sold.
* Which governments does the ideology regard as practicing or moving toward socialism and which does the ideology not regard as doing so? For example, in the era of the [[Soviet Union]], western socialists were bitterly divided as to whether the Soviet Union was basically socialist, moving toward socialism, or inherently un-socialist and, in fact, inimical to true socialism. Similarly, today the government of the People's Republic of China claims to be socialist and refers to its own approach as "[[Socialism with Chinese characteristics]]," but most other socialists consider China to be essentially capitalist. The Chinese leadership concurs with most of the usual [[#Opposition and criticisms of socialism|critiques against a command economy]], and many of their actions to manage what they call a socialist economy have been determined by this opinion.
 
Note also that while many would say that socialism is defined by state ownership and state planning of the means of production and economic life, a certain degree of such state ownership and planning is common in economies that would almost universally be considered capitalist. In Canada, Crown Corporations are responsible for various sectors of the economy deemed to be of strategic importance to the people (for example power generation). In the U.S., a semi-private central bank with close ties to the federal government, the [[Federal Reserve]], regulates lending rates, serving as a "bank of banks." Also, governments in capitalist nations typically run the post office, libraries, national parks, highways, and (in the case of the US) [[NASA]]. Interestingly, though, the federal government's monopoly on space travel from U.S. take-off sites is itself a thing of the past -- as of 2004 (see [[Ansari X Prize]]) private capital is entering even that field.
Some also see a shortcoming in its lack of [[multiple inheritance]], a powerful feature of several object-oriented languages such as [[C Plus Plus|C++]], [[Eiffel programming language|Eiffel]], and [[CLOS]]. Java subclasses have only one chance to inherit implementation by choosing one superclass, which can lead to false dilemmas (should HouseBoat inherit House or Boat?) and rules out certain implementation techniques such as [[mixin]]s. However, proponents believe Java's ability for classes to implement multiple [[interface (computing)|interface]]s is a good trade-off, providing most of the benefits of full multiple inheritance while sidestepping thorny situations in which a class inherits multiple conflicting implementations.
 
State, provincial, and local governments within a capitalist system can operate and own power companies and other utilities, parks, mass transit including rail and airports, hospitals and other medical facilities, and public schools (often including a number universities). Capitalist governments also frequently subsidize or otherwise influence (though do not own) various sectors of the economy, such as automotive, weapons, oil (petrol), aerospace, and agriculture.
Java's paradigm of [[bytecode interpretation]] is widely seen to provide portability only at the expense of performance degradation relative to native code.
[[Dynamic compilation]] helps tremendously, but still typically cannot beat statically compiled code. This is because, when compilation occurs at run-time and thus counts against the performance of the program, the compiler must use its powerful, expensive optimizations very sparingly. However, precisely because dynamic compilers are present at runtime, they can take advantage of dynamic program behaviour, and can even recompile portions of the program as conditions change. Therefore, dynamic compilers can perform optimizations that static compilers cannot; and there are some programs for which dynamically compiled code is faster than statically compiled. (For instance, long-running programs whose behaviour depends on input data may fall into this category.)
It is not unreasonable to suppose that this set of programs will grow as dynamic-compilation technology improves.
 
In the post-World War II political [[lexicon]], this sort of (limited) economic state planning became integral to stabilization of the global economy, and has come to be known as [[Keynesian]] economics, after [[John Maynard Keynes]].
Java's heavy use of heap-allocated objects causes programs to consume more memory than similar programs written in lower-level languages, where data storage can be optimized at a fine granularity. Because it treats almost everything as an object, Java encourages a style in which objects contain many references to other objects rather than raw data, making the objects larger and the data less localized. Both of these effects tend to work against modern memory hierarchies, whose caching schemes thrive on small working sets and good locality.
 
Conversely, [[Chinese economic reform]] under [[Deng Xiaoping]] has been characterized by decreasing state ownership of the economy, the replacement of central planning mechanisms with market-based ones that are also used in Western capitalist nations, and even going as far as removing governmental social welfare services that are commonly found in most capitalist nations. However, because the legitimacy of the [[Communist Party of China]] is based on the premise that China has already made a transition to socialism, the government insists that it is a socialist government. Very few inside and outside China would support this claim.
There are some who believe that, for certain projects, object orientation makes work harder instead of easier. This particular complaint is not unique to the Java language but applies to other object-oriented languages as well.
 
One form of common ownership, or socialism, is a system of theocratic governance proposed by [[Joseph Smith]], the original prophet of the Church of Jesus Christ of Latter Day Saints. It was called the Law of Consecration. According to the Law of Consecration, no man "owns" any of his possessions, but instead everything is owned by the church, and individuals are granted a "stewardship" over property.
==Language==
An example of a [[hello world]] program in the Java language follows:
 
== An economic system ==
<div style="margin:1em; padding:1em; border:#cccccc 1px dashed;">
''Main article: [[Socialist economics]]''
public class <nowiki>HelloWorld</nowiki> {
public static void main(String[] args) {
System.out.println("Hello world!");
}
}
</div>
 
As in the realm of ideology, there is no single consensus on what it means for a particular [[economic system]] to be "socialist". However, all socialists agree that a socialist economy must be run for the benefit of the vast majority of the people rather than for a small [[aristocracy|aristocratic]], [[plutocracy|plutocratic]], or [[capitalism|capitalist]] class. In the mid-nineteenth century, when socialism first arose, many political ideologies of the day were frank in supporting the interests of elite classes. Today, in a world where many countries offer a broader [[suffrage|electoral franchise]], such open support for the wealthy would be the equivalent of political suicide. Therefore, most ideologies claim to support the greatest good for the greatest number, something that was once advocated only by socialists. Still, even today, socialism stands out by being particularly forthright in advocating direct pursuit of working class interests, even at the expense of what other ideologies consider the legitimate property rights of the wealthy classes.
=== Control structures ===
 
Most socialists argue that socialism also entails democratic control of the economy, although they differ vastly over the appropriate institutions of that democracy and over whether control should be centralized or highly dispersed. Similarly, they differ over the extent to which a socialist economy could involve [[market]]s, and among those who believe that it could, there is a further dividing line on whether markets should apply only to consumer goods or, in some cases, to the [[means of production]] themselves (factory and farm equipment, for example). For the means of production, this is a question of ownership of the economy, and therefore of control over it.
==== Loops ====
 
Many non-socialists use the expression "socialist economy" (or "socialization" of a sector of the economy) almost exclusively to refer to centralized control under government aegis: for example, consider the use of the term "[[publicly funded medicine|socialized medicine]]" in the US by opponents of [[publicly funded medicine|single-payer health care]].
while (''Boolean expression'') {
''statement(s)''
}
 
There is general agreement among socialists and non-socialists that a socialist economy would not include private or estate ownership of large enterprises; there is less agreement on whether any such enterprises would be owned by society at large or (at least in some cases) owned cooperatively by their own workers. Among the few self-described socialists who dispute these principles are the leadership of the Communist Party of China, who claim to remain socialist, even while the continuing [[Chinese economic reform]] explicitly includes the concept of privately-owned large enterprises competing on an equal basis with publicly-owned ones. The adoption by China of this essential characteristic of capitalism is a principal reason why, outside and inside of China, few people (socialists or otherwise) consider present-day mainland China and its ruling party to be, in any meaningful sense, socialist.
 
It has been claimed, both by socialists and non-socialists, that the former [[Soviet Union]] and the [[Eastern Bloc]] had socialist economies, as the means of production were owned almost entirely by the state and the bulk of the economy was centrally controlled by the Communist Party acting through the state. However, many other socialists object to that label, because the people in those countries had little or no control over the government, and therefore they had little or no control over the economy. The aforementioned socialists argue that these societies were essentially [[oligarchy|oligarchies]]; some would call them [[state capitalism|state-capitalist]], [[Stalinist]], or as some Trotskyists would say, "[[degenerated workers state]]s". Trotskyists contend that Stalinist economies fulfilled one criterion of a socialist economy, in that the economy was controlled by the state, but not the other criterion, that the state must be in turn democratically controlled by the workers. Many non-Marxist socialists would agree with the general outline of this argument, while perhaps dissenting from the statement that ''state'' control of the economy is one of the criteria of socialism. Further, many socialists would argue that the Soviet Union and its satellite states merely replaced a capitalist ruling class with a new ruling class, the [[coordinator class]] or ''[[nomenklatura]]'', who played an extremely analogous role to the former capitalists, by managing the economy for their own benefit, or at least attempting to do so.
do {
''statement(s)''
} while (''Boolean expression'');
 
During the Cold War, a common term used by the Soviet Union and its allies to refer to their own economies was "actually existing socialism" (presumably as against any number of theoretically possible socialisms, but carrying an implicit statement that their economy was, in fact, socialist). Another similarly used term was (and is) "[[real socialist]]." Typically, when these terms were or are used by anyone outside of the particular parties that ruled these countries (or the parties who supported them in other countries), they are placed in [[scare quotes]] and are used with at least mild irony.
 
== A state that exists, or has existed, or may exist ==
for (''initialisation'' ; ''termination condition'' ; ''incrementing expr'') {
''Main articles: [[Communist state]], [[Social democracy]]''
''statement(s)''
}
 
Most past and present states led by parties of [[Communist]] orientation called (or call) themselves "socialist." However, by anti-communists in the western world they were usually referred to as "Communist states." Once again, whether these states were socialist or not was (and is) disputed, with the large majority of today's socialists (including many, perhaps most, communists) contending that they were not socialist, for reasons directly analogous to those just discussed in the section above (regarding the "socialist" economy).
 
A libertarian socialist society known as "The Republic" emerged in 1930s Spain during the civil war. See [[Anarchism in Spain]].
==== Conditional statements ====
 
There are also some who dispute whether it is appropriate to refer to any state, past, present, future, or hypothetical as "socialist," preferring to reserve that word for an economy or even a society, but not a state.
if (''Boolean expression'') {
''statement(s)''
}
 
== Socialism as transition from capitalism ==
Although Marxists and other socialists generally use the word "socialism" in the senses described above, there is also another specifically Marxist use of the term that is worth noting. [[Karl Marx]], in his exposition of [[historical materialism]] (his [[Hegelian]] model of history) saw socialism as a phase of human society that would follow capitalism and precede communism. Marx is by no means clear about the expected characteristics of such a society, but he is consistent in his belief in the eventual triumph of revolutionary-socialism over capitalism, and then, its eventual transformation into communism.
 
According to Marx, the socialist society will be controlled by the working class (the [[proletariat]]), whose familiarity with large, collective undertakings will be reflected in the character of this society. It will be a "[[dictatorship of the proletariat]]", in the sense that it is contrasted with the existing dictatorship of the [[bourgeoisie]] (i.e. capitalism). It is worth noting in this context that Marx was not necessarily advocating or predicting "dictatorship" in the sense that word is commonly used today; he was referring only to which ''class'' would be dominant - in other words, it is the proletariat who become the ruling class, not a "dictator". While Leninist dictatorship is arguably consistent with this vision, so is workers' democracy, analogous to bourgeois democracy. In addition, note that most Marxist models of socialism involve the abolition of the so-called "exploitation of man by man" which is presumed to exist in capitalist society. This would mean abolishing class distinctions, therefore making "the proletariat" a universal term synonymous with "the people".
if (''Boolean expression'') {
''statement(s)''
} else {
''statement(s)''
}
 
Marx saw socialism (the "dictatorship of proletariat", as explained above) as a transitional phase, ultimately to be replaced by a classless ''communist'' society in which the existing forms of government would no longer be needed. According to Engels, the state was destined to eventually "wither away", as the [[representative democracy]] of socialism slowly turned into the [[direct democracy]] of communism, and economic life would be re-organised on a basis of freedom and equality. In holding this classless non-state as the ultimate goal, Marx expressed an ideal not far from that of anarchism. However, whereas the anarchists wanted to abolish the state overnight, the communists expected the "withering away" to be a slow and gradual process.
 
This definition of socialism is particularly important in understanding the official ideology of the People's Republic of China. The Communist Party of China states that class struggle has already pushed China into the socialist phase of social development. Because of this and Deng Xiaoping's theory of [[seek truth from facts|seeking truth from fact]]s, any economic policy which "works" is automatically classified as a socialist policy, and hence there are no constraints on how "socialism with Chinese characteristics" can look like.
With ''else if'' arbitrarily complex ''if-then-constructions'' may be built.
 
==Socialism and the mixed economy==
if (''Boolean expression'') {
As remarked above, some self-described socialists, especially those who identify as social democrats, but also including (for example) the reform-oriented "[[Euro-communist]]s", advocate capitalism rather than a complete re-working of existing capitalist economies along socialist lines. These views also extend to many who would not describe themselves as "socialists."
''statement(s)''
} else if (''Boolean expression'') {
''statement(s)''
} else if (''Boolean expression'') {
''statement(s)''
} else {
''statement(s)''
}
 
In the most moderate formulation of such a mixed economy, collective ownership is typically limited to control of [[natural resource]]s and [[Public utility|public utilities]]. The rationale for prioritizing these is that natural resources are a common patrimony and that (all or some) public utilities are ''[[natural monopolies]]''.
 
Others would extend a socialist approach within a mixed economy to what they deem to be essential industries to prevent certain capitalists from having a stranglehold on society, or to prevent massive concentrations of wealth which result in a power imbalance (including disproportionate bargaining leverage). There is also often a rationale of national defense or national sovereignty. Thus, many otherwise capitalist countries have, at least at times, nationalized such industries as [[steel]], [[automobile]]s, or [[airplane]]s. In the U.S., for example, President [[Harry S. Truman]] nationalized the steel mills during the [[Korean War]]. They soon returned to private ownership by order of the [[U.S. Supreme Court]], however.
 
All socialist thinkers argue that unrestrained [[free market]] economics would generally result in profits for a few at the expense of the many. Communists, in particular, are adamantly opposed to any compromise with capitalism, claiming that any economic system that permits the private accumulation of wealth is inherently unjust and allows capitalists (those who own and control capital) to compel behavior out of individuals due to their own necessity to survive. (''see: [[labor theory of value]]''). As noted several times above, this is disputed by the contemporary Communist Party of China, making China (if it is regarded as socialist or communist) an inevitable exception to much of what follows here.
switch (''integer expression'') {
case ''constant integer expr'':
''statement(s)''
break;
...
default:
''statement(s)''
break;
}
 
While few self-described communists support any scheme upholding private ownership of the means of production (except, perhaps, as a temporary disposition on the way to something purer, and again noting the contemporary Chinese exception), other socialists are split over this, arguing over whether to only moderate the workings of market capitalism to produce a more equitable distribution of wealth, or whether to expropriate the entire owning class to guarantee this distribution. Many socialists acknowledge the extreme complexity of designing other appropriate non-market mechanisms to identify demand, especially for non-essential goods. Some have put forward models of moderate [[market socialism]] where markets exist, but an owning class does not.
 
In practice, many aspects of the socialist worldview and socialist policy have been integrated with capitalism in many European countries and in other parts of the world (especially in the industrialized "first world"). Social democracy typically involves state ownership of some corporations (considered strategically important to the people) and some participation in ownership of the means of production by workers. This can include [[profit sharing]] and worker representation on decision-making boards of corporations (a measure in vigour in [[Germany]], for instance). Some inherently capitalist measures, such as stock ownership for workers or [[stock option]]s would, however, also fit the description. Social services are important in social democracies. Such services include [[social welfare]] for the disadvantaged and [[unemployment insurance]].
=== Exception handling ===
 
Likewise, market economies in the United States and other capitalist countries have integrated some aspects of socialist economic planning. Democratic countries typically place legal limits on the centralization of capital through [[anti-trust]] laws and limits on monopolies, though the extent to which these laws are actually enforced has to do with the balance of power between the actually existing or emerging monopoly firms, as well as political ties between government and some corporations (''[[crony capitalism]]''). Ownership of stock has become common for middle class workers, both in companies they work for and in other companies (''see [[mutual fund]]''). [[Labor market]] pressures (''see'' [[labor economics]]) and regulations have encouraged profit sharing. Social welfare and unemployment insurance are mandated by law in the [[US]], [[UK]], [[Canada]] and other market economies. There is a lively debate today as to whether the world is moving closer to or farther away from "socialism", as defined by different people. Another component of this debate is whether or not these developments are to be encouraged.
try {
''statement(s)''
} catch (exception type) {
''statement(s)''
} catch (exception type) {
''statement(s)''
} finally {
''statement(s)''
}
 
== Opposition and criticisms of socialism; arguments for and against ==
''See main article: [[Criticisms of Socialism]]''
 
A number of thinkers, economists and historians have raised some issues with socialist theory. These individuals include [[Milton Friedman]], [[Ayn Rand]], [[Ludwig von Mises]], [[Friedrich Hayek]], and [[Joshua Muravchik]], to name a few. Most of their objections and critiques seem directed more at a [[command economy|centrally planned economy]] (not a part of all proposed socialisms), some at socialism and Marxism in general, but because these distinctions are relatively difficult to tease out of their writings, it is probably useful to take them up in a single context.
 
== References and further reading ==
=== Unstructured control flow ===
* Makoto Itoh, Political Economy of Socialism. London: Macmillan, 1995.
* [[Friedrich Engels]], ''The Origin Of The Family, Private Property And The State'', Zurich, 1884
* Elie Halevy, ''Histoire du Socialisme Européen''. Paris, Gallimard, 1937
* ''Market Socialism: the debate among socialists'', ed. [[Bertell Ollman]] (1998) ISBN 0415919673
* G.D.H. Cole, ''History of Socialist Thought, in 7 volumes'', Macmillan and St. Martin's Press (1965), Palgrave Macmillan (2003 reprint); 7 volumes, hardcover, 3160 pages, ISBN 140390264X
* Michael Newman, "Socialism - a Very Short Introduction", Oxford University Press (2005) ISBN 0-19-280431-6
* [[James Weinstein]], ''Long Detour: The History and Future of the American Left'', [http://www.westviewpress.com/about.html Westview Press], 2003, hardcover, 272 pages, ISBN 0813341043
* [[Leo Panitch]], ''Renewing Socialism: Democracy, Strategy, and Imagination'', ISBN 0813398215
* [[Michael Harrington]], ''Socialism'', New York: Bantam, 1972
* [[Edmund Wilson]], ''To the Finland Station: A Study in the Writing and Acting of History'', Garden City, NY: Doubleday, 1940.
* Albert Fried, Ronald Sanders, eds., ''Socialist Thought: A Documentary History'', Garden City, NY: Doubleday Anchor, 1964.
 
==See also==
Java does not have [[GOTO|goto]] statements, as their use is widely considered poor programming practice. There are, however, some uses for goto that are considered acceptable, and Java has facilities to duplicate such functionality. Note that ''goto'' is a [[reserved word]] and as such cannot be used for [[identifier]]s.
*[[Anarchism]]
 
*[[Communist state]]
 
*[[Cultural revolution]]
==== Early exit from loops ====
*[[History of socialism]]
 
*[[Infosocialism]]
Java provides two statements to exit from a loop in the midst of an iteration. The statement
*[[Ingsoc]], the totalitarian ideology in George Orwell's dystopic novel ''Nineteen Eighty-Four''<!--does link this really belong here?-->.
continue;
*[[Libertarian socialism]]
terminates the current iteration of a loop and starts the next one, behaving as a goto jumping to the top of the loop body. Similarly, the statement
*[[List of socialists]]
break;
*[[Marxism]]
exits the loop, terminating the current iteration and executing no more iterations. The effect is that of a goto jumping just past the end of the loop.
*[[Socialist economics]]
 
*[[Capitalism]]
Java's break and continue statements are more powerful than the C and C++ constructs of the same name, in that they are capable of exiting more than one loop-nesting level. Specifically, to jump out of a particular loop, one can label the loop, and then affix the label to the break or continue statement.
*[[Laissez-faire capitalism]]
To achieve similar functionality in C and C++ would require the use of a goto statement.
*[[Socialism and sexual orientation]]
 
For instance:
 
<b>outer</b>: while (true) {
<b>inner</b>: while (true) {
break; // Exits the innermost loop
break <b>inner</b>; // Also exits the innermost loop
break <b>outer</b>; // Exits the <em>outermost</em> loop
}
}
 
==== Early exit from methods ====
 
The statement
return;
terminates a method.
 
With
return aValue;
aValue may be given back to the calling method.
 
=== [[Primitive type|Primitive data types]] ===
 
<table border>
<tr>
<th>Variable Type</th>
<th>Description</th>
</tr>
 
<tr>
<td>byte</td>
<td>8-bit signed ([[two's complement]]) integer</td>
</tr>
 
<tr>
<td>short</td>
<td>16-bit signed (two's complement) integer</td>
</tr>
 
<tr>
<td>int</td>
<td>32-bit signed (two's complement) integer</td>
</tr>
 
<tr>
<td>long</td>
<td>64-bit signed (two's complement) integer</td>
</tr>
 
<tr>
<td>float</td>
<td>32-bit single-precision [[floating point]]
([[IEEE floating-point standard|IEEE 754 standard]])</td>
</tr>
 
<tr>
<td>double</td>
<td>64-bit double-precision floating point
([[IEEE floating-point standard|IEEE 754 standard]])</td>
</tr>
 
<tr>
<td>char</td>
<td>16-bit single Unicode character</td>
</tr>
 
<tr>
<td>boolean</td>
<td>true or false</td>
</tr>
</table>
 
=== Characters ===
 
Characters use the 16-bit [[Unicode]] encoding (namely [[UTF-16]]). It contains all of the usual characters, but also includes character sets for many languages other than English, including Greek, Cyrillic, Chinese, Arabic, etc.
Java programs can use all of these characters, although most editors do not have built-in support for character sets other than the usual ASCII characters.
Arrays and strings are not primitive types: they are objects.
 
=== Interfaces and Classes ===
 
One thing that Java lets one do is create an interface that classes will then implement. For example, you can create an interface like this:
 
public interface Deleteable {
public void delete ();
}
 
This interface says that anything that is Deleteable will have the exact method <code>delete()</code>. There are many uses to this concept because you can have a class like the following:
 
public class Fred implements Deleteable {
//Must include the delete () method
}
 
Then, in another class, something like this can be said.
 
public void deleteAll (Deleteable[] list) {
for (int i = 0; i < list.length; i++)
list[i].delete();
}
 
The feature is a result of compromise. The designers of Java decided not to support multi-inheritance but <code>interface</code> can be used to simulate multi-inheritance in some occasions.
 
Interfaces in Java work differently to the concept of the interface in other object-oriented programming languages - they behave much more like the concept of the [[Objective-C]] protocol.
 
===Input/Output===
 
Versions of Java prior to 1.4 only supported stream-based [[blocking IO]]. This required a thread per stream being handled, as no other processing could take place while the active [[thread]] blocked waiting for input or output. This was a major scalability and performance issue for anyone needing to implement any Java network service. Since the introduction of NIO (New IO) in Java 1.4, this scalability problem has been rectified by the introduction of a [[non-blocking IO]] framework (though there are a number of open issues in NIO [[API]] as implemented by [[Sun Microsystems|Sun]]).
 
The [[non-blocking]] IO framework, though considerably more complex than the original [[blocking IO]] framework, allows any number of "channels" to be handled by a single [[thread]]. The framework is based on the [[Reactor Pattern]].
 
The following code snippet shows how user input is accepted from a console and displayed back using stream-based [[blocking IO]] Note that the main [[thread]] will block while waiting for input from [[standard in]]. If one wanted, for instance, to display a blinking cursor, another thread would have to be created to create the blinking effect.
 
 
 
public static void main(String[] args) throws java.io.IOException {
char a;
System.out.println("Welcome user, please enter a letter");
a = (char) System.in.read();
System.out.println("Your letter was " + a);
}
 
== Early history ==
 
The Java platform and language began as an internal project at Sun Microsystems in the December [[1990]] timeframe. Patrick Naughton, an engineer at Sun, had become increasingly frustrated with the state of Sun's [[C Plus Plus|C++]] and [[C programming language|C]] [[API]]s and tools. While considering moving to [[NeXT]], Patrick was offered a chance to work on new technology and thus the '''Stealth Project''' was started.
 
The Stealth Project was soon renamed to the '''Green Project''' with James Gosling and Mike Sheridan joining Patrick Naughton. They, together with some other engineers, began work in a small office on [[Sand Hill Road]] in [[Menlo Park, California]] to develop a new technology. The team originally considered C++ as the language to use, but many of them as well as [[Bill Joy]] found C++ and the available APIs problematic for several reasons.
 
Their platform was an embedded platform and had limited resources. Many members found that C++ was too complicated and developers often misused it. They found C++'s lack of [[Automatic garbage collection|garbage collection]] to also be a problem. Security, [[distributed programming]], and [[Thread (computer science)|thread]]ing support was also required. Finally, they wanted a platform that could be easily ported to all types of devices.
 
According to the available accounts, Bill Joy had ideas of a new language combining the best of [[MESA programming language|MESA]] and C. He proposed, in a paper called Further, to Sun that its engineers should produce an [[object-oriented]] environment based on C++. James Gosling's frustrations with C++ began while working on Imagination, an [[SGML]] editor. Initially, James attempted to modify and extend C++, which he referred to as C++ ++ --, but soon abandoned that in favor of creating an entirely new language, called '''Oak''' named after the oak tree that stood just outside his office.
 
Like many stealth projects working on new technology, the team worked long hours and by the summer of 1992, they were able to demo portions of the new platform including the Green [[operating system|OS]], Oak the language, the libraries, and the hardware. Their first attempt focused on building a [[Personal Digital Assistant|PDA]]-like device having a highly graphical interface and a smart agent called Duke to assist the user.
 
The device was named '''Star7''' after a telephone feature activated by '''*7''' on a telephone keypad. The feature enabled users to answer the telephone anywhere. The PDA device itself was demonstrated on September 3, [[1992]].
 
In November of that year, the Green Project was spun off to become a wholly owned subsidiary of Sun Microsystems: '''FirstPerson, Inc'''. The team relocated to Palo Alto. The FirstPerson team was interested in building highly interactive devices and when [[Time Warner]] issued an RFP for a [[set-top box]], FirstPerson changed their target and responded with a proposal for a set-top box platform. However, the cable industry felt that their platform gave too much control to the user and FirstPerson lost their bid to [[SGI]]. An additional deal with [[3DO]] for a set-top box also failed to materialize. FirstPerson was unable to generate any interest within the [[cable TV]] industry for their platform. Following their failures, the company, FirstPerson, was rolled back into Sun.
 
=== Java meets the Internet ===
 
In June and July of [[1994]], after a 3 day brain storm session with John Gage, James Gosling, Bill Joy, Patrick Naughton, Wayne Rosing, and Eric Schmidt, the team re-targeted yet again its efforts, this time to use the technology for the [[Internet]]. They felt that with the advent of the [[Mosaic web browser]], the Internet was on its way to evolving into the same highly interactive vision that they had had for the cable TV network. Patrick Naughton wrote a small web browser, WebRunner, as a prototype. WebRunner would later be renamed [[HotJava]].
 
It was also in 1994, that Oak was renamed '''Java'''. An IP ([[intellectual property]]) search revealed that Oak had already been trademarked for another language so the team searched for a new name. The name Java was coined at a local coffee shop frequented by some of the members. It is not clear whether the name is an acronymn or not. Most likely, it is not, however some accounts claim that it stands for the names of '''J'''ames Gosling, '''A'''rthur '''V'''an Hoff, and '''A'''ndy Bechtolsheim.
 
In October of 1994, HotJava and the Java platform was demoed for Sun executives. Java 1.0a was made available for download in 1994, but the first public release of Java and the HotJava [[web browser]] came on [[May 23]], [[1995]], at the SunWorld conference. The announcement was made by John Gage, the Director of Science for Sun Microsystems. His announcement was accompanied by a surprise announcement by [[Marc Andreessen]], Executive Vice President of [[Netscape_Communications_Corporation|Netscape]], that Netscape would be including Java support in its browsers.
 
In January of [[1996]], the JavaSoft business group was formed by Sun Microsystems to develop the technology.
 
== APIs ==
 
Sun has defined 3 platforms targeting different application environments and segmented many of its APIs so that they belong to one of the platforms. The platforms are:
 
*[[Java 2 Platform, Micro Edition]] - targeting environments with limited resources
*[[Java 2 Platform, Standard Edition]] - targeting workstation environments
*[[Java 2 Platform, Enterprise Edition]] - targeting large distributed enterprise or internet environments.
 
The [[Class (computer science)|classes]] in the Java APIs are organized into separate groups called [[Package (computing)|packages]]. Each package contains a set of related [[interface]]s, classes and [[Exception handling|exceptions]]. Refer to the separate platforms for a description of the packages available.
 
The set of APIs is controlled by Sun Microsystems in cooperation with others through its [[Java Community Process]] program. Companies or individuals participating in this process can influence the design and development of the APIs, but Sun retains ownership and control of the APIs. This process has been a subject of controversy.
 
 
 
== Version history ==
 
The Java language has undergone several changes since JDK 1.0 as well as numeral additions of packages to the standard library:
 
* 1.0 (1996) - this initial release included the Java runtime (the virtual machine and the class libraries), and the development tools (e.g. the Javac compiler). Later, Sun also provided a runtime-only package, called the Java Runtime Environment (JRE).
* 1.1 (1997) - this added the concept of [[Inner classes]], which allow classes to be nested within other classes. This feature is particularly useful for writing brief, one-time implementations of interfaces, such as those used in [[Event-driven programming|event handling]].
* 1.2 (1998) - the version marked the significant improvement in the language as well as the bundled library. To emphasize the radical change, with this version, Sun officially rechristened the Java platform ''Java 2''.
* 1.3 (2000) - only minor changes and fixes were made.
* 1.4 (2002) - this is the most widely used version as of 2004. The release added the [[Assertion (computing)|assert]] keyword, which helps to find errors that might otherwise be difficult to notice or track down.
* 5 - The 1.5 release was renamed to Java 2 version 5. This is the most recent release. it includes a number of new language features:
** [[Generic programming|Generics]] - Provides compile-time type safety for collections and eliminates the need for most [[typecast]]s.
** Autoboxing/unboxing - Automatic conversions between [[primitive type]]s (such as int) and [[wrapper type]]s (such as [[Integer]]).
** [[Metadata]] - allows language constructs such as classes and methods to be tagged with additional data, which can then be processed by metadata-aware utilities
** [[Enumeration (programming)|Enumerations]] - the '''enum''' keyword creates a typesafe, ordered list of values (such as Day.monday, Day.tuesday, etc.). Prior to Java 1.5, non-typesafe integer constants were used for this purpose.
** Enhanced '''for''' [[Program loop|loop]] - the '''for''' loop in Java 1.5 can easily iterate over each member of an array or collection, using a construct of the form: ''for ([[Widget]] w : box) { System.out.println(w); }''. This example iterates over each item in ''box'', assigning it in turn to the variable ''w'', which is then printed to System.out.
 
In addition to the language changes, much more dramatic changes have been made to the Java class library over the years, which has grown from a few hundred classes in Java 1.0 to over three thousand in Java 5. Entire new APIs, such as [[Swing (Java)|Swing]] and [[Java2D]], have been introduced, and many of the original 1.0 classes and methods have been deprecated.
 
[[Extension (computing)|Extension]]s and architectures closely tied to the Java programming language include:
*[[J2EE]] (Enterprise edition)
*[[J2ME]] (Micro-Edition for PDAs and cellular phones)
*[[JMF]]
*[[JNDI]]
*[[JSML]]
*[[JDBC]]
*[[JAIN]]
*[[JDMK]]
*[[Jini]]
*[[Jiro]]
*[[JXTA]]
*[[JavaSpaces]]
*[[JMI]]
*[[Java Management eXtensions|JMX]]
*[[JSP]]
*[[JSF]]
 
== Interpreted version ==
 
There is an interpreted version of Java called ''[[beanshell]]'' which may be used as a shell scripting language.
The interpreter may be embedded in a Java application to make it scriptable.
 
== Related [[free software]] ==
 
* [[GCJ]], a Java compiler that comes as part of [[GNU Compiler Collection|GCC]], the GNU Compiler Collection
* [[GNU Classpath]], GNU's replacement for Sun's proprietary class libraries
* The [[Jakarta Project]] produces free software in Java, especially tools for building [[World Wide Web|web]] applications
* [[kaffe]], a clean room implementation of the Java virtual machine with associated class libraries
* [[SableVM]], ([[LGPL]]ed) Java Virtual Machine meant to be robust, efficient and portable
* [[Eclipse_(computing)|Eclipse]], ([[Common_Public_License|CPLed]]) Free Java [[Integrated_Development_Environment|IDE]] for developing in Java and other programming languages.
* [[NetBeans]] Free Java based [[Integrated_Development_Environment|IDE]] for developing in Java and other programming languages.
* [[SuperWaba]], ([[LGPL]]ed) A Java-like Virtual Machine, with a minimalistic design suitable for PDA programming
* [[JUnit]], a widely used framework for creating automated unit tests, a powerful tool to reduce the risks of refactoring code.
* [[JSwat]], a standalone, graphical Java debugger
* [[JCreator]], a Java [[Integrated development environment]], with project management, code-completion, debugger interface, editor with syntax highlighting, a fully customizable user interface, and more
 
== See also ==
 
* [[Java API]]
* [[Java virtual machine]]
* [[GNU_Compiler_Collection|gcc]] (includes a Java to machine language compiler)
* [[Comparison of Java to C Plus Plus|Comparison of Java to C++]]
* [[Eclipse (computing)|Eclipse]] (Open source [[Integrated Development Environment|IDE]])
* [[NetBeans]] (Another open source IDE)
* [[Optimization of Java]]
* [[Java Platform Debugger Architecture]]
* [[List of Java-programs]]
* [[Java User Group]]
* [[Artefaktur]]
* [[Java XML]]
* [[Java Servlet]]
* [[Java 2 Platform, Standard Edition]] (J2SE)
* [[Javapedia]]
* [[Java community]]
* [[JavaOS]]
 
== External links ==
*[http://www.marxismonline.com Marxism Online]
*[http://revcom.us/ Revolutionary Communist Party USA] ''Revolution'' paper online
*[http://www.awtw.org/rim/index.htm Revolutionary Internationalist Movement] Coalition of various Marxist-Leninist-Maoist parties from around the world
*[http://atlanta.rcyb.info/ Revolutionary Communist Youth Brigade, Atlanta] Youth organization and supporters of the RCP, USA
*[http://www.socialistinternational.org/ Socialist International]
*[http://www.pbs.org/heavenonearth/ PBS Heaven on Earth : the Rise and Fall of Socialism]
*[http://www.thinksocialist.com/wordpress/ ThinkSocialist - Commentary, News, and Discussion of Socialism]
*[http://directory.google.com/Top/Society/Politics/Socialism/Opposing_Views/ Google Directory collection of critical articles]
*[http://www.pathfinderpress.com Pathfinder Books, Socialist bookstore online]
*[http://www.rebelforums.org/ The Rebel Alliance Leftist Community], home to the '''Rebel Alliance Forums''' and other articles on [[socialism]], [[communism]] and [[anarchism]]
*[http://www.econlib.org/library/Mises/msS.html ''Socialism: An Economic and Sociological Analysis''] a critique by Ludwig von Mises
*[http://www.revolutionaryleft.com Revolutionary Left], active forum with theoretical discussions of different revolutionary socialist ideologies
*[http://www.econlib.org/library/Enc/Socialism.html ''Socialism'' by Robert Heilbroner]
*[http://www.polyarchy.org/essays/english/socialism.html Socialism/Antisocialism - The transformation from socialism to statism]
*[http://www.islamic-finance.com/indexnew.htm ''Socialist Thought''] compares French and English schools
*[http://easyweb.easynet.co.uk/~rcgfrfi/ww/castro/1992-csw.htm ''Capitalism is a Society of Wolves'' by Fidel Castro] Criticism of capitalism in support of socialism
*[http://www.socialistworld.net Committee For a Workers International CWI/CIT] active in over 35 countries
*[http://www.hooverdigest.org/051/friedman.html ''The Battle's Half Won'' by Milton Friedman] "We have succeeded in stalling socialism. Can the Bush administration reverse it?"
*[http://www.huppi.com/kangaroo/L-hitler.htm ''Myth: Hitler was a leftist.'' by Steve Kangas] "Fact: Nearly all of Hitler's beliefs placed him on the far right."
 
[[Category:Politics]]
* [http://java.sun.com Official Java Home Site]
[[Category:Socialism]]
** [http://java.sun.com/docs/white/langenv/ Original Java whitepaper]
[[Category:Political ideology entry points]]
** [http://java.sun.com/docs/books/jls/second_edition/html/jTOC.doc.html The Java Language Specification, 2nd edition] Pedantic description of all of the Java language
[[Category:Human societies]]
* [http://www.beanshell.org beanshell] Interpreted version
* [news:comp.lang.java Java newsgroup] ([http://groups.google.com/groups?group=comp.lang.java Google's web interface])
* [http://www.jdistro.com/ A pure java desktop]
* [http://wiki.java.net/bin/view/Javapedia/ Javapedia project]
* [http://java.sun.com/docs/books/tutorial/ Sun's tutorial on Java Programming]
* [http://java.sun.com/j2se/1.4.2/docs/api/ Documentation for the latest Java 2 Standard Edition API, v1.4.2]
* [http://www.illegalaccess.org/ Vulnerabilities in Java Environments]
* [http://java.sun.com/features/1998/05/birthday.html Java(TM) Technology: The Early Years]
* [http://java.sun.com/people/jag/green/index.html A Brief History of the Green Project]
* [http://www.wired.com/wired/archive/3.12/java.saga.html The Java Saga]
* [http://www.bruceeckel.com/ Thinking in Java], by Bruce Eckel
* [http://ei.cs.vt.edu/~history/Youmans.Java.html Java: Cornerstone of the Global Network Enterprise]
* http://ei.cs.vt.edu/~wwwbtb/book/chap1/java_hist.html
* http://www.ibiblio.org/javafaq/javafaq.html
* [http://www.superwaba.com.br SuperWaba, a Java-like virtual machine]
* [http://www.salon.com/tech/col/garf/2001/01/08/bad_java/ ''Java: Slow, ugly and irrelevant '' (Salon)]
* [http://www.jwz.org/doc/java.html ''java sucks''], by [[Jamie Zawinski]]
* [http://ibiblio.org/obp/thinkCS/ How to Think Like a Computer Scientist] Java version
 
{{List_of_programming_languages}}
 
[[ast:Socialismu]]
[[Category:Sun Microsystems]]
[[zh-min-nan:Siā-hoē-chú-gī]]
[[Category:Programming languages]]
[[ca:Socialisme]]
[[ar:&#1580;&#1575;&#1601;&#1575;]]
[[bgcs:JavaSocialismus]]
[[da:Socialisme]]
[[cs:Java (programovací jazyk)]]
[[de:Java (Programmiersprache)Sozialismus]]
[[eoet:JavaSotsialism]]
[[es:Socialismo]]
[[es:Java (lenguaje de programación)]]
[[fieo:JavaSocialismo]]
[[fa:سوسیالیسم]]
[[fr:Langage de programmation Java]]
[[hefr:JavaSocialisme]]
[[id:Sosialisme]]
[[hu:Java programozási nyelv]]
[[it:Java (linguaggio)Socialismo]]
[[he:סוציאליזם]]
[[ja:Java&#35328;&#35486;]]
[[lt:Java (kalba)Socializmas]]
[[hu:Szocializmus]]
[[nl:Programmeertaal Java]]
[[plms:JavaSosialisme]]
[[runl:JavaSocialisme]]
[[ja:社会主義]]
[[sv:Programspråket Java]]
[[no:Sosialisme]]
[[uk:&#1052;&#1086;&#1074;&#1072; &#1087;&#1088;&#1086;&#1075;&#1088;&#1072;&#1084;&#1091;&#1074;&#1072;&#1085;&#1085;&#1103; Java]]
[[nn:Sosialisme]]
[[zh:Java&#32534;&#31243;&#35821;&#35328;]]
[[pl:Socjalizm]]
[[pt:Socialismo]]
[[ro:Socialism]]
[[sco:Socialism]]
[[simple:Socialism]]
[[sr:Социјализам]]
[[fi:Sosialismi]]
[[sv:Socialism]]
[[zh:社会主义]]