If you need to get a Windows command prompt as the Administrator do the following:
- Click on ‘Start’
- Type the following in the search/command input field:
- runas /user:administrator cmd
Principal Software Engineer/Architect, motorcyclist, drummer, and artist
If you need to get a Windows command prompt as the Administrator do the following:
Attached to this post is a tar.gz file that contains a complete template with which you can build a Java project. It includes the directory structure, sample ant build.xml, logging configs, and shell scripts (and the beginnings of some Windows scripts) to run the program:
java_project_template/README.txt
java_project_template/conf/
java_project_template/conf/log4j.properties
java_project_template/lib/
java_project_template/lib/log4j-1.2.16.jar
java_project_template/launch.sh
java_project_template/scripts/
java_project_template/scripts/run.sh
java_project_template/scripts/run.vbs
java_project_template/scripts/run.bat
java_project_template/src/
java_project_template/src/com/
java_project_template/src/com/ryanchapin/
java_project_template/src/com/ryanchapin/samples/
java_project_template/src/com/ryanchapin/samples/java/
java_project_template/src/com/ryanchapin/samples/java/Example.java
The ant build file will create a build/classes directory into which all of the Java .class files are compiled. → Continue reading “Java Project Template”
The following is a quick howto for when you want to fire up a process as a non-root user on boot under Linux:
Create a script, typically under /usr/bin with something similar to the following:
#!/bin/bash
# invoke your process
/usr/local/process/someprocess
exit
Now, add an entry to /etc/rc.d/rc.local to invoke the command as the non-root user
su – [non-root-user] -c [path-to-shell-script]
Make sure that the exit command is the last thing in the shell script so that you will exit → Continue reading “Starting a Process as a Non Root User on Startup under Linux”
When developing JavaEE applications in Eclipse it is more or less necessary to have all of the JavaEE libraries on the build path.
To do so, do the following:
Java enables you to exectute a process on the host OS and to provide input (STDIN) to the process and read standard out (STDOUT) and standard error (STDERR). Each time that you execute a process via Runtime.exec() or ProcessBuilder.start() STDIN, STOUT, and STDERR are piped to the running JVM as an OutputStream or InputStream. For each stream there are two file descriptors and typically when the process terminates those streams are closed also closing the two file descriptors.
If you are keeping your code and configs in a repository, more likely than not (and it is recommended) that you do not also store your IDE specific configurations or files within the repo.
As such, you will only keep the bare minimum of IDE independent files in your repository and when you check out a copy of it you will have an existing set of directories and files that you will use to create a project with in Eclipse.→ Continue reading “Creating an Eclipse Java Project from an Existing Directory Structure and Source”
I stumbled upon these guys looking for some things on eBay. I wonder if they would make a custom radiator?
http://www.aliexpress.com/fm-store/505902→ Continue reading “GPI Racing Radiators”
A great resource for bash coding conventions (the PDF is also available as an attachment to the blog post).
http://lug.fh-swf.de/vim/vim-bash/StyleGuideShell.en.pdf → Continue reading “Bash Style Guide and Coding Standard”
If you want to set up yum.conf to talk to repos via a proxy server AND you have an @ sign in your user name or password, try replacing the @ with the url encoded equivalent of ‘%40’→ Continue reading “Yum Proxy Configuration with an @ (at) Character in Your User Name or Password”
Ah, Windows. It still has it’s old, quirky, you-just-can’t-wait-for-MicroSoft-to-go-out-of-business charm.
But seriously, if you are having trouble adding a printer on a Samba share on a Linux host try the following: