jdk9+java3d in webstart
- Tình trạng: Closed
- Giải thưởng: $24
- Các bài thi đã nhận: 1
- Người chiến thắng: giannitee
Tóm tắt cuộc thi
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"
Các kĩ năng yêu cầu
Phản hồi của người thuê
“great freelancer. Looking forward to continued collaboration.”
douglaslyon, United States.
Bảng thông báo công khai
Làm thế nào để bắt đầu với cuộc thi
-
Đăng cuộc thi của bạn Nhanh chóng và dễ dàng
-
Nhận được vô số Bài dự thi Từ khắp nơi trên thế giới
-
Trao giải cho bài thi xuất sắc nhất Download File - Đơn giản!