Powered By Blogger

Tuesday, January 24, 2012

How to Run a Java app in Linux

Greetings everyone! I know it has been awhile since I have written anything and I am sorry for that. The good news is that I am working on two great stories and they are proving to be more difficult than expected. As I finish them, they will surface so rest assured that they are coming!!

Now, onto the main event-Running a java app in Linux!!

There are many great java apps out there and if you are lucky enough, they will run without a hitch. This is usually the case if you download them from the software center or the author of the app includes a well written README that includes installation directions and some trouble shooting for newbies. If this ins't the case, you are left with a .jar file in your downloads folder. Question is, WHAT IS THIS MYSTERIOUS FORMAT AND WHAT DO I DO WITH IT?

To be brief, a .jar, .tar or .tar.gz are package folders that have been compressed. For those fimilar with windows, this is similar to the infamous .zip and or .7zip and other variations. The key is to understanding how to open and compile them in the terminal (very similar to the command line for windows users). The terminal is a scary place for non experienced users because everyone is use to the GUI that the OS presents us with. The GUI refers to "General User Interface" which are the nice things you see on the screen. Now for lack of a better, educated explanation, everything the typical user sees on the screen is a gui and the processes behind them are run in terminal space. It is possible to do all of your computing needs from a terminal and in fact, a select few in the linux community choose to spend the majority of their time in this minimal environment. 

 This is the Desktop GUI
 Package Manager GUI
Software Sources GUI (PPA locations etc)


"So the terminal is the command space is the command center of the computer, fine, but I still don't know how to use it" is what you might be thinking at this point. Luckily, you can get terminal work done easily and quickly using forum posts where others have had similar issues. I was able to find relatively similar posts to my problem and find a solution!

Case and Point

I wanted to find good mind mapping programs similar to inspiration. Inspiration is a great piece of software that is very helpful, but it costs money. I am a poor college student and prospective teacher and lack the funds to be fortunate enough to support the developers so I looked for an alternative. A great website to look for such alternatives is called alternativeto and it pointed me to a program called VUE. This stands for Visual Understanding Environment and can do similar tasks to inspiration and prezi. "Great!", I thought, "Two birds with one stone. A mind mapping application with the ability to be a non linear presenter." I clicked on the download now button and saw that it was available for mac, windows and linux. "Perfect, its cross platform!", was my first thought. I grabbed the linux package and was ready to go until I saw the scary .jar extension.

Now I have been using linux for a number of years but an still in many shapes and forms, a newbie. I have dealt with .jar files in the past, but I am waaaaaaaaaaaaay rusty on the topic. So what do I do? Google searched "how to install a jar file in linux" which brought me to a vast amount of page hits. I found some great sites that explained to me what a jar was, but I needed to install it! I used two main resources to solve my issue. To actually find a command to launch a jar I looked at linuxforums.org which had information I needed. Now I could launch the program, but I didn't want to open up a terminal window every time I wanted to use it. VUE has a support forum and I found an easy way to set it up with a pretty application icon and launcher here.

When someone in a forum posts terminal commands, they are generally in a window that you can copy the text from. For instance, the command that I needed was:

java -jar something.jar


This command let me open the terminal and run the application. I had the jar file on my desktop, so to run it I did this:

cd Desktop

This changed my directory from the home directory to the desktop. Capital letters are important, so when someone posts code, do it correctly!!! Also, take notice of folder names and file extensions. Now I ran the code:

java -jar VUE.jar

Notice that something.jar was replaced by the file extension of the program. Hooray! I was able to run it, but I didn't want to do these steps every time I wanted to use the program. So by going to the VUE forums, I found how to create a .desktop extension. 

Now I won't lie, I don't know anything about this. Don't know what it means but I have an idea of what it does, so I was able to try several times and finally make it work. The key lesson, DO NOT GET FRUSTRATED! Part of using linux is collaboration and effort on the users part. I collaborated to find the code to run what I wanted, now it was up to me to set it up. The poster had the command:

sudo gedit /usr/share/applications/vue.desktop  

so I copied and pasted it into the terminal. (****Note: when pasting into terminal, ctrl+v does not work!! You must use ctrl+shift+v to successfully paste in text)

Upon entering this code, a simple text editor opened up with a lot of mumble jumble that I didn't understand:





  • [Desktop Entry]  
  • Encoding=UTF-8  
  • Name=VUE  
  • Categories=Office  
  • Exec=java -jar /home/rohn/bin/VUE.jar  
  • Icon=/home/rohn/Pictures/Images/Downloaded Icons/vue.gif  
  • StartupNotify=false  
  • Terminal=false  
  • Type=Application  
  • Comment=Visual Understanding Environment Application  
  • StartupWMClass=tufts-vue-VUE  


  • I did however see the familiar command I learned earlier that actually launched the application. So what did I do? I evaluated where the poster had their files located and set mine up in a similar fashion. The execute command was looking at this person's home directory then in the bin folder and then at the jar file. So all I had to do was place the file into a folder and tell the command where to look for it. EASIER SAID THEN DONE! For frustration sake let me tell you how to do it. 

    Open up your file explorer which should look something like this:




    Now you need to navigate backward towards the root directory which looks like this "/" and you do that by clicking the back arrow next to home. The following screen should look like this:


    Now find your way into the "usr" folder. Once in there, RIGHT click on the "bin" folder and choose to open as administrator, depending on your settings you already may be the admin, but if not, then you must do this or else you will not be able to copy anything into it. Once you have the "bin" folder open as the admin, create a new folder called VUE.

    UPDATE : In New Versions of Linux Mint, you need to select run as root





    I have circled the new folder I created in yellow so you can see what it looks like. Now open up the folder and place in the jar file.

    So close to being done!!!! Final steps to make it look pretty.

    You can close all the windows now if you want so that you aren't feeling overwhelmed (don't close my blog though) and open up a terminal. Type in that little code from above to create a .desktop file for VUE.

    sudo gedit /usr/share/applications/vue.desktop  

    You will see the previous user's information, but now it is time to enter your own. Here is what mine looked like:


    [Desktop Entry]
    Encoding=UTF-8
    Name=VUE
    Categories=Office
    Exec=java -jar /usr/lib/VUE/VUE.jar
    Icon=/home/kyle/Pictures/vue.gif
    StartupNotify=false
    Terminal=false
    Type=Application
    Comment=Visual Understanding Environment Application


    Notice that I have it pointing to the usr/lib/VUE/VUE.jar area. This is because of our previous step with creating a folder and placing the jar file in said folder. If you do this successfully (replacing "kyle" with your user name) then you should be able to find VUE in your office applications. Now, there may not be an icon for the application. If this is the case, you can download one and in the "icon" tell it where to look. Notice that mine is in home/kyle/Pictures/vue.gif yours could be set up anyway you want by putting it in a location and telling the computer where to look.


    Well that's it! Now, this was done for the application VUE but in theory it could be applied to any jar file that does not install nicely. Hope you enjoyed this brief tutorial and hopefully it helps you and others in the future!


    Saturday, December 17, 2011

    Happy Holidays to you and yours this season. Now that I have some time off from school, I hope to bring my blog back up to speed. No doubt that some people out there got some cool gadgets for the holidays and are wondering what they can/should do with them. I will be posting an article about great apps and rooting methods for those who are interested. It is also important to recognize that many people are not fortunate enough to have access to the latest and greatest tech toys. There are many organizations out there that will recycle and re purpose your old machines to provide technology to those in need. Often these groups are at community centers and consist of a group of volunteers rather than big box companies who offer recycle programs. This is because these companies cannot legally give away recycled electronics. The community members are not bound by the same laws but do their best to insure privacy and confidentiality when wiping old machines and distributing them. So please, I urge you, when you are thinking about upgrading you technology, think of how you can re purpose your old machines to benefit others in the community who are less fortunate then you.

    Now, back to educational tools, LifeHacker released an article about note taking apps for mobile devices and since that is a repeating theme in my blog, I figured I would re post it HERE. I also recently attended a conference for educators in the Twin Cities called TIES and will post up some great info on that experience.


    So happy holidays and I look forward to getting back into blog mode. Leave me with comments or suggestions if you feel the urge! Always nice to get feedback and to see that someone is following :)


    Friday, December 9, 2011

    Happy Holidays!

    This weekend I attended a professional conference about how to implement linux effectively in a classroom and district wide. It was a great experience and I met a lot of like minded folks while there. One biology teacher in Minneapolis has taken on a personal crusade to use open source material in the class and I admire his work immensely. I highly suggest you look at his blog and see all the great work he has done. Follow this link HERE to check it out! I have several papers to write for finals so I will be taking time off from this blog, but I hope to return in early January and beef it up with lots of good information.

    Friday, November 25, 2011

    Affordable Educational Progress in hardware

    **Edit**

    It has been a long time since I posted anything and this piece has been a work in progress for quite awhile. Although I hate releasing anything that isn't finished, for the sake of getting a post out, I am going to release this article as is. Links to youtube videos about the stories will be included at the bottom of the page as well.


    One great thing about technology is that it constantly progresses in a relatively short amount of time. Phones are shrining and becoming more powerful, laptops are shrinking and becoming powerful netbooks and netbooks are transforming to become multifunctioning touch screen tablets. The progress that we have witnessed over the last five years has been utterly asstounding! One thing that hasn't been progressing as quickly though is the digital divide that students experience. Technology is great and can be a very useful tool but it is of no use if a student cannot access the internet let alone own hardware (computer of any variety). As educators we must recongnize that technology usage is quickly becoming a standard in the work place and in everyday life. We must urge our students to become 21st centuary learners with the use of technology while being mindful of the gap that exists. What role must we as educators take in ensuring our students are provided with the proper tools and environments to suceed in this movement? What role must our district take in this situation? Over the last five years I have witnessed few attempts at closing the digital divide. Government has proposed to issue subsidized interent to low income families, but what good is that if they don't have a computer? Even if they get an old desktop or laptop from a garage sale or friend, will that have the necessary hardware to access a broadband connection? What variety will the government provide for low income families? Will dial up be an option? Do they provide the modem and the instructions to properly install it?
    Aside from the internet access situation, what is being done to make sure that hardware is easily accessable to low income students and families? Libraries offer internet connections and hardware for usage, but what about transportation situations and costs? If a student cannot afford to travel to a library and invest the time to use the facility (basic economic oppertunity cost) what good are these locations serving? A lot of low income families live in rural areas where internet isn't even available! But I regress, lets look at the availabity of hardware.
    An affordable desktop computer can be obtained brand new for $250 dollars or less from online realiters like newegg. These computers are low energy using and allow the user to do simple tasks like surf the web and word process. They do not however include monitors or speakers and in some cases, keyboards or a mouse. These are essitional tools for this type of computing and without them, the user is powerless.
    So what would be a good alternative? A laptop/netbook that has the processing power to do tasks, keyboard and mouse pad built in? It is true that prices have been dropping in lower level hardware over the last several years, but how much are consumers really willing to pay? What about the extremely poor groups of people in 3rd world countries? A non profit organization had a vision to address this issue and it is known as one laptop per child. http://en.wikipedia.org/wiki/One_Laptop_per_Child The goal was to keep costs at $100 US dollars or less, but hardware costs and production made this near impossible. The trend of tablet computing has also geared the project into a different direction. Are tablets the new solution for cheap technology intergration? Are they going to take over as the new computing power house? An article from the UK publication, The Guardian reports that, "IDC's forecast, if correct, would mean the media tablet market was 17.5%, or slightly less than a fifth, as large as the PC market in unit terms. But that indicates explosive growth compared to 2010, when 18m tablets shipped, or about 5% in unit terms compared to the 347m PC shipments. Apple had an 83% share of tablet shipments in 2010, IDC says." This is a trend that the tablet market is growing and quickly since the release of the ipad in September 2010. That was only a little more than a YEAR ago! The market for this type of computing is taking almost a fifth of sales away from the desktop which has been around since the 80s! That is remarkable and a trend that cannot be ignored. What good are tablets though? Can you use them as a main method of computing? Well. . . . that area is still fuzzy. It comes down to what you NEED to do with your table. Word processing is an option, but it might not always be convienant or cost effective. If all you want to do is surf the web, read, watch videos, etc then yes a tablet is perfect. Personally, I loath having to try to work process for great length on my tablet due to formating issues and the lack of multi tasking capibility. I try to use it as my main portable school device and so far it works. Is it perfect? God no, but there are enough things that work that still make it a better choice than a laptop. I do have a desktop at home for powerful computing tasks, but with constant advancement and a growing market, who is to say we won't be there in another few years? India recently release the idea of a student tablet. That is itself a remarkable idea, but what makes the story powerful? The price tag is only $40 US dollars.

    Google Talk Tech on One Laptop per Child

    India's Tablet (The price jumps around depending on what news source you get it from)

    Tuesday, November 1, 2011

    Well it has been a long time since I have posted anything so I am just going to give an update and the top apps I use on my tablet and what I use them for in context. This will be brief! If you want more information on them, leave a comment or search for them in the market place.


    • Amazon App store- 1 free app everyday, why wouldn't you have it?
    • Dropbox- sync files from desktop to tablet
    • Yahoo and ESPN Fantasy Football- If you're into that kind of thing. . . 
    • Google+ - Google's attempt at social networking
    • FTPServer- easily transfer files from desktop to Tablet via Filezilla
    • How to Tie a Tie- duh
    • Pandora- Streaming music
    • Pocket Cast- Manage podcasts
    • Pulse- News catcher and Rss feed
    • Tiny Shark- fork of Groove Shark, music streaming
    • Tune in Radio- Stream local radio stations and other services
    • Google voice- voice mail on my tablet
    • Google Translate- Practice your language skills
    • Blogger- edit my blog
    • Google Docs- limited capabilities but able to edit a google doc
    • Freenote- Note taking software
    • Office Suite Pro 5- Word processing
    • Folder Organizer- Organize Apps by category and create widgets 
    • Twitter- Follow me as rastacalavera or stpowderhorn
    • Netflix- Stream TV shows and movies
    • Stumble Upon- Waste even more time
    • Dolphin- REALLY good web browser
    • SeekDroid- Security
    • aDownloader- Torrents
    • XBMC Remote- Remote for xbox media player on my desktop
    • Weather Bug- Weather updates
    • Soundhound- Song identification
    • Wifi File Server- Transfer files via web browser on wifi that is not my own
    I have lots more apps installed but these are ones I use CONSTANTLY and would be very sad to lose. I hope to do more reviews to apps as I find time in my schedule, but I think for now this space will become an area for interesting tech related stories and little things like this list. 

    Hooray for college!

    Freenote Review

    Day 1-3 of free note usage:
    I was met with great frustration while trying to write with a stylus on the screen using the English three line method. The main problem was that I was placing my hand on the screen as as I was writing, the "ink" would shoot from my word to the last location of my palm. I soon learned to tip the tablet on my lap or against some books so that I could write easily without touching the screen. The hand writting does take some getting use to espically with how large to make your words and what lines to use. The first picture that I have attached shows an arrow pointing down to a dotted line. This is where you want to write your sentences and distinguish your capital letters from lower case (picture 2). For letters that normally drop below the line, like j,p, and q, you should continue the letter below the dotted line. This would also apply to cursive characters (picture 3). Once I knew how to properly write using the program I was very excited!! I soon realized though that this was just the tip of the ice berg for my problems :( Often when I write, I tend to pause to make sure I spelled something correctly or to think longer on an idea. The program will only wait so long until it tosses whatever is in the box onto the page. This is inconvienent if you haven't written a full word because you can't line up the characters. For example if I write, Hello my name is Mitch and I have an itch, but pause and really write, Hello my na  me is Mitch and I ha ve an itch, you would have to completely delete all the characters of the incorrect words. na, me, ha and ve all count as a single character, not individual letters. The same goes for the rest of the words. Anything written in the box is treated as a single character, so if you make a spelling mistake while writing, you have to wait until it is "placed" on the page, then delete it and re-write it

    Day 4-5 of Freenote usage

    Besides the character issue, there was one other feature that caused me great frustration. When you do an extensive amount of writing the "writing area" overlaps what is written or what is currently being written. In my screen shot I have a full page of text but my cursor is placed at the bottom where the newest words will appear. The "writing area" is located in the middle of the page and obscures what I wish to write! See picture 4 for an example of this frustration. Even though this was an issue, I came up with a solutiong that works pretty well! When you get close to the center of the page where the overlap will occur, hold down enter to increase the page length. This will allow you to scroll up to where your input is located and keep the "writing area" below so overlap is not an issue!! Figureing this out made me very happy and changed my opinion of the program considerabily.

    There are many other great features in Freenote, like the ability to resize imported pictures or images that you draw and adding audio notes. There is a bit of a learning curve to the program and some settings may have to be tweek'd before you see the results you want, but over all this is a fantastic program!! I would reccommend this to anyone who has a tablet and wants to try writing on it.

    Schedule for next week, I review another note taking app called Tabnote. This will be a micro review because I hope to find another app to do as well!

    (I apologize if the pictures are our of order or mixed up, i am learning how to blog in mobile format as well as at my desktop)




    Monday, October 10, 2011

    Sorry I have been ignoring you blog, school is really getting in the way of my hobbies. Recently though, I had the chance to create a video for my educational psychology course! I love story boarding, filming and editing. It truly is a passion of mine and I take every opportunity I can to do it. I had a great script and shot order lined up but I ran into some pretty heavy obstacles.

    The main issue was my computer. I thought my desktop was pretty good considering I got 4gb of ram and a single 3.2Gh processor but evidently that isn't enough to prevent plagues of video lag. It would honestly take me 3 minutes to jump between takes and splitting a scene was a nightmare. Trying to do anything fancy, like captions, music or transitions KILLED my performance. At one point I had to start from scratch because the program I was using corrupted my entire film >:(

    Another large issue was the editing software I was using. My only option was windows live movie maker 2011. I have used movie maker in the past and its enough to make an ok film but the 2011 version is GARBAGE!! They took away many key audio features, like narration, and made my editing process a night terror.

    Long story short, my film fell far below to where I wanted it to be. I have to turn in what I could muster but my 4 hours of shooting, 3 hours of sound editing and probably 6-8 hours of editing were pretty much for nothing.

    Looking back on this, I have decided to teach myself to edit using a new program. I did some digging on free software out there and here are some links to suggested programs.

    SAVEDELETE.COM
    DOWNLOAD.COM
    SOURCEFORGE.NET

    If you are interested in reading my script, I will include a google doc link to public space for your viewing pleasure.

    KNOW WHAT YOU ARE GETTING YOURSELF INTO BEFORE ATTEMPTING A PROJECT LIKE THIS!!!! If I could do it over again, I would have used my University's editing machines in the library and forced someone to teach me how to use them.

    Script
    Bibliography