Main Page

From Java4c

(Difference between revisions)
(First substantiate text)
Line 6: Line 6:
* Using Java for program and test, and translate the sources to C.  
* Using Java for program and test, and translate the sources to C.  
-
First page: [[os_types_def]].
+
===Why Java?===
 +
Java is not only a language for internet applications. Java is a programming system for common usage. The first approach to develop Java in 1994 was: Creation of a portable language for embedded applications. Java is used in some embedded applications like mobil phones, routers. It is present with a ''JTRES'': ''Java Technology for Realtime Embedded Systems'' provided by companies like Sun/Oracle, Aicas, Aonix/Atego and others.
-
==Welcome to Your New Wiki==
+
The Java-syntax for expressions is similar like C. Java is strong declarative, like C. The differences to C are:
-
A wiki is a powerful tool that allows multiple users to collaborate and share content rapidly. The best example of this is Wikipedia, which is powered by the exact same software that this wiki is!
+
* ObjectOrientation
 +
* It is a Language of a new generation. The C-style of programming was born in 1970 with orientation to structured programming. Java was born in 1994.
 +
* Java supports a better test of algorithms. If there are any errors for example in the addressing (indexing) of arrays, it is detected safely in runtime. The algorithms need not be tested step by step to prevent such errors. A paradigma ''compile 'n run'' can be used. The time for testing can be reduced drasticly without reducing the quality of software respectively more complex algorithms can be tested in the same time like simple algorithm in C or C++.
-
==First Steps==
+
Java uses dynamic data. The approach of dynamic data helps to handle with variegated data in many threads in large applications. For example the String-processing needs dynamic memory. But it is also possible to handle with static data (allocated on startup). For example, String processing using a StringBuilder-instance and the CharSequence-interface can execute without allocation of memory. Static data are proper to use for embedded systems often.
-
# An administrative user has already been created for you with all rights over this wiki. You should first [[Special:UserLogin|log in]] using <br>'''Username:''' admin<br>'''Password:''' changeme
+
-
# Click on [[Special:Preferences|my preferences]] and change the admin password. <font color="red">Critical:</font> If you don't do this, other users can take over your wiki.
+
-
# Click on the Control Panel link under "editthis.info tools" in on the left hand side of this page. From here you can set the Logo Image for your wiki that appears in the upper left of all pages.
+
-
==Optional Secondary Steps==
+
===Why not C++?===
-
# Add your wiki to the [http://editthis.info/wiki/Categorized_Wiki_List Categorized List of Wikis]
+
C++ is ObjectOriented and a modern programming language too. It is downward-compatible with C.  
-
# Promote your wiki by posting to your favorite social networks
+
 
-
# Create another user with a more personalized username (first log out, then click create an account).
+
But the usual programming style in C++ divergates from the style in C. There are handled with dynamic memory in some basic classes, complex constructs using the template concept are usual. An ordinary C++-program can't be used for embedded programming often.
-
# Join the [http://groups.google.com/group/editthisinfo EditThis.info News Group]
+
 
-
# Edit this page and replace it's content with something more interesting for new visitors.
+
The disadvantages of the C-language: Unsafe pointer arithmetic, arbitrary casts, unchecked array addressing are all present in C++ too. C++ doesn't help for testing such errors like C.  
-
# Read [http://editthis.info/wiki/How_to_make_a_successful_wiki How to make a successful wiki]
+
 
-
# Read the [http://editthis.info/wiki/Help:Contents Help Page]
+
==The key author of this site==
 +
 
 +
has experience in embedded programming since 1977, beginning with Assembler programming with the Z80-processor. I'm working for a company in germany in themes of embedded control. This site presents experiences independently of concretely job definitions.
 +
 
 +
==The mission of this site==
 +
 
 +
Exchange of experiences. You can take place on discussion. You can complement the text of the pages with your experience and knowledge. 
 +
 
 +
==Guide through the site==
 +
 
 +
TODO
 +
*Style of programming in C: ObjectOrientation, OSAL layer, re-using
 +
*CRuntimeJavalike
 +
*Java2C-translator
 +
 
 +
First page: [[os_types_def]].

Revision as of 07:15, 21 February 2011

Contents

Java4C

Goals:

  • Using Java-programming language for embedded software in cooperation with C (and C++-) software.
  • Using a ObjectOriented style of programming also in C!
  • Using Java-like basic routines inclusive operation-system-calls.
  • Using Java for program and test, and translate the sources to C.

Why Java?

Java is not only a language for internet applications. Java is a programming system for common usage. The first approach to develop Java in 1994 was: Creation of a portable language for embedded applications. Java is used in some embedded applications like mobil phones, routers. It is present with a JTRES: Java Technology for Realtime Embedded Systems provided by companies like Sun/Oracle, Aicas, Aonix/Atego and others.

The Java-syntax for expressions is similar like C. Java is strong declarative, like C. The differences to C are:

  • ObjectOrientation
  • It is a Language of a new generation. The C-style of programming was born in 1970 with orientation to structured programming. Java was born in 1994.
  • Java supports a better test of algorithms. If there are any errors for example in the addressing (indexing) of arrays, it is detected safely in runtime. The algorithms need not be tested step by step to prevent such errors. A paradigma compile 'n run can be used. The time for testing can be reduced drasticly without reducing the quality of software respectively more complex algorithms can be tested in the same time like simple algorithm in C or C++.

Java uses dynamic data. The approach of dynamic data helps to handle with variegated data in many threads in large applications. For example the String-processing needs dynamic memory. But it is also possible to handle with static data (allocated on startup). For example, String processing using a StringBuilder-instance and the CharSequence-interface can execute without allocation of memory. Static data are proper to use for embedded systems often.

Why not C++?

C++ is ObjectOriented and a modern programming language too. It is downward-compatible with C.

But the usual programming style in C++ divergates from the style in C. There are handled with dynamic memory in some basic classes, complex constructs using the template concept are usual. An ordinary C++-program can't be used for embedded programming often.

The disadvantages of the C-language: Unsafe pointer arithmetic, arbitrary casts, unchecked array addressing are all present in C++ too. C++ doesn't help for testing such errors like C.

The key author of this site

has experience in embedded programming since 1977, beginning with Assembler programming with the Z80-processor. I'm working for a company in germany in themes of embedded control. This site presents experiences independently of concretely job definitions.

The mission of this site

Exchange of experiences. You can take place on discussion. You can complement the text of the pages with your experience and knowledge.

Guide through the site

TODO

  • Style of programming in C: ObjectOrientation, OSAL layer, re-using
  • CRuntimeJavalike
  • Java2C-translator

First page: os_types_def.

Personal tools