If you installed Sun's JDK (yes, I still call it Sun's!) from the binary package (versus the RPM) and need to use it as the default implementation, you can manually alter the PATH and JAVA_HOME but the easy way is to, at first let Fedora know about it:
# java
> alternatives --install /usr/bin/java java /opt/java/jdk1.7.0_21/jre/bin/java 20000
# javaws
> alternatives --install /usr/bin/javaws javaws /opt/java/jdk1.7.0_21/jre/bin/javaws 20000
# Java Browser (Mozilla) Plugin 64-bit
> alternatives --install /usr/lib64/mozilla/plugins/libjavaplugin.so libjavaplugin.so.x86_64 /opt/java/jdk1.7.0_21/jre/lib/amd64/libnpjp2.so 20000
# Install javac only if you installed JDK (Java Development Kit) package
> alternatives --install /usr/bin/javac javac /opt/java/jdk1.7.0_21/bin/javac 20000
> alternatives --install /usr/bin/jar jar /opt/java/jdk1.7.0_21/bin/jar 20000
and then set it as the default:
> alternatives --config java
> alternatives --config javac
Source.
Monday, April 22, 2013
Monday, April 15, 2013
Add Installed JDK to Eclipse
If you install a JDK yourself (from a BIN, ZIP or other archive) you can easily add it from Window --> Preferences --> Java --> Installed JREs, choosing Add --> Standard VM and specifying the root directory of the newly unpacked installation.
If the JDK is already installed with the Linux standard directory structure, you should instead specify one of the directories you can find in /lib/jvm.
If the JDK is already installed with the Linux standard directory structure, you should instead specify one of the directories you can find in /lib/jvm.
Create an Eclipse Git Maven Java Project
You need to create a new Eclipse (Juno) Java project from a remote Git repository (like GitHub) managed by Maven (i.e. you already have a pom.xml for your project.)
- Make sure you installed a Git plugin like EGit.
- Click on File --> Import --> Git --> Projects from Git
- Then follow the instructions...
- Specify a URI for the repository source. This will end with a file.git.
- Select a branch.
- Local destination (<Git's_local_repository
>/<project_name >) - Select Import existing project.
- Select create Java project.
- Select Use custom location. This should be the local Git repository location.
- Mavenize it: right-click on the project's name --> Configure --> Convert to Maven project.
Friday, April 12, 2013
Export Java Syntax Coloring Preferences from Eclipse Juno
I just found out that trying to export just the Java syntax coloring preferences from Eclipse Juno doesn't work.
These are the color preferences you set from Window --> Preferences --> Java --> Editor --> Syntax Coloring.
Theoretically you should do a File --> Export --> General --> Preferences, select Java Code Style Preferences (I don't have a Syntax coloring item) and get them in your favorite file.epf
They should be included in those.
It doesn't work. But you can get them if you select export all.
I don't know if this is a bug or not...
These are the color preferences you set from Window --> Preferences --> Java --> Editor --> Syntax Coloring.
Theoretically you should do a File --> Export --> General --> Preferences, select Java Code Style Preferences (I don't have a Syntax coloring item) and get them in your favorite file.epf
They should be included in those.
It doesn't work. But you can get them if you select export all.
I don't know if this is a bug or not...
Subscribe to:
Posts (Atom)