Friday, July 31, 2009

What is the function of java vertual and how is it installed?

Is it advantageous to have it installed?

What is the function of java vertual and how is it installed?
Is it advantageous to have it installed?


Yes. You will need it to run java programs in your browser or on your desktop.





What function does it serve?


The Java virtual machine is a bit like a translator. I'll explain.





Most software programs when they are created are written in a human readable code. Then a compiler and linker takes that code and compiles it into machine code. That machine code can only run on very specific hardware and operating systems. Programs Like Microsoft Office are an example. It has to be compiled to run on Windows. To run on a Mac it has to be recompiled use a Mac compiler.





Java programs are different. They aren't compiled into machine code. They are compiled into what's called, "Java Byte Code". When you run a java program, the virtual machine translates the Byte Code into Machine code.





The advantage of java is that you only have to compile and distribute one version of your program. If Microsoft office was created using Java, you would bye only one version of it and it would work on both your Mac, WindowsXP\Vista, or any other operating system that has a java virtual machine on it(Like Unix or Linux or your Mobile Phone). Instead, you have to bye different versions.





The disadvantage of java is that it comes at a price of speed. The virtual machine translator slows down your program. Though the speed keeps getting better with each release.
Reply:It allows you to run java programs in your browser without installing java SDK
Reply:Java Virtual it's a pluging that will run Java aplications on your machine, not necessarily Internet based aplications but is the common use of it.





Most web pages will telll you to download teh Java virtual once you get in there and you don't have it, providing direct links to the download installation package, but you could also go to their main website www.java.com the first thing you'll see it's the download link wich is free.

tomato plants

In Java if you do not explicitly declare accessor type for instance variable what accessor type is assigned?

For example if you have





public class Example{


int someNum;


}





What accessor type is assigned to someNum by the java compiler. Is it public or protected?

In Java if you do not explicitly declare accessor type for instance variable what accessor type is assigned?
If you use the default visiblity it is "package" visibility. Meaning that field or method is visible to other objects and classes in the same java package.
Reply:NetBeans will not let you assign an accesor to instance variables-- after the constructor, and that's logical, only class-definition variables need the degrees of visibility -- defined outside the constructor.





In your example, you have the default visibility accessor... meaning that only a class within that same package can see int someNum. Default and final are the other accessors -- like protected and private.
Reply:That's a good question. I didn't readily find the answer but it would be most logical for them to be private, so that they are only accessible within the class. That would cause the least upset if one forgot to declare an accessor type.
Reply:fields are private by default, but it's good practice to give them a type.


How do you download java games onto Samsung u700?

I live in singapore and i went through this tutorial thing.


But when i enter a code on the main screen, it doesn't let me install MIDlet and stuffs. Is it because of my country?

How do you download java games onto Samsung u700?
Hi there, im from singapore too!





First of all you must be a wap enabled user. Call your service provider to subscribe for it if you havent.





After you are wap enabled and If you wanna download games, go look for "Internet" in ur phone and look for "Bookmarks" and click on "Samsung fun club". Inside you can download lotsa cool stuffs. By the way you WILL be charged accordingly to the price of the games. It cost around a meal. :)





Im not sure about the Code you entered on the main screen. Maybe you can try to reset the phone and try to download again. Last resort you may wanna call up samsung care center and tell them your problem. But you shouldnt mess too much with the Code on the main screen, because some of them will affect the softwares of the phone it self.


Have been trying to play free games online but says i need java enabled or installed?

have installed java several times successfully, thats what the screen says but still unable to launch any free game sites.getting very fustrated with this. our computer uses vista. have been able to play before but as first of year have not been able to get any free game sites to come up.keeps saying there is a problem or mistake.please help .

Have been trying to play free games online but says i need java enabled or installed?
Well, you could try a couple of things.





First thing, I would reinstall it, but this time go to custom install and do a complete installation of everything. After this, I would restart the computer, even if it didn't ask me to.





If this doesn't work, I would try out another browser. You could download Firefox (www.firefox.com), and see if this makes it any better. Internet Explorer tends to get a lot of problems, and firefox is a lot better for the internet in general.





If the browser was the problem, I'd reinstall Internet Explorer, as there may have been some sort of spyware or virus that has caused it to act differently.


How do you enable Java Brower on your work computer if its blocked by a firewall?

I want to draft some fantasy sports teams and play poker.

How do you enable Java Brower on your work computer if its blocked by a firewall?
Ask your boss.
Reply:Do it on your home computer.
Reply:Go to your firewall settings and add Java Browser as an exception so that your firewall won't block it anymore.
Reply:I don’t imagine work (corporate) firewall would be able to block any particular browser, therefore assuming you meant „java” script in browser.


You could try combination of those things:


-Install and run this free VPN client: http://www.iopus.com/ipig/


-go to browsers options and disable “connect through proxy” (Internet Explorer: Tools %26gt;%26gt; Internet Options %26gt;%26gt; Connection (tab) %26gt;%26gt; LAN settings (button) %26gt;%26gt; “Use proxy server…” (take check mark OFF)





Be aware that reason for blocking scripts is to prevent network from infection from within and using scripts CAN BE DANGEROUS if you would ended up on maliciously constructed site). By bypassing firewall’s block you really breaching security of whole network.


About danger coming from script – listen to audition from this page (#7 20 minutes 50 secs, #38):


http://www.grc.com/SecurityNow.htm

petal

How do I grow java moss?

Right now I just have around a nickel sized portion and I'd like to know how I could grow it as fast as possible.





I need to know what is the best situation for it to grow under.

How do I grow java moss?
If you have cool water %26lt;28C, alittle light (not strong sunlight) and CO2 (DIY CO2 is good enough), plus alittle liquid fert for meant for aqautic plants.
Reply:unless you have a 5 watt lightbulb it will most likely grow. and fast. it kind of grows exponentially. the best thing to do is attach it to something and it will grow.





this video has a great idea for a clump of moss about 2/3 of the way through --





http://youtube.com/watch?v=bdbjjWuf8y0
Reply:Add some blackwater extract to your water...gives the traces of humic acid and creates the brackish water that java moss naturally thrives in. Give it a good amount of sunlight, but not direct light. That's about it. You can't really accelerate the growth of java moss by very much, but it does grow pretty fast on its own.


How do I calculate the difference between two calendar dates in Java?

if you are using Date objects, it's as simple as using the getTime() method... as in





Date x y;


...


long difference = x.getTime() - y.getTime();





otherwise, if you are using Calendar objects, the best way is to use the built-in compareTo() method. It takes another calendar object as argument:





Calendar x y;


...


long difference = x.compareTo(y);





either way will get you the difference in milliseconds.


if you need to do more complex comparisons (like w/ days of the week, etc.) then go to the documentation:





http://java.sun.com/j2se/1.5.0/docs/api/...





-cheers