Sign in

username:

password:



Not a member?

Search Comp.Arch.Embedded



Search tips

embedded by Keywords

68HC11 | 68HC12 | 8051 | 8052 | ARM | ARM7 | Asic | AT91 | AT91RM9200 | Atmel | AVR | AVRStudio | Bootloader | CFP | CompactFlash | Cygnal | Cypress | Dataflash | DSP | eCos | EEPROM | Embedded Linux | Emulator | Endian | Ethernet | Firewire | FPGA | Freescale | GCC | GNUARM | GSM | H8 | HDLC | I2C | Infineon | Interrupts | Java | JTAG | LCD | LED | LPC2000 | MCU | Microchip | MMC | MPLAB | MSP430 | PC104 | PCB | PCI | PCMCIA | PowerPC | Rabbit | RS232 | RS485 | RTOS | SBC | SDRAM | Sensor | SPI | STK500 | UART | UML | USART | USB | Verilog | VHDL | VxWorks | Xilinx

Ads

Discussion Groups

Discussion Groups | Comp.Arch.Embedded | Shall I move from C to Java?

There are 35 messages in this thread.

You are currently looking at messages 10 to 20.

Re: Shall I move from C to Java? - =?ISO-8859-1?Q?Hans-Bernhard_Br=F6ker?= - 05:22 14-08-07

[X-post lacked F'up2, reduced to one group]

dick wrote:

> If I design a HW platform, how can I run Java in this bare machine.

I'll be blunt.  If you must ask, you can't.



Re: Shall I move from C to Java? - Jim Granville - 06:57 14-08-07

dick wrote:
> Hi everyone,
> 
> I am planning to learn Java.
> 
> Can I access HW registers in Java? Or can I call C function from Java
> program?

Read up on this,

http://www.maxim-ic.com/products/microcontrollers/tini/

"The platform is a combination of the broad-based I/0, a full TCP/IP 
stack, and an extensible Java runtime environment that simplifies 
development of the network connected equipment"

and also this
http://www.parallax.com/javelin/index.asp

and this is not Java, but could be more interesting :

http://www.parallax.com/propeller/index.asp

a code example is here
http://obex.parallax.com/objects/30/


-jg


Re: Shall I move from C to Java? - Michael N. Moran - 07:55 14-08-07

dick wrote:
> Can I access HW registers in Java? 

Not directly.

> Or can I call C function from Java
> program?

My java is *way* rusty but ... you might
take a look at the "javah" tool, which is used
to generate C/C++ header files and stubs based
on a java class file.


-- 
Michael N. Moran           (h) 770 516 7918
5009 Old Field Ct.         (c) 678 521 5460
Kennesaw, GA, USA 30144    http://mnmoran.org

"So often times it happens, that we live our lives in chains
  and we never even know we have the key."
"Already Gone" by Jack Tempchin (recorded by The Eagles)

The Beatles were wrong: 1 & 1 & 1 is 1

Re: Shall I move from C to Java? - Clever Monkey - 11:57 14-08-07

dick wrote:
> Tim Wescott wrote:
>> On Mon, 13 Aug 2007 22:07:16 -0700, dick wrote:
>>
>>> Hi everyone,
>>>
>>> I am planning to learn Java.
>>>
>>> Can I access HW registers in Java? Or can I call C function from Java
>>> program?
>>>
>>> Thanks.
>> Even though I don't know much about Java, I know these tidbits:
>>
>> No, you cannot directly access hardware from Java.  I would be surprised
>> to find a serious Java for embedded use that did not include library
>> functions to do so, however.
>>
>> Java itself doesn't provide a means to call C functions, but most Java run
>> time environments provide a means to call external code.  Of course, if
>> you're calling external code then you have to maintain code bases in C
>> _and_ Java...
> 
> If I design a HW platform, how can I run Java in this bare machine.
> 
[Please don't quote signature blocks.  I've correct this here.]

This is, of course, getting way off-topic for comp.lang.c.  I'm sure 
there is an "embedded Java" newsgroup out there, and Google returns a 
sick amount of hits for that phrase.

However, it may be instructive to consider that implementing embedded 
systems does not have to be all bare-metal bit-banging.  There is a 
relatively long tradition of interpreted byte-code slinging in the 
embedded world.

It really depends on your application and deployment.
-- 
clvrmnky <mailto:s...@clevermonkey.org>

Direct replies will be blacklisted.  Replace "spamtrap" with my name to
contact me directly.

Re: Shall I move from C to Java? - dick - 13:00 14-08-07

Hans-Bernhard Br=F6ker wrote:
> [X-post lacked a F'up2; reduced to one group]
>
> dick wrote:
>
> > I am planning to learn Java.
>
> Why, given you clearly don't know if it's going to do you any good?
>
> > Can I access HW registers in Java? Or can I call C function from Java
> > program?
>
> If you must ask, that strongly implies it's a bad idea for you to learn
> Java at this point.  You have to analyze what it means to use Java
> instead of C first.

Is there any C syntax extension that support multi-thread like Java
syntax?
or how can I use  C Macro to hide the OS routine call in C program?

I don't like the style:
fun(...)
{
p();
.
.
.
v();
}

I want to use
syn fun(...)
{
.
.
.
}


another question is how to disable "goto", can I write #define goto
error("no goto")


Re: Shall I move from C to Java? - =?ISO-8859-1?Q?Hans-Bernhard_Br=F6ker?= - 14:37 14-08-07

dick wrote:
> Hans-Bernhard Bröker wrote:
>> [X-post lacked a F'up2; reduced to one group]

>> dick wrote:

> Is there any C syntax extension that support multi-thread like Java
> syntax?

No.

> or how can I use  C Macro to hide the OS routine call in C program?

What makes you think you need to do that, or that OS routine calls would 
even exist in an embedded systems?

Re: Shall I move from C to Java? - Vladimir Vassilevsky - 16:15 14-08-07


dick wrote:
> Hi everyone,
> 
> I am planning to learn Java.
> 
> Can I access HW registers in Java? Or can I call C function from Java
> program?
> 
> Thanks.


http://www.microsoft.com/mspress/books/10457.aspx


Vladimir Vassilevsky

DSP and Mixed Signal Design Consultant

http://www.abvolt.com

Re: Shall I move from C to Java? - Army1987 - 17:27 14-08-07

On Tue, 14 Aug 2007 20:15:12 +0000, Vladimir Vassilevsky wrote:

> 
> 
> dick wrote:
>> Hi everyone,
>> 
>> I am planning to learn Java.
>> 
>> Can I access HW registers in Java? Or can I call C function from Java
>> program?
>> 
>> Thanks.
> 
> 
> http://www.microsoft.com/mspress/books/10457.aspx
It appears to have nothing to do with C <ot>nor with Java</ot>.
-- 
Army1987 (Replace "NOSPAM" with "email")
No-one ever won a game by resigning. -- S. Tartakower


Re: Shall I move from C to Java? - user923005 - 18:31 14-08-07

On Aug 13, 10:07 pm, dick <dick_12345...@hotmail.com> wrote:
> Hi everyone,
>
> I am planning to learn Java.

http://www.cafeaulait.org/javafaq.html
followed by news:comp.lang.java

> Can I access HW registers in Java?

No.

> Or can I call C function from Java
> program?

Do a web search for "JNI java".  It's a bloody pain in the posterior.
As far as I can see, you have no C questions whatsoever in your post.
Probably, Java questions go better in a Java group.



Re: Shall I move from C to Java? - larwe - 19:36 14-08-07

On Aug 14, 4:15 pm, Vladimir Vassilevsky <antispam_bo...@hotmail.com>
wrote:
> dick wrote:
> > Hi everyone,
>
> > I am planning to learn Java.
>
> http://www.microsoft.com/mspress/books/10457.aspx

What has Microsoft's proprietary closed nonsense got to do with Java?
Or, for that matter, embedded programming?



previous | 1 | 2 | 3 | 4 | next