Question: I have a data frame with columns I want to reorder. However, in different iterations of my script, the total number of columns may change. 

```
>Fruit
Vendor A B C D E ... Apples Oranges
Otto   4 5 2 5 2 ... 3      4

Fruit2<-Fruit[c(32,33,2:5)]

```

So instead of manually adapting the code (the columns 32 and 33 change) I'd like to do the following:

```
Fruit2<-Fruit[,c("Apples", "Oranges", 2:5)]

```

I tried a couple of syntaxes but could not get it to do what I want. I know, this is a simple syntax issue, but I could not find the solution yet. 
The idea is to mix the variable name with the vector to reference the columns when writing a new data frame. I don't want to spell out the whole vector in variable names because in reality it's 30 variables.

Answer: 
Make sure you are "adding" the `mysql-connector-java-5.1.42-bin.jar` file to the classpath when starting your program (obviously it can be a different version number).

something like 

```
java -cp .;mysql-connector-java-5.0.8-bin.jar JdbcExample

```

or

```
set CLASSPATH=...;mysql-connector-java-5.0.8-bin.jar
java JdbcExample

```

assuming:

1. the JAR is in the current folder... if that works, consider putting the JAR in a 'central' place a use the complete path in above commands
2. using Windows, otherwise the separator would be `:` instead of `;`
3. the class is in no package

for Ubuntu:

```
java -cp .:mysql-connector-java-5.0.8-bin.jar JdbcExample

```
Looks like more of a classpath issue. Try adding the jar manually to your project. I ran the same with `mysql-connector-java-5.0.8.jar` and I dont get this error.