ProgrammingThis forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
Im kind of wanting to learn java but have been so excited about using linux (Mandrake 9.2). I use BlueJ a debuging app for java.
How can I porgram java in Linux?
I think the first step would be to install the latest java SDK... from java.sun.com.. Then, buy a few books on the subject, or go through the Java Tutorial at the java.sun.com site.
Seeing as how Java is meant to be platform-independent (which USUALLY is the case and can be trusted), there isn't any difference from java in linux to any other O/S....
I think I downloaded the wrong one on the java.sun site
The file name is j2eesdk-1_4-dr-linux-eval 130mb (took me 13hrs to downlad)
how do I install this, I can't find instructions on the site
There are several versions of the Java SDK, for different situations. The J2EE own that you downloaded is for enterprise servers, with support for Servlets/JSP and other high-end network application stuff. You should be using the J2SE first, as that is the bare-bones platform.
FIY, there's also a J2ME, which is the Micro Edition, for running Java on devices such as PDAs and mobile phones.
I installed it but I can not run javac unless I go /home/me/j2sdketc/bin/javac
How do I just make it so that I just type javac
I installed as a user not as root, should I have installed as root?
class Hello
{
public static void main (String[] args)
{
int minute, hour;
minute = "59";
hour = "11";
System.out.print ("The time is ");
System.out.print (hour);
System.out.print (":");
System.out.print (minute);
System.out.print (".");
}
}
but it doesn't work says "incompatible types - found java.lang.String but expected int"
If I use string it goes but why not with a integer?
Wow, it has been way too long since I did any coding in Java if I cant answer that easy question. I know that it is because of the way your value is assigned. The error message states that pretty clearly, that is one great thing about java compilers. It says it was expecting an integer, but you gave it a string. If I remember correctly, when assigning a value to an integer variable you dont use quotes. I am not certain because it has been too long That, and when I write code I dont even think about the basics anymore, I just do them.
Your question is not even close to a linux question, that is just a mistake in your code.
Last edited by Nic-MDKman; 02-04-2004 at 03:48 AM.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.