Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsSWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3
https://www.eclipse.org/forums/index.php/mv/msg/354005/874969/#msg_874969
I was just trying a simple SWT Slider example at http://www.java2s.com/Code/Java/SWT-JFace-Eclipse/SliderExample.htm .
My Environment:
Ubuntu: 12.04
Eclipse: Version: Indigo Service Release 2
Build id: 20120216-1857
OpenJDK: 6b24-1.11.1-4ubuntu3
SWT: 3.7.2-2
So, does SWT work with OpenJDK 6b24-1.11.1-4ubuntu3 ?
Cheers
Pei
]]>JIA Pei2012-05-21T21:57:58-00:00Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3
https://www.eclipse.org/forums/index.php/mv/msg/354005/875403/#msg_875403
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?
Cheers
Pei
]]>JIA Pei2012-05-22T17:13:54-00:00Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3
https://www.eclipse.org/forums/index.php/mv/msg/354005/875417/#msg_875417
Now, I tried the following environment, still doesn't work:
Now, I would ask, is SWT (Slider) able to work properly under Ubuntu 12.04?
Cheers
Pei
]]>JIA Pei2012-05-22T18:03:39-00:00Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3
https://www.eclipse.org/forums/index.php/mv/msg/354005/875850/#msg_875850
>
> 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)
Thomas B]]>2012-05-23T12:55:56-00:00Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3
https://www.eclipse.org/forums/index.php/mv/msg/354005/877192/#msg_877192
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)
Best Regards
Pei]]>JIA Pei2012-05-26T03:36:04-00:00Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3
https://www.eclipse.org/forums/index.php/mv/msg/354005/878513/#msg_878513
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]]>2012-05-29T13:12:28-00:00Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3
https://www.eclipse.org/forums/index.php/mv/msg/354005/878705/#msg_878705
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]]>Grant Gayed2012-05-29T19:17:11-00:00Re: SWT 3.7.2-2 is not working with OpenJDK 6b24-1.11.1-4ubuntu3
https://www.eclipse.org/forums/index.php/mv/msg/354005/883367/#msg_883367
Quote: