Confusion on how to finish a new program? - java

I am currently doing a project for my java class and im a total beginner so apologies because i'm sure the answer is quite obvious. A few weeks back I made a program called TravelExpenses which calculated how much a trip would cost. Now, I must make a new program that is completely different. After coding and pressing play, The same window pops up from my previous program, how do I get rid of it? Photo

In the package explorer, right click your new class and choose run as.. java program
The next time you press play it will launch the recent one.

Related

Error that runs mistakenly the previous codes when Actually want to run the current code in NetBeans

I've got problem with my NetBeans app, once I click on the run button, it runs the previous program
I coded. Like in the image, I ran the program (Which is PasswordGUI) and it indescribably ran the previous code (Which was Ourproject)
.. So, I'm stuck in here and need help
best wishes
I tried to search if my project in the app have kind of untidy which may this problem the untidiness
of my projects..

How do you quickly compile and run in BlueJ?

I've used IntelliJ and VSC before, both of which had nice one-button solutions to compile and run, even going as far as having keyboard shortcuts for it as well. But unfortunately, for reasons I'm not in the mood to get into right now, and cannot change, I have to use BlueJ for certain projects in my class.
Don't get me wrong, I actually do like using BlueJ on simpler and smaller projects with it's simple interface, but one thing that really limits the speed I work at is having to hit "Compile", right-clicking the tester class, clicking "void main", and then hitting "Okay", EVERY single time I want to test the code. It's sluggish and takes infinitely longer than one button or a keyboard shortcut.
Is there any way, external modification or otherwise, that I could have a simpler method for compiling and running code in BlueJ? Even saving on one or two of these clicks would be greatly appreciated.

Problems with WallTile in JAVA

I'm trying to create a Game Engine in java, as a way of learning in a course I'm attending, and now I'm learning how to program collisions between the player and a wall. But there's one problem I haven't seen anyone having, that basically my character runs into a wall and he just stops responding. And the way I say it, it's not like the program stopped responding, it's more like leaning against a wall the controls stop working, because even though everything seems to be stopped, the FPS keeps counting.
Here are screenshots of the parts I think are most important to show for this specific issue:
enter image description here
enter image description here
Here's the file and codes on github for a deeper look:
https://github.com/TheAwesomeCake/Game-Engine.git

Module not specified?

I have recently started learning android development, and I just built an app that changes color and text based on pushing buttons and gestures. It ran fine on my phone (Yay!), but then on my second run, an error occurred. When hitting the "run" button, an edit configurations window opened up:
I also noticed, that on the side where my project tree should be is this instead:
I don't think there is an issue in the code because it was running fine before, but I would be happy to post the code if needed.
Also
I dont know if this was the reason, but i'll include this anyway, I tried changing the name of my project, but it wouldn't work, but I changed it back. I included this in my question because that's literally the only thing I did before this error occured.
Thank you so much for helping out a fellow programmer, I really appreciate it. I have been looking at many other forums (for some hours) about this topic, but still couldn't trouble shoot this problem. It seems kind of odd that it was working first, and then it just randomly stopped working. I cant wait for your response!
Here is the dropdown for Module:
As you can see, that is the only option.
Are you sure you are opening the project as android gradle project ?
Try to import the program not open it

Java Robot key activity seems to stop working while certain software is running

I'm writing a Java application to automate character actions in an online game overnight (specifically, it catches fish in Final Fantasy XI). The app makes heavy use of java's Robot class both for emulating user keyboard input and for detecting color changes on certain parts of the screen. It also uses multithreading and a swing GUI.
The application seems to work perfectly when I test it without the game running, just using screenshots to trigger the apps responses into notepad. But for some reason, when I actually launch FFXI and start the program, all of my keyboard and mouse manipulations just stop working altogether. The program is still running, and the Robot class is still able to read pixel colors. But Robot.keyPress, Robot.keyRelease, Robot.mouseMove, Robot.mousePress and Robot.mouseRelease all do nothing. It's the strangest thing-- to test it, I wrote a simple loop that just keeps typing letters, and focused notepad. I'd then start the game, refocus notepad, and it would do nothing. Then I'd exit the game, and it'd start working again immediately.
Has anyone else come across something like this, where specific software will stop certain functions of java from working?
Also, to make this more interesting-- Last year I wrote a very similar program using the same classes and programming techniques to automate healing a party in the game as they fight. Last year, this program worked perfectly. After running into these problems I dug up that old program, ran it without making any changes, and found that it too was having the same problems. The only differences between now and when it was working: I was running Windows Vista and now I'm running Windows 7, and several new Java versions as well as FFXI versions have been released.
What the hell is going on? (if anyone needs to see my source code, email me at mikejturley#gmail.com. I'm trying to keep it to myself.)
FFXI has code to prevent cheating. Quite effectively, it would seem.
If possible, try it in WinXP. I myself have also written a bot for an online game that uses much of the same concepts (i.e. using Java Robot to read pixel colors and simulate key-presses and mouse-clicks).
Under WinXP:
Bot works as intended in all cases.
Under Win7:
Outside of the game, bot works as intended. Ingame, simulated input failed (pixel reads were okay, I think).

Categories

Resources