How to install Java SE Development Kit 7 on Debian

Debian is a wonderful open source distro, but sometimes you need some evil Oracle to get some things going.

Debian is a wonderful “open source” Linux distribution that I have been using for quite some time now. One problem that creeps up every now and then is the whole “open source” thing–frankly sometimes you need proprietary software. Now I hate that and if you know any better you probably do too, but such is the world we live in.

I needed Java SE 7 to try to fix a small problem I had been having with PyCharm. For some reason the “ctl+v” for pasting is not working and I had seen somewhere on a forum that the java version could be causing a problem. I had been using openjdk-7 –and since I don’t do much in java–that really hadn’t been much of an issue. But now it was and Debian does not have the official Oracle version in the repositories–anywhere. (Oracle is evil by the way).

So off to some “googling” to find out a solution…

While Debian does not provide the oracle version in the repos, they do have a neat package called “java-package” which is kindly provided for the sole purpose of helping poor developers install the evil official version of java on their systems. (Get the feeling that this is a fairly frequent problem). This lovely little package installs a program called “make-jpkg” which you can then use to compile a .deb installer to install on your system.

So should you need to do this little exercise it will look like this:

  1. Download Java SE 7 to your computer.
  2. open your terminal and cd into your Downloads folder or wherever you downloaded the file to.
  3. then make-jpkg your-file-here.tar.gz to compile that compressed file into a .deb file.
  4. Finally sudo dpkg -i your-new-deb-file-here.deb to install Oracle’s java.

You are also probably interested in using this version of java on a regular basis–and since you have it now maybe even all the time. We can do that also!

In your command line type sudo update-alternatives --config java. This will bring up a small command line menu that will enable you to change which version of Java you want to be your default version:

kevin@debian:~/Development/FlaskHF$ sudo update-alternatives --config java
There are 2 choices for the alternative java (providing /usr/bin/java).

  Selection    Path                                           Priority   Status
------------------------------------------------------------
  0            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      auto mode
* 1            /usr/lib/jvm/j2sdk1.7-oracle/jre/bin/java       317       manual mode
  2            /usr/lib/jvm/java-6-openjdk-i386/jre/bin/java   1061      manual mode

Press enter to keep the current choice[*], or type selection number:

Simply enter the number of the version you want and you’re done! Hopefully this will be of some help to you. Leave any comments or helpful tips below.

PS This didn’t solve my Pycharm problem so if you have any tips you can pass those there also 🙁

PPS I just solved the PyCharm problem it was related to keyboard layout order in Debian. Weird! see thread.

Getting Started With SVG

SVG allows for fantastic scalability and the source code behind the images is actually xml and editable.

SVG is a big deal. It seems to me like its becoming a bigger deal, at least, I’m running into it more often. The trend toward responsive design is probably at the root of this push. SVG allows for fantastic scalability and the source code behind the images is actually xml and editable. I ran into Steven Bradley’s blog vanseodesign.com a few weeks ago and have really profited from his tutorials on SVG. If you’re looking for a good starting point I would recommend you start here and follow along. He has a great writing style and his examples are understandable.

WordPress Social Media Tags Without Plugin

WordPress does great as a Content Management System, but leaves a lot to be desired when it comes to getting ready for Social Media. Google, Facebook, and Twitter all have their own markup schemes which really provide some enhancements to content that is shared on those networks. Getting that markup on WordPress is the challenge. There are plugins that help provide this sort of functionality, but I prefer to keep it simple and I also like to know how it is done. So I rolled up my sleeves and put something together to get the job done.

Continue reading “WordPress Social Media Tags Without Plugin”

Be careful on Github!

This is a mistake I’ve nearly made a couple of times when pushing commits on to GitHub. You are developing in your local environment, giving no thought to security and its time to commit your changes into your GitHub repository.

This is a mistake I’ve nearly made a couple of times when pushing commits on to GitHub. You are developing in your local environment, giving no thought to security and its time to commit your changes into your GitHub repository. Where there any keys in that code? Apparently there is quite a bit of the time and hackers know it. So be careful and develop some good habits even when in your local environment. You can read more about the threat over at programmableweb.com.

Mobile Browsers

Recent years have seen an increase in discussions over native apps and mobile apps. But this is not where our energies need to be spent. Our energies need to be spent with better web browsers and web designs that are friendly for mobile devices whether responsive or mobile-first.

There are two glaring deficiencies (at least!) in the mobile sphere: programmers utilizing web browsers and users demanding decent web browsers. I noticed the issue for the first time this week with a release from the Electronic Freedom Foundation for their new mobile app.

Their app is probably really good. I really like the EFF. The app has an alert system for EFF’s new campaigns. You should probably download it. You should probably donate or at least show some support for the EFF and the work they do. But do they need an app?

Let’s be clear the issue is not EFF or their app. The issue is withe the flood of apps that are being published every year for website after website. I’ve never really cared much for the issue of native vs mobile apps. Each has their supporters and frankly each probably has their own place and strengths–but what about the web page?

Continue reading “Mobile Browsers”