jdk9+java3d in webstart
- 진행 현황: Closed
- 상금: $24
- 응모작 접수(건수): 1
- 수상자: giannitee
콘테스트 개요
We are seeking a way to compile and run the below Java3D program using
jdk9 on a mac.
1. You MUST have a mac (not virtual mac, but a real mac!).
2. You MUST have had experience working with Java3D
3. You MUST answer the following questions to show you have read this contest:
q1: What do you see when you type: java -version on the terminal app?
q2: What version of Java3d do you use?
q3: Where are you getting your version of Java3D?
I think I may be able to narrow down the issue;
jogl-all-natives-macosx-universal.jar
contains a jnilib that will crash when loaded into the jvm under jdk9.
For example:
public static void main(String[] args) {
System.load("/Users/lyon/current/java/j4p/jars/j3d/foo/natives/macosx-universal/libnativewindow_awt.jnilib");
}
Emits:
#
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGSEGV (0xb) at pc=0x0000000117a0a795, pid=65766, tid=6915
DO NOT bid higher than the maximum price.
import com.sun.j3d.utils.geometry.ColorCube;
import com.sun.j3d.utils.universe.SimpleUniverse;
import javax.media.j3d.BranchGroup;
import javax.media.j3d.Canvas3D;
import java.awt.*;
public class StillCube {
public StillCube() {
GraphicsConfiguration config =
SimpleUniverse.getPreferredConfiguration();
Canvas3D c3d = new Canvas3D(config);
// SimpleUniverse is a Convenience Utility class
SimpleUniverse su = new SimpleUniverse(c3d);
// This will move the ViewPlatform back a bit so the
// objects in the scene can be viewed.
su.getViewingPlatform().setNominalViewingTransform();
su.addBranchGraph(getBranchGroup());
Frame f = new Frame();
f.setLayout(new BorderLayout());
Panel p = new Panel(new BorderLayout());
p.add(BorderLayout.CENTER, c3d);
f.add(p, BorderLayout.CENTER);
f.setSize(200,200);
f.setVisible(true);
} // end of HelloJava3Da (constructor)
public BranchGroup getBranchGroup() {
// Create the root of the branch graph
BranchGroup bg = new BranchGroup();
bg.addChild(new ColorCube(.25));
bg.compile();
return bg;
} // end of CreateSceneGraph method of HelloJava3Da
// The following allows this to be run as an application
// as well as an applet
public static void main(String[] args) {
System.setProperty("sun.java2d.noddraw","true");
System.setProperty("sun.awt.noerasebackground", "true");
StillCube cube = new StillCube();
}
} // end of class HelloJava3Da
The winner will be hired to work on porting a java3d solution to webstart that will work with jdk9 as the sole jvm. This will be a long project.
There is an alternative set of libraries that might work on jdk9, but I was not able to get them working and represent another way to go (note the change in imports):
It is attached as "StillCube.java"
추천된 기술
고용주 피드백
“great freelancer. Looking forward to continued collaboration.”
douglaslyon, United States.
이 콘테스트의 최상위 응모작
-
giannitee Serbia
공개 설명 게시판
콘테스트를 시작하는 방법
-
콘테스트 등록 신속하고 간편한 절차
-
응모작 접수 세계적인 참가 범위
-
최우수 응모작 선정 자료 파일의 다운로드(초간단!)