I know HTML, but not Java or Javascript...

Is the .jar file the class or are they 2 entirely different things... Also, do ya save the applets as ".jar"? I'm new to programming..

Dani AI

Generated

Quick clarifications and a simple path forward.

Java and JavaScript are different languages with different uses: Java is a compiled, strongly typed language that normally runs on the Java Virtual Machine; JavaScript is a dynamic language that runs in browsers (and other JS hosts) and has a different object model and runtime. (developer.mozilla.org)

As and already pointed toward, there are separate concerns: the source you write, the runnable artifacts produced by the toolchain, and any packaging you use to distribute them. For now, focus on writing plain Java source, learning the language and how to run simple programs locally — packaging for distribution is a separate, later step.

Important current context: browser-based Java applets are effectively obsolete. Major browsers removed the plugin architecture applets relied on, and the Java deployment stack (applet/plugin, Web Start, appletviewer) was removed from recent JDK releases, so expecting applets to run in modern browsers will lead to problems. If you see old tutorials about applets, treat them as historical; choose modern application targets instead. (support.mozilla.org)

Practical next steps (do these in order):

  • Install a current JDK and an IDE (IntelliJ Community, Eclipse, or NetBeans).
  • Try a tiny program, compile and run it from the command line to confirm your setup:
    javac HelloWorld.java
    java HelloWorld
  • Follow a beginner "Getting Started" tutorial to learn syntax, OOP basics, and small projects. (oracle.com)

If your goal is web development, learn JavaScript/HTML/CSS for client-side work or look into server-side Java (servlets, Spring) instead of applets.

Recommended Answers

All 2 Replies

A JAR file holds class files. Class files make up a Java program. A JAR file is basically just a ZIP file, you can open it with WinZip or similar.

Jeff
http://www.heatonresearch.com

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.