Add JAR files to a Spark job – spark-submit

True… it has been discussed quite a lot. However, there is a lot of ambiguity and some of the answers provided … including duplicating JAR references in the jars/executor/driver configuration or options. The ambiguous and/or omitted details The following ambiguity, unclear, and/or omitted details should be clarified for each option: How ClassPath is affected Driver … Read more

Access restriction: The type ‘Application’ is not API (restriction on required library rt.jar)

Here is the code: package mscontroller; import javax.swing.*; import com.apple.eawt.Application; public class Main { public static void main(String[] args) { Application app = new Application(); app.setEnabledAboutMenu(true); AMEListener listener = new AMEListener(); app.addApplicationListener(listener); JFrame mainFrame = new JFrame(“Application Menu Example”); mainFrame.setSize(500, 500); mainFrame.setVisible(true); } } here is the error: Exception in thread “main” java.lang.Error: Unresolved compilation … Read more

java.lang.NoClassDefFoundError: Could not initialize class XXX

public class PropHolder { public static Properties prop; static { //code for loading properties from file } } // Referencing the class somewhere else: Properties prop = PropHolder.prop; class PropHolder is a class of my own. The class resides in the same JAR file of the main class. So that should not because any JAR … Read more

Controlling Maven final name of jar artifact

I’m trying to define a property in our super pom which will be used by all child projects as the destination of the generated artifact. For this I was thinking about using project/build/finalName yet this does not seem work, even for simple poms: Command mvn archetype:create \ -DarchetypeGroupId=org.apache.maven.archetypes \ -DgroupId=com.mycompany.app \ -DartifactId=my-app POM <project xmlns=”http://maven.apache.org/POM/4.0.0″ … Read more