Java classpath and external library (with some personal notes as well)

The majority of this post is from Wikipedia. Classpath is a parameter—set either on the command-line, or through an environment variable—that tells the Java Virtual Machine or the Java compiler where to look for user-defined classes and packages. Contents 1 Overview and architecture 2 Setting the path to execute Java programs 2.1 Supplying as application … Continue reading Java classpath and external library (with some personal notes as well)

How to compile and run a Java program in command prompt?

Here is an example if you are going to use OpenJDK. This helps when it's too slow to load a Java IDE to compile the source files (For example, on Raspberry Pi platform; I've tried Geany and Netbeans. It takes forever to load...). From Terminal install the open jdk sudo apt-get install openjdk-7-jdk Write program … Continue reading How to compile and run a Java program in command prompt?

For a Java newbie…

import java.util.Date; When you add the above line to a Java program, you are not reading a file. You are telling the compiler to treat the type reference "Date" as if it was "java.util.Date". When the compiler later resolves java.util.date it will find it in the JDK's jre/lib/rt.jar file.

How to add Java library in Windows, Netbeans, and Geany

For Netbeans: In the Projects window right-click on the name of the project that needs the library -> Properties -> The Project Properties window opens. In Categories tree select "Libraries" node -> On the right side of the Project Properties window press button "Add JAR/Folder" -> Select jars you need. For Windows platform: Typically you … Continue reading How to add Java library in Windows, Netbeans, and Geany

Processing.js – convert Java into JavaScript

Processing.js Quick Start - Processing Developer Edition Introduction This quick start guide is written from the standpoint of a Processing developer. No HTML or JavaScript knowledge is assumed, and only basic Processing knowledge is necessary. Index For the Impatient Why Processing.js? The Web: from Java to JavaScript Processing.js uses Modern Web Standards Writing a Processing.js … Continue reading Processing.js – convert Java into JavaScript

How to get a permanent access token for your facebook Page?

Personal note: I've tried this. It seems that if you follow EVERY step, you will be able to get a "never expiring" page access token. However, it doesn't seem that making a post to the page is possible? Let me take a closer look into this... Having found that it is possible to generate a … Continue reading How to get a permanent access token for your facebook Page?

A simple Java code to use HTTP GET in Processing

import java.io.*; import java.net.*; String web_url = "https://www.google.com"; public class Web_access {    public String getHTML(String urlToRead) {       URL url;       HttpURLConnection conn;       BufferedReader rd;       String line;       String result = "";       try {          url = new URL(urlToRead);          conn = (HttpURLConnection) url.openConnection();          conn.setRequestMethod("GET");          rd = new BufferedReader(new … Continue reading A simple Java code to use HTTP GET in Processing

A note on how to run native Java code in Processing

Question: Processing keeps giving me this error when I run it even though it is just a print command. When I delete the comment block it works fine. Here's the code: /* float[] cortToPolar(int xcorr, int ycorr) { float returns[] = new float[2]; returns[0]= degrees(tan(ycorr/xcorr)); returns[1]= sqrt(pow(xcorr,2)+pow(ycorr,2)); return returns; } float lawCos(int a, int b, … Continue reading A note on how to run native Java code in Processing

Top 10 Marketing Tips From Full-Time Etsy Sellers

When we invited five successful full-time Etsy sellers to nominate their best marketing advice, we were pleasantly surprised to learn that they shared a good deal of strategic wisdom and tricks of the trade. Here are the top 10: 1. Make Your Photos “Drool-Worthy” Four of the five full-time sellers nominated quality photography as the … Continue reading Top 10 Marketing Tips From Full-Time Etsy Sellers