Go to:
Window / Preferences / General / Keys
Scroll all the way down to the bottom. About 12th from the BOTTOM you will see category "Next Editor".
Double Click that line. The modify screen for that action will open up.
Set focus to the Key Sequence section, and hit CTRL-TAB, then click the ADD button. You should now see TWO commands for "Next Editor". You can now select the original one, and click Delete. (from here)
Showing posts with label Java. Show all posts
Showing posts with label Java. Show all posts
Tuesday, June 10, 2008
Tuesday, January 15, 2008
Running JaCoP
From command prompt, while residing in the same directory as all the JaCoP java files, compile all java files using the following command:
C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP>java
c -classpath ".;C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCo
P\JaCoP.jar" *.java
Run any of the files using the following command, for example:
C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP>java
-classpath ".;C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP
\JaCoP.jar" Queens
After compiling it from command line, it can be run directly from Eclipse too.
C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP>java
c -classpath ".;C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCo
P\JaCoP.jar" *.java
Run any of the files using the following command, for example:
C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP>java
-classpath ".;C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP
\JaCoP.jar" Queens
After compiling it from command line, it can be run directly from Eclipse too.
Thursday, August 02, 2007
CLASSPATH on Windows with paths including spaces
For example:
javac -classpath ".;C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP\JaCoP.jar" *.java
More info/examples available here.
javac -classpath ".;C:\Documents and Settings\afgane\My Documents\Enis\Projects\JaCoP\JaCoP.jar" *.java
More info/examples available here.
Wednesday, July 11, 2007
Using Threads in Java
The way threads work in Java is that there has to be a class implementing either Runnable interface of extends Thread class. Either way, run method must be overridden wihh desired functionality. From the client class, a new thread must be created (as below) where the first argument passed is an an instance of the class you want executed as a separate thread. Once this is done, the thread can be started by invoking start method.
Thread thrd = new Thread(new ClassImplementingThreadFunc(param1,param2));
Thread thrd2 = new Thread(new ClassImplementingThreadFunc(newParam1,newParam2));
thrd.start();
thrd2.start();
Thread thrd = new Thread(new ClassImplementingThreadFunc(param1,param2));
Thread thrd2 = new Thread(new ClassImplementingThreadFunc(newParam1,newParam2));
thrd.start();
thrd2.start();
Thursday, June 21, 2007
Using my code with Java packages
1. After having created Java packages, copy over the entire directory structure to desired machine (e.g., source files are in /home/afgane/dBLAST/src/com/dBLAST/util).
2. In order to compile the code, in base dir (e.g., /home/afgane/dBLAST), execute
javac -d bin/ src/com/dBLAST/util/*.java
The -d option specifies where to store class files. It will create all the package subdirectories from the specified folder (e.g., by specifying bin/, it will create bin/com/dBLAST/util/ and put all class files there).
3. In order to execute the code, first you must export directory where class files are. This can be done either by editing .bashrc file and adding a line such as the following one to it
export CLASSPATH=/home/afgane/dBLAST/bin/:$CLASSPATH
Alternatively, you can do it manually and executing that same line for each login session.
4. Finally, run the code by executing java com.dBLAST.util.DynamicBLAST_6 props.properties, for example from any directory.
2. In order to compile the code, in base dir (e.g., /home/afgane/dBLAST), execute
javac -d bin/ src/com/dBLAST/util/*.java
The -d option specifies where to store class files. It will create all the package subdirectories from the specified folder (e.g., by specifying bin/, it will create bin/com/dBLAST/util/ and put all class files there).
3. In order to execute the code, first you must export directory where class files are. This can be done either by editing .bashrc file and adding a line such as the following one to it
export CLASSPATH=/home/afgane/dBLAST/bin/:$CLASSPATH
Alternatively, you can do it manually and executing that same line for each login session.
4. Finally, run the code by executing java com.dBLAST.util.DynamicBLAST_6 props.properties, for example from any directory.
Subscribe to:
Posts (Atom)