Win a copy of Re-engineering Legacy Software this week in the Refactoring forum
or Docker in Action in the Cloud/Virtualization forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

C to Java (stuck)

 
Scott Jones
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'll start with a little history, my crazy java teacher hasn't taught us nearly anything all semester, and now he decides to give us a final on something he's never done before. He asked us to convert a c program into java. Oh, he said we could use any resorces we could get our hands on, so here i am .

This is what i have done so far. I downloaded c2j and converted the c files into java. I then loaded those java files into blue J. It compiles, however, it never launches a program. I'm assuming im missing something obvious but like i said, i'm new to this so have mercy lol.

The goal is to get the code in those files into java and make a program start. It is suppost to be a fractal compression program.

Take a look at and/or download the c souce or my current progress, feel free at www.geocities.com/arieswrath101/

Thanks!
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I get the impression your teacher is looking for you to convert the program, not for a C-to-Java converter to do it for you. Java is very much like a "Super C", and it uses many of C's constructs, so you should be able to figure out how to do the same thing in Java that you do in C. I recommend going to java.sun.com, downloading the tutorial, and at least read "Your First Cup of Java". Then you can post more-specific questions about your project rather than asking us to do your homework for you. Good luck!


-----
Give a man a fish, and he eats for one day; teach a man to fish, and he eats for a lifetime.
-----
[ November 05, 2004: Message edited by: Jeff Bosch ]
 
Scott Dunbar
Ranch Hand
Posts: 245
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As a side note - posting the same question on multiple forums will likely get you a pretty similar answer
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Seems to be a lot of that happening around these here parts lately. (Sorry about the bad drawl - it's Friday afternoon and my brain is hurting for some entertainment!)
 
Mike Gershman
Ranch Hand
Posts: 1272
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
BTW, do you know any C?
Do you know any Java?
 
Jeff Bosch
Ranch Hand
Posts: 805
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm assuming that question is directed at the original poster.

 
Rose Evans
Ranch Hand
Posts: 195
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Scott,

Tell me, did you take C++ I and II? I'm currently taking C++ II and it is confusing as ever! And along with that, I am in my first class of Java, which blows my mind as well. However, I have noticed I'm getting pretty good with applets. They are so fun. I guess, like my teacher told me, I'll be an applet queen someday. Ha.
Good luck with your progress.

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic