|
|
|
Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3 [message #875850 is a reply to message #875403] |
Wed, 23 May 2012 12:55 |
Eclipse User |
|
|
|
Am 22.05.2012 19:13, schrieb JIA Pei:
>
> The same code works fine under Windows7.
>
>
> The Environment:
> Windows 7
> Eclipse: Version: Indigo Service Release 2
> Build id: 20120216-1857
> Oracle Sun Java: Java SE 6 Update 31
> SWT: 3.7.2-2
>
>
> Still, it doesn't work under Ubuntu 12.04 + OpenJDK.
> Can anybody help to explain why it is so, and how to modify to make it
> work?
>
I am also using Ubuntu 12 LTS
You may want to test it with Oracle Java:
1.
Download the
jdk-7u4-linux-<architecture>.tar.gz file and extract it to e.g.
/usr/lib/jvm/
2.
Make a symbolic link, that you can change it to a another version easily
ln -s /usr/lib/jvm/jdk1.7.0_04 /usr/lib/jvm/oracle-jdk
3. update-alternative just to the symbolic link (auto-modus)
update-alternatives --install "/usr/bin/java" "java"
"/usr/lib/jvm/oracle-jdk/bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac"
"/usr/lib/jvm/oracle-jdk/bin/javac" 1
update-alternatives --install "/usr/bin/javaws" "javaws"
"/usr/lib/jvm/oracle-jdk/bin/javaws" 1
update-alternatives --install "/usr/bin/jar" "jar"
"/usr/lib/jvm/oracle-jdk/bin/jar" 1
update-alternatives --install
"/usr/lib/mozilla/plugins/mozilla-javaplugin.so" "mozilla-javaplugin.so"
"/usr/lib/jvm/oracle-jdk/jre/lib/<architecture>/libnpjp2.so" 1
Thomas B
|
|
|
Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3 [message #877192 is a reply to message #875850] |
Sat, 26 May 2012 03:36 |
|
Hi, Thomas:
Thanks for your reply.
I tested jdk1.7.0_04 as well. SWT Slider also fails to display.
I didn't do the following yet. But, my question is: is the following step (your 3rd step) a must for Eclipse to run the real Java? You know, I've already added
Windows->Preference->Installed JREs.
Quote:3. update-alternative just to the symbolic link (auto-modus)
update-alternatives --install "/usr/bin/java" "java"
"/usr/lib/jvm/oracle-jdk/bin/java" 1
update-alternatives --install "/usr/bin/javac" "javac"
"/usr/lib/jvm/oracle-jdk/bin/javac" 1
update-alternatives --install "/usr/bin/javaws" "javaws"
"/usr/lib/jvm/oracle-jdk/bin/javaws" 1
update-alternatives --install "/usr/bin/jar" "jar"
"/usr/lib/jvm/oracle-jdk/bin/jar" 1
update-alternatives --install
"/usr/lib/mozilla/plugins/mozilla-javaplugin.so" "mozilla-javaplugin.so"
"/usr/lib/jvm/oracle-jdk/jre/lib/<architecture>/libnpjp2.so" 1
Thanks again Thomas, thank you..
Best Regards
Pei
|
|
|
Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3 [message #878513 is a reply to message #877192] |
Tue, 29 May 2012 13:12 |
Eclipse User |
|
|
|
Hi,
the third step is necessary to get your "alternatives" installed on
Ubuntu, and you can change it with "update-alternatives --config java".
You dont need to remove your OpenJDK. But if you want to start Eclipse
or your other Java programs with Oracle Java, then you need to activate
this alternative. Of course you can change your JRE within Eclipse, if
you just want to start/test your programs within Eclipse.
Thomas B
Am 26.05.2012 05:36, schrieb JIA Pei:
>
> Hi, Thomas:
>
> Thanks for your reply.
> I tested jdk1.7.0_04 as well. SWT Slider also fails to display.
> I didn't do the following yet. But, my question is: is the following
> step (your 3rd step) a must for Eclipse to run the real Java? You know,
> I've already added Windows->Preference->Installed JREs.
>
>
>
> Quote:
>> 3. update-alternative just to the symbolic link (auto-modus)
>>
>> update-alternatives --install "/usr/bin/java" "java"
>> "/usr/lib/jvm/oracle-jdk/bin/java" 1
>>
>> update-alternatives --install "/usr/bin/javac" "javac"
>> "/usr/lib/jvm/oracle-jdk/bin/javac" 1
>>
>> update-alternatives --install "/usr/bin/javaws" "javaws"
>> "/usr/lib/jvm/oracle-jdk/bin/javaws" 1
>>
>> update-alternatives --install "/usr/bin/jar" "jar"
>> "/usr/lib/jvm/oracle-jdk/bin/jar" 1
>>
>> update-alternatives --install
>> "/usr/lib/mozilla/plugins/mozilla-javaplugin.so"
>> "mozilla-javaplugin.so"
>> "/usr/lib/jvm/oracle-jdk/jre/lib/<architecture>/libnpjp2.so" 1
>
>
>
> Thanks again Thomas, thank you..
>
> Best Regards
> Pei
|
|
|
Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3 [message #878705 is a reply to message #877192] |
Tue, 29 May 2012 19:17 |
Grant Gayed Messages: 2150 Registered: July 2009 |
Senior Member |
|
|
You're actually running the snippet fine, I see the same problem on
Ubuntu 12.
The strange behaviour is caused by Ubuntu 12's new custom overlay
scrollbars. They are overriding the default GTK scrollbar, which is the
native widget that swt uses for Slider controls. The overlay scrollbars
are not used when Eclipse is run because Ubuntu has "eclipse" in a list
of apps whose scrollbars are not to be overridden with the overlay ones.
However when you run a stand-alone swt example you're not running
"eclipse", so Ubuntu goes and replaces the conventional scrollbars with
the overlay-style ones, which do not appear when not contained in a
scrollable parent control. I'll likely log a report with Ubuntu about
this to see how to deal with this going forward.
In the meantime, they provide a workaround for manually turning the
overlay scrollbars off. Set Linux environment variable
LIBOVERLAY_SCROLLBAR to 0 and your snippet will run fine.
Grant
On 5/25/2012 11:36 PM, JIA Pei wrote:
>
> Hi, Thomas:
>
> Thanks for your reply.
> I tested jdk1.7.0_04 as well. SWT Slider also fails to display.
> I didn't do the following yet. But, my question is: is the following
> step (your 3rd step) a must for Eclipse to run the real Java? You know,
> I've already added Windows->Preference->Installed JREs.
>
>
>
> Quote:
>> 3. update-alternative just to the symbolic link (auto-modus)
>>
>> update-alternatives --install "/usr/bin/java" "java"
>> "/usr/lib/jvm/oracle-jdk/bin/java" 1
>>
>> update-alternatives --install "/usr/bin/javac" "javac"
>> "/usr/lib/jvm/oracle-jdk/bin/javac" 1
>>
>> update-alternatives --install "/usr/bin/javaws" "javaws"
>> "/usr/lib/jvm/oracle-jdk/bin/javaws" 1
>>
>> update-alternatives --install "/usr/bin/jar" "jar"
>> "/usr/lib/jvm/oracle-jdk/bin/jar" 1
>>
>> update-alternatives --install
>> "/usr/lib/mozilla/plugins/mozilla-javaplugin.so"
>> "mozilla-javaplugin.so"
>> "/usr/lib/jvm/oracle-jdk/jre/lib/<architecture>/libnpjp2.so" 1
>
>
>
> Thanks again Thomas, thank you..
>
> Best Regards
> Pei
|
|
|
|
Powered by
FUDForum. Page generated in 0.05147 seconds