Hi guys....I am planning to learn JAVA.....i don't know anything about it...just into C/C++.....don't know what compiler i should use....
suggest me some sites where i can download the compiler(Good One Please) for JAVA
Hi guys....I am planning to learn JAVA.....i don't know anything about it...just into C/C++.....don't know what compiler i should use....
suggest me some sites where i can download the compiler(Good One Please) for JAVA
Quick summary for : the compiler errors you saw come from Java’s lexical and source-file rules, not missing libraries. Java identifiers are case‑sensitive, and a top‑level public class must live in a file with the exact same name (including case). That explains why string/date or system didn’t resolve and why a filename mismatch can also block compilation. See the Java Language Specification for identifiers and top‑level type rules (Identifiers, Top‑Level Type Declarations). (docs.oracle.com)
Practical fixes you can apply right now: 1) Fix capitalization (for example String, System, Date). System and String are in java.lang and are available without import; Date lives in java.util so either import java.util.Date; or use the fully qualified name. 2) Ensure the public class name exactly matches the Java source filename. 3) Compile from the command line to verify: javac YourFile.java then java YourClass — the Oracle tutorial covers compile/run and common pitfalls. Also keep your classpath simple during learning (the current directory . is normally used). (docs.oracle.com)
Environment tips tied to earlier replies: make the IDE point to the same JDK you use on the command line and set PATH to the JDK’s bin so javac/java come from the same install — mixing different JRE/JDK folders in IDE settings can hide problems. Follow the platform install notes for Windows/macOS/Linux when in doubt. (docs.oracle.com)
Tooling and learning shortcuts: use a current, supported JDK build (for example Eclipse Temurin / Adoptium or other OpenJDK builds) rather than very old SDKs; choose an editor that fits your workflow — IntelliJ IDEA Community, Visual Studio Code (Java extension pack), or Eclipse are all solid choices. When you start writing real date/time code, prefer the modern java.time API instead of legacy java.util.Date. Links: Adoptium, IntelliJ, VS Code, Eclipse downloads and the Java Date‑Time tutorial. (adoptium.net)
(Brief note: ’s nudge about case sensitivity was exactly the right troubleshooting direction; and were also correct to point you at an official JDK — just use a current distribution today.)
Jump to Post— freesoft_2000 9Hi everyone,
The best compiler you can use is the java sdk 5.0 update 5 from sun.
Here is the download link to it
Here is an ide that you can use if you are on windows platform. Its a …
Jump to Post— jwenting 1,905Indeed. Get the JDK (latest version is 5.0_04 (compiler version 1.5.0_04) from http://java.sun.com and use your favourite programmer's editor to create the code.
Don't touch those fancy IDEs until you understand what they're doing and can do the same by hand (albeit …
Jump to Post— jwenting 1,905Java is case sensitive, keep that in mind.
Standard convention is to use CamelCase for everything except constants.
ClassNames start with a capital letter, and have every First Character of Every Word capitalised.
method and attribute names start with a lowercase letter.
CONSTANTS are in all uppercase.This …
Hi everyone,
The best compiler you can use is the java sdk 5.0 update 5 from sun.
Here is the download link to it
Here is an ide that you can use if you are on windows platform. Its a simple script ide that has no gui builder but you will learn more
Yours Sincerely
Richard West
Indeed. Get the JDK (latest version is 5.0_04 (compiler version 1.5.0_04) from http://java.sun.com and use your favourite programmer's editor to create the code.
Don't touch those fancy IDEs until you understand what they're doing and can do the same by hand (albeit MAYBE slower).
VI, jEdit, Emacs, even Notepad.
These are the two links i found most suitable...which one should i download...and i couldn't find anything in the first link provided by you (freesoft)...thanx for the second link
http://java.sun.com/j2se/1.5.0/download.jsp
http://java.sun.com/j2se/1.4.2/download.html
1.5 (5.0) is the latest version and likely the one you should get (unless you have a clear business need to use only an older version).
Downloaded the latest version...tried this simple program in the IDE mentioned by freesoft...i am total newbie in java..doesn't even know the complete meaning of this code...just trying to understand in terms of c++...
import java.util.*;
public class hellodate
{
public static void main(string[] args)
{
system.out.println("hello it's");
system.out.println(new date());
}
} But it gave errors..something like this
cannot find symbol
symbol:class string
cannot find symbol
symbol:class date
i guess some classes are missing...maybe i am missing some setting in the compiler options...i made these settings....
compiler: C:\Program Files\Java\jdk1.5.0_05\bin\javac.exe
Runtime Library: C:\Program Files\Java\jre1.5.0_04\lib\rt.jar
Applet Viewer: C:\Program Files\Java\jdk1.5.0_05\bin\appletviewer.exe
Didn't know what to add in these two
Class path:
Options:
Java is case sensitive, keep that in mind.
Standard convention is to use CamelCase for everything except constants.
ClassNames start with a capital letter, and have every First Character of Every Word capitalised.
method and attribute names start with a lowercase letter.
CONSTANTS are in all uppercase.
This isn't enforced by the compiler but is generally accepted. The number of people who don't do it is very small and they're disliked by everyone else.
Classpath should contain the current directory (".") as the very least. You can add downloaded libraries you use a lot, though adding those dynamically when compiling and running is often preferred.
Thanx...problem was in case...1 more question...
I came across this ebook....thinking in Java 2nd Edition by bruce eckel...is it fine for beginners or is it advanced...if it is advanced...plz give me some links of good java tutorial...or some other ebook
It's definitely a beginner's book. Many people like it, I don't :)
Sun has excellent tutorials on their own site (if sometimes a bit dated) which are in fact the complete text and illustrations of some of their printed books which are classics.
I recommend you get either "Head First Java" (Kathy Sierra and Bert Bates, O'Reilly, 2005) or "Agile Java" (Jeff Langr, Prentice Hall, 2005).
Both excellent books to learn from.
Thanx a lot
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.