aspose file tools*
The moose likes Beginning Java and the fly likes Problem with JCreator LE Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Problem with JCreator LE" Watch "Problem with JCreator LE" New topic
Author

Problem with JCreator LE

Neil Cartmell
Ranch Hand

Joined: Feb 13, 2010
Posts: 150
Hi I've been using Jcreator LE. At first I was using a version that I got on a disc that came with "Java For Dummies". But I started having this problem. The problem was I was making changes to the code I was writing and Jcreator wasn't recognising these changes. So when I compiled and then ran the program again it still would run the old version of the code. And I am definitely compiling the code again before running it - just thought i would point that out as i think that might be the first novice mistake someone could make.

I thought this may be just a bug so i erased the Java For Dummies version off my computer and installed the current version on the Jcreator website. But I've now just had a similar problem again. I had programmed in a simple calculator and it was working fine but then i decided to change it slightly. I changed it so it now printed "The answer is..." instead of it JUST printing the answer.

I compiled and ran the code and it worked fine but THEN....I must have touched something or pressed some button because now it will only run the older version of my calculator code. Even when I compile and run it with the new change it will only run the old one. Even if I delete half the code it will only run the old one.

So I'm guessing this isn't a bug and I've just done something. Anyone have any ideas?
Neil Cartmell
Ranch Hand

Joined: Feb 13, 2010
Posts: 150
I just thought i would give an example. I think this was my original code. Not sure if i've messed it up now though.





Here is my new code. That runs EXACTLY the same.




You will see i have just changed it from printing out the answer to the sum to just saying "the answer is poo".

But the weird thing is if i delete the curly brace that closes the method, it won't run. So it's not completely frozen.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
Are you able to save the new code anywhere? Can you compile it from the command line there? Are you using the automatic "build" buttons on JC? Are you getting any error messages?
Neil Cartmell
Ranch Hand

Joined: Feb 13, 2010
Posts: 150
Campbell Ritchie wrote:Are you able to save the new code anywhere? Can you compile it from the command line there? Are you using the automatic "build" buttons on JC? Are you getting any error messages?


hi thanks for the reply. I'm unfamiliar with some of the basic terms still. So sorry if i misunderstand

"are you able to save the new code anywhere?"

All i know how to do is hit save. I've saved it and when i open it after turning off the computer the problem still persists. I can however copy and paste the code and then run it in eclispe and it works fine. However Eclipse is so complicated it confuses me for the time being i would like to continue using JCreator.


"Can you compile from the command line there?"

Sorry i have heard the term but i'm not sure what command line is. And yes i am using the automatic build fuctions on JC. I use the drop down menu for build and run. And i also sometimes use the shortcuts F7 and F5.

I will only get error messages if I erase an important part of the code. Like a variable or something that could cause an error message. However strangely when i alter something like what i want printed out in the quotation marks. It does alter. If i add an if statement it does not seem to acknowlage i have added an if statement.

Sorry if i've misunderstood some of the questions. I'm only just getting to grips with the basics and i'm still not sure of a lot of the teminology.
Neil Cartmell
Ranch Hand

Joined: Feb 13, 2010
Posts: 150
Also i should add even if i leave off a quotation mark - which usually would be enough to cause an error - it does not cause an error. Or if I don't close a bracket. But changing certain parts of the code does cause a problem.

Do you think this is likely just a bug?
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
For the time being, stop using JCreator and use a decent text editor. Since JCreator only works on Windows, you will need something which also works on Windows: google for notepad2, notepad++ and jEdit which should all work on Windows boxes, and are much better than MS NotePad.
Run everything from the command line.
Neil Cartmell
Ranch Hand

Joined: Feb 13, 2010
Posts: 150
Thanks for your help.

I've decided to give eclipse another go. I've spent the day on it and it's not so complicated now i've learned not to keep accidently closing all the windows! Before i was getting lost in a windows opening and closing maze! lol

Although i have another problem with some code so i hope no one minds if i post another topic today.
Michael Dunn
Ranch Hand

Joined: Jun 09, 2003
Posts: 4632
were your original programs applets?
Neil Cartmell
Ranch Hand

Joined: Feb 13, 2010
Posts: 150
Michael Dunn wrote:were your original programs applets?


No i haven't learned much about applets yet.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
Since you appear to have an answer to a similar question here, I shall close this thread to avoid duplication of effort.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38363
    
  23
Neil Cartmell has disagreed with me that the threads are about the same thing, so I shall admit my error and mistake in closing this thread, and apologise. I am sorry.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Problem with JCreator LE