Sunday, August 30, 2015

JDK and NetBeans

Normal I would attempt to avoid install/add software manually and use aptitude to get the job done instead.

Although there is an option to install Java and JDK with aptitude, the version is a bit old, i.e. version 7 instead 8.  I have no option but do it manually.

Here are the steps which I tool to install JDK8 on my machine.

1) Download your JDK8 from Oracle.  Since I am using Debian, I picked and used the gzip version.
2) Decompress the gzip file, e.g.

tar zxvf jdk-8u60-linux-i586.tar.gz

3) Move the uncompressed package to your desired location.  In my case, I put it where other OpenJDK are located, e.g.

sudo   mv   jdk1.8.0u60   /usr/lib/jvm


4) Create a subversion mutual symbolic link to the /usr/lib/jvm/jdk1.8.0u60, e.g.

ln -s /usr/lib/jvm/jdk1.8.0u60   /usr/lib/jvm/oracle-jdk8

5) Use update-alternative to add java, javaws, javadoc, javac to the system.

update-alternatives   --install   "/usr/bin/java"  "java" "/usr/lib/jvm/oracle-jdk8/bin/java"   1

Repeat the above for javac, javadoc and javaws

6) You may need to use update-alternatives --config to update the default java executable path, e.g.

update-alternatives   --config   java

7) Test you setup by running

java   -version

(see: http://askubuntu.com/questions/56104/how-can-i-install-sun-oracles-proprietary-java-jdk-6-7-8-or-jre)

8) If you have NetBeans setup before the installation, you need to update its java_homepath value by modifying its netbeans.conf file.

I kept the configuration personalized to my account, hence I used the localized version which is at:

~/.netbeans//etc/netbeans.conf

The contents in my netbeans.conf is

netbeans_jdkhome=/usr/lib/jvm/oracle-jdk8

note: You may not see the etc directory.  If you can't see it, you need to create the etc directory and .netbeans.conf file yourself.

(further information can be found at: Netbeans - ArchWiki)

Update 2016-01-28:  Alternatively, Java can be installed with APT by following the instructions at:

https://launchpad.net/~webupd8team/+archive/ubuntu/java

and

https://launchpad.net/~webupd8team/+archive/ubuntu/java

Tuesday, August 11, 2015

USB3.0 Gigabit Ethernet Adapter

I just want to share my experience with 2 USB3 to Gigabit Ethernet solutions. I have tried solutions from ASIX (AX88179) and Realtek (RTL8153).  Both work very well and offer nice speed bump from the 10/100Mbps adapter that comes with my laptop. I get approximately 60-70MB/s (read) for my laptop with USB3, and near 40MB/s (read) for my old Dell desktop with USB2.

RTL8153 USB3 to Gigabit Adapter on USB2 connection

If you have a laptop that only comes with 10/100Mbps NIC, or have a old SFF desktop that again comes with 10/100Mbps onboard NIC, you may want to give these USB3 to Gigabit Ethernet adapters a try. The two adapters I have certainly give the otherwise slow transfer speed a nice boost!

Friday, August 7, 2015

I have an old Broadcom NetXtreme Gigabit Ethernet NIC, and it worked well with Windows 8.1 but not with Windows 10 (at least not with the version I had).

Anyway, today I managed to find a set of drivers which work. The driver I found is from Lenovo for its THINKSTATION S10 (TYPE 6423, 6483), ver. 10.86.0.0.  Its URL is:
http://support.lenovo.com/us/en/downloads/ds000638

If you are having one of these Braodcom NIC below, you may want to give it try.

5700, 5701, 5702, 5703, 5704, 5705, 5751, 5753, 5754, 5755, 5756, 5782, 5786, 5787, 5788, 5789, 5901, 5906


By the way, the hardware ID for my card is:

PCI\VEN_14E4&DEV_16A6



Wednesday, August 5, 2015

Change Window 8/10 Network Location using PowerShell

One thing that I am really annoyed by Windows 8 and then now Windows 10 is Set/Change network location.  Microsoft manages to make something so easy in Windows 7 to something that is so convoluted in new versions.

If you are comfortable with using commands, you may want to use PowerShell to change the Network Location instead.

1) You need to start PowerShell with elevated user account with command as below.
PSH>Start-Process WindowsPowerShell.exe -verb RunAs
Alternatively, you can type powershell in Search, and run it as an administrator by using the "Run As" option from the context menu (right click)

2) Use the Get-NetconnectionProfile to find out the InterfaceIndex of the connected NIC, e.g.
PSH> Get-NetConnectionProfile
......
Name : Unidentified network
InterfaceAlias : vEthernet (Local-10)
InterfaceIndex : 18
NetworkCategory : Public
IPv4Connectivity : LocalNetwork
IPv6Connectivity : LocalNetwork

3) Use the Set-NetConnectionProfile to change to the desired network location.
PSH> Set-NetConnectionProfile -InterfaceIndex 18 -NetworkCategory Private
That's it. This saves you from switching account, and then jump through hoops to get the network location changed.

(ref: http://blogs.msmvps.com/russel/2013/12/29/set-network-location-to-private-in-windows-8-1server-2012-r2/)