Computer Questions Not Worth Their Own Thread II

"Computer Questions not Worth Their Own Thread"- Well, I can try it at least.. So.. How to run a Java-program of your own? I've been studying Java for a few weeks now. I'd like to try to run something like HelloWorld!! but I can't do it. I have Java JDK 1.7. and it gives me response when typing in java -help in command prompt. If I type in javac -help it says that systm can't recognize the command. Same with javac and javac HelloWorld. Yes, I've changed the variable in settings and I have same class and file name. What to do?
 
Seems you don't have you JDK set up correctly. You need to install the JDK such that it puts javac on your path enviroment variable. It should be just a matter of installing it like you install anything else.

"java" likely works because you have the JRE set up properly, but for development you need the JDK.
 
Seems you don't have you JDK set up correctly. You need to install the JDK such that it puts javac on your path enviroment variable. It should be just a matter of installing it like you install anything else.

"java" likely works because you have the JRE set up properly, but for development you need the JDK.

It works now, just didn't know that I need to get in the directory first. Now javac works but it says that "access denied" to my program..
 
It works now, just didn't know that I need to get in the directory first. Now javac works but it says that "access denied" to my program..

what you PROBABLY need to do is be in the directory but be able to run javac. The easy way to test it is to specify the full path of javac in the command line, so something like:

C:\Documents and Settings\username\javacode>"\Program Files\Java\jdk1.7.0\bin\javac" HelloWorld.java

If that works, you will want to put C:\Program Files\Java\jdk1.7.0\bin\ in the path.
 
Just hold shift in the folder you wish to run cmd in and then right click and select "open command window here". Often times command line programs require you to run cmd in that program's install folder.
 
Why won't my Google login stick? Not to mention, the not-logged-in search settings won't stick either.

Every time I go to Google, I have to log in, just so I can avoid that ridiculous "search-as-you-type" instant search thingy, because the logged out search settings just won't save permanently. On top of that, I have to log in every time I exit and restart my browser, because my Google account just refuses to stay logged in.

Damn irritating, to say the least. :gripe:

Any idea why? This happens on Facebook and Twitter too. :gripe:
Going back to this, I've had issues with this on Yahoo as well, and just tonight, someone posted this in a group I'm in:

...Not only is the design confusing and ugly*, but it won't let me stay logged in, even long enough to go to another site and come back, and my saved passwords no longer fill in automatically.

(* = Referring to the new Groups GUI format.)

Maybe the sites I complained about are doing the same thing?
 
Going back to this, I've had issues with this on Yahoo as well, and just tonight, someone posted this in a group I'm in:



(* = Referring to the new Groups GUI format.)

Maybe the sites I complained about are doing the same thing?

One possible reason for this is that you have turned off cookies, perhaps just for these sites?
 
Well done getting it working. If you want to learn java, I would strongly recommend getting an IDE. I use netbeans (free and professional quality) and it makes like so much easier in many ways.

Yeah, I've tried NetBeans and Eclipse but I don't get the idea.. Here is my thoughts about Notepad/CMD vs. NetBeans; NetBeans gets points from being faster than Notepad/CMD because it doesn't need the CMD :crazyeye:. Reasons why I don't like NetBeans is that it says that some part of the script is wrong even if its just a name of class or something else. I also don't get that how it works with bigger programs. There is the CMD-like window where NetBeans runs the program, right? What about if I don't make Hello World, what if I make Civ VI with that? Do I always have to open NetBeans and run it in the box?? Sorry for my noob questions..
 
Yeah, I've tried NetBeans and Eclipse but I don't get the idea.. Here is my thoughts about Notepad/CMD vs. NetBeans; NetBeans gets points from being faster than Notepad/CMD because it doesn't need the CMD :crazyeye:. Reasons why I don't like NetBeans is

that it says that some part of the script is wrong even if its just a name of class or something else.
This is one of the things that makes and IDE like netbeans so good. It tells you that something is wrong as soon as you type it, rather than having to wait until you compile it, which would cause an error because of this.
I also don't get that how it works with bigger programs. There is the CMD-like window where NetBeans runs the program, right? What about if I don't make Hello World, what if I make Civ VI with that? Do I always have to open NetBeans and run it in the box?? Sorry for my noob questions..
It is for bigger programs that such tools really come into their own. I am not quite sure what you are asking. If you want to write a program that is not called HelloWorld.java but CivIV.java you just tell netbeans that that is the main class (probably with right click on project, Set configuration, customise). If you want to write a large project with lots of different files and libraries (as Civ IV does, though not in java) then there are many ways to do it, and they are much easier than doing it on the command line.

If you have writen a program and want to run it outside of netbeans that is easy. If you use the vanilla java project when you first create it you right click on project, select "Build", and it will create an executable jar in the $PROJECT_HOME/dist directory. You can run it with eg. java -jar $PROJECT_HOME/dist/HelloWorld.jar If you want to distribute it I would compress the whole of the $PROJECT_HOME/dist directory. If you do not use libraries then you just need the HelloWorld.jar file.

Do not worry about nood questions, we were all noobs at one point and most of us still have to ask basic questions form time to time.
 
^^ Well, its delightful to hear that NetBeans programs can be used outside the dummy window too. It sounds better right away! About the this is wrong thing; I like it if it does work properly. Once I last time tried it, it worked horribly. It made the red line and green line all over the place!! I hope that it has got better..
 
IDEs can be pretty daunting at first, but once you get used to them you realise just how powerful they are, and how much more productive you can be with them compared with just a text editor and command line.
 
Okay, so my HDD that I had recovered from my dead laptop and now use as an external, has all of a sudden, started to randomly reset its connection to my working laptop, triggering the autoplay dialogs to pop up; and since I have no choice but to play my games from it due to involuntary lack of space on the internal, the games, naturally, are crashing, and since it's happening literally every 10 minutes or so, it's nearly impossible to play them.

Any ideas?
 
I doubt your connecting via an external is stable/fast enough to run games on it.
It also sounds like it might be faulty.
Why not purchase a larger main HD and get that installed, they are pretty cheap now-a-days.
 
I doubt your connecting via an external is stable/fast enough to run games on it.
It also sounds like it might be faulty.
Why not purchase a larger main HD and get that installed, they are pretty cheap now-a-days.
I've been running Sims 2 from it for 2 months with absolutely no problems until now.

Like I said, I'm using a laptop (from 2008, I might add), and I dunno how easy or cheap replacing a laptop main HD is. :dunno:
 
Back
Top Bottom