Sunday, 15 July 2012

java - how provide a reference to a class which is not present in windows jre but present in mac jre -



java - how provide a reference to a class which is not present in windows jre but present in mac jre -

i have developed e4 application runs both in mac os x , windows

i using classes nowadays in mac os x jre missing in windows jre

the missing file showing error when run windows eclipse

the same file nowadays in mac jre don't show error when run mac eclipse

referencing library - /system/library/java/javavirtualmachines/1.6.0.jdk/contents/classes/ui.jar (which not nowadays in windows jre)

i want rid of error in windows platform "eclipse"

if add together ui.jar library reference functionality in mac goes crazy , throws runtime exceptions (java.lang.runtimeexception: unimplemented)

first want state highly discouraged thing do; eclipse applications (and java applications in general) intended platform agnostic; introducing code depends on platform-specific implementation bad thought , lastly resort. if can come any alternative, encourage so.

having said that...

you can isolate code uses mac-specific classes , place fragment. fragment have constraints in it's manifest allow installed on os x. how swt handles platform-specific portions of implementation.

read more fragments in eclipse help.

java eclipse osx e4

No comments:

Post a Comment