This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
1>suppose i wrote a program called HelloUsa.java which is in package ab 2>now the HelloUsa.class files ie i created a jar file called prasanna.jar 3>now i put the(my prasanna.jar) jar file in .../jre/lib/ext 4>Actually my program HelloUsa.java should run when i execute java HelloUsa even if there is no .class files in my current dir for where i compile
Because the class is in a package, the .class file should be in a folder called ab in the JAR file, and you should call the app using "java ab.HelloUSA". You are 100% correct about not needing to specify a classpath because the JAR file is in the /jre/lib/ext folder.