Sunday, May 9, 2010

VMWare and Windows Defragmentation - The Virtual Machine is slower

It is common to defragment the Windows (the host) without proceeding the VM defragmentation before.
Why?
Because we forget the VM guests when we are not using them.

So, when the VM is opened next time, its performance is slower than normal.
Don't worry.
If the client is Windows, proceed the client's defragmentation.
If Linux, it's rarely necessary. Usually not.
Turn off the VM, shutdown the client, not suspending or hibernating it.
Proceed a second defragmentation using the VMWare's defragmentation command.
By example:

"C:\Program Files\VMware\VMware Workstation\vmware-vdiskmanager.exe" -d "D:\virtualMachines\debian5\debian5.vmdk"
After a successful result, you can finally perform the host defragmentation, and the VM's performance will come back.

Tuesday, May 4, 2010

Start an iconified application on Windows using batch

Suppose that you want to start an application on Windows using a batch which shows its icon on desktop.
Follow the example.

1. Create the batch file that contains the command to start the application.
In this example, I've created the batch file 1___timer_scheduled.bat.

2. Create a link to this command (use the pop-up menu) referencing the application's icon using the Change Icon button (red arrow).



3. Create another batch file referencing the link created before, using this command:

start "Timer6030" /D"D:\miniTools\timer\" "D:\miniTools\timer\1___timer_scheduled.lnk"

Of course, this example uses my environment paths. Switch to yours.

Note: The trick is not using the "/B"  option of the start command.

This batch creates a new window which uses the link's configuration and not the system's default configuration.

It's done.
Use the last batch created (step 3) to start the application.
The link created on step 2 works for a manual starting from the desktop, but it fails on Task Scheduler.
Check the figures below.


Using the link created on step 2 - the icon fails (red arrows): 

   



 Using the link created on step 3 - desired icon is shown:
   

Monday, May 3, 2010

JavaFX Running In Opera 10.5

How to enable JavaFX on Opera?

To enable JavaFX, it's used dragonfly plugin enhancements.
So, do:

1. Update your Opera to version 10.5 or upper.

2. The version 10.5 comes with dragonfly but you need just to enhance the menu's option.
    So, install this augment from:
    Opera dragonfly augment

Note: after installation the dragonfly view can be opened.
To switch, check/uncheck the option on: Tools, Advanced, Opera dragonfly
This will open or close the Opera dragonfly view.

3. After the enhancement is installed, the "Debug" option on menu comes available.
    Go to:  
    Debug, User Agent and check the option "Identify as Internet Explorer".

It's done.
Now you can open a JavaFX page.

This post was based on:
ICED IN CODE - JavaFX Running In Opera 10.5

Wednesday, April 28, 2010

jEdit's - Replicating installations

Suppose that you already have an installation containing your plugins and configurations.
If you desire to replicate this installation to another machine, for instance a virtual machine, without having to do everything again, there is an alternative that works well if the new installation has the same path of the old. If not, some path adjustments may be necessary according to your environment.

1. Install jEdit as usually.
2. Copy the jEdit's user configurations under .jEdit folder overwriting the content of the respective .jEdit folder of the new installation.
For instance, on Vista you find .jEdit folder configuration under C:\Users\User_Login\.jedit, and on XP under C:\Documents and Settings.
3. Copy the full content under the INSTALL_DIR/jEdit, overwriting the full content of the respective INSTALL_DIR/JEdit of the new installation.

It's ready to run.
I use this procedure to replicate my jEdit's intallations on virtual machines.

Sunday, April 25, 2010

jEdit full plugin installation - getting through

I got 3 problems from a full plugin installation using jEdit version 4.3.1:

#1 - "Cannot run global"

If a "A Cannot run global" message keeps poping up after installing all plugins, then uninstall the 'GlobalPlugin'.
To remove it, use the Plugin Manager and restart jEdit.

#2 - Error message "Class or variable not found: p4plugin.P4FileInfo"

Sourced file: inline evaluation of: 'new p4plugin.P4FileInfo(); ...
Class or variable not found: p4plugin.P4FileInfo ...

To solve this, I tried to find p4plugin and remove it, but the Plugin Manager didn't show the respective plugin as p4Plugin.
After other attempts, the solution was the manual deletion of the respective jar (INSTALL_DIR/jEdit/jars/P4Plugin-0.3.1.jar), because the Plugin Manager couldn't help.

#3 - Some plugins failed

Some plugins didn't install successfully. Just 4 of them.
So, I removed them using the "Plugin Manager".

NOTE:
Check the status of the plugins after any installation.
If someone shows any kind of error status, remove it or try to install again.

These procedures permitted me to perform a successful (almost) full plugin installation at one step, although it's not advisable.

Friday, March 5, 2010

Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

PROBLEM:
If working with Hibernte, you got this message:
Initial SessionFactory creation failed.java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory 

SOLUTION: 
solve the problem adding this two jar files to the project's library:
   slf4j-api-1.5.10.jar
   slf4j-simple-1.5.0.jar


You find those jars on  http://www.slf4j.org/manual.html 

Go to the download page and download the file "slf4j-X.Y.Z.zip" (or the tar file).
Be sure that the version matches you project's environment.

How?
Simple: check the project jars' versions, compare and try! : )
 

 

eclipse: java: SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder" or Exception in thread "main" java.lang.NoClassDefFoundError: org/slf4j/impl/StaticLoggerBinder

  >PROBLEM Using Eclipse, you try to run a simple logging test using "org.slf4j.Logger" like the sample below: package Test; im...