Καλησπέρα,
είπα να στείλω εδώ, μήπως μπορεί να βοηθήσει κάποιος...Λοιπόν, χειρίζομαι το πρόγραμμα Sweethome3d http://www.sweethome3d.com/index.jsp
του οποίου τον κώδικα έχω αλλάξει μέσω του eclpse. Στην συνέχεια, προσπαθώ να το κάνω ένα jar αρχείο, το οποίο όμως μου βγάζει κάποια προβλήματα καθώς δεν περνάνε τα vm arguments που πρέπει να προσθέσω. Παρακάτω μπορεί να δει κανείς τι ακριβώς έχω κάνει...
Για να λειτουργήσει όταν το τρέχεις, πρέπει να προσθέσεις κάποια vm arguments, σύμφωνα με αυτό:
You may execute applications and tests of this archive, with the Eclipse Run menu.
To execute applications and tests that require Java 3D, open Run Dialog in Eclipse,
select the Arguments tab of the target application, and add to the VM arguments
text field the option
-Djava.ext.dirs=lib;lib/windows/i386,
-Djava.ext.dirs=lib;lib/windows/x64,
-Djava.ext.dirs=lib:lib/macosx,
-Djava.ext.dirs=lib:lib/linux/i386
or -Djava.ext.dirs=lib:lib/linux/x64
according to your system and its architecture.
Αλλά, δεν μπορώ να βρω πως γίνεται να περάσεις αυτά τα vm arguments (μου λέει βέβαια ότι " VM arguments will not be part of the runnable JAR. Arguments can be passed on the command line when launching the JAR", όταν το κάνω export σε runnable jar).
Έτσι, εγώ τα περνάω με το "java -jar SH3D.jar -Djava.ext.dirs=lib:lib/macosx", στο terminal. Αλλά, μου βγάζει errors
Exception in thread "main" java.lang.SecurityException: sealing violation: package javax.media.j3d is sealed
at java.net.URLClassLoader.defineClass(URLClassLoader.java:234)
at java.net.URLClassLoader.access$000(URLClassLoader.java:58)
at java.net.URLClassLoader$1.run(URLClassLoader.java:197)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
at com.eteks.sweethome3d.j3d.Component3DManager.setR enderingErrorObserver(Component3DManager.java:104)
at com.eteks.sweethome3d.SweetHome3D.addComponent3DR enderingErrorObserver(SweetHome3D.java:491)
at com.eteks.sweethome3d.SweetHome3D.init(SweetHome3D.java:383)
at com.eteks.sweethome3d.Blender.main(Blender.java:181)
Οπότε ένα παιδί στο forum του SH3D μου είπε τα εξής:
There's no reason your Jar executable shouldn't work, If you try to build it the same way I used for Sweet Home 3D, meaning:
- Use a main class similar to com.eteks.sweethome3d.SweetHome3DBootstrap, where you'll store in applicationClassName variable the name of your own main class, and add to applicationPackages array your own packages if you created some. The class loader used by this special main class extracts all the DLLs and JARs required by the project from the running Jar executable file, and stores them in temporary files referenced during the execution of the application (quickly said it conveniently replaces the java.ext.dirs property).
- Build the Jar executable with a Ant task that gathers project class files, resources files, jar libraries and Java 3D DLLs.
Οπότε και εγώ έκανα τα εξής:
1. Terminal (όπως μου λέει στο Readme.txt
If you want to build Sweet Home 3D with Ant, please install last JDK 5 or 6 and
Ant available at http://ant.apache.org/, and run ant command in the directory where
you uncompressed this archive.
The default target provided by build.xml Ant file builds the Java Web Start version.
Read build.xml Ant file for more information about other available targets.
Note that the last part of the Ant targets javaWebStart, applet and viewer
requires a passphrase for keystore to sign the deployed jars. For security reasons,
the required file keys.keytool isn't provided with this source code. You'll have
first to generate this file and choose a passphrase, with the following command run
in the directory where you uncompressed this archive:
keytool -genkey -keystore keys.keytool -alias SweetHome3D
)
Workspace-> Sweethome3d-3.3
- keytool -genkey -keystore keys.keytool -alias SweetHome3D
Password: xxxxx
2. Eclipse
Επιλέγω το project μου.
Run -> External Tools -> External Tools Configuration -> ant build
Επιλέγω το build.xml
Και μου κάνει build (εδώ βάζω και τον κωδικό)
Μετά κάνω Export-> Runnable Jar -> with ant
Αλλά πάλι δεν μου το κάνει σωστά.
Έχει κάποιο τι άλλο θα μπορούσα να δοκιμάσω για να τρέξει?
Εκπέμπω SOS:)
by Katarameno
[Today at 02:00:07]
by Katarameno
[Today at 01:52:25]
by RíoGrande
[April 23, 2024, 22:09:25 pm]
by Tasos Bot
[April 23, 2024, 21:51:18 pm]
by Nikos_313
[April 23, 2024, 19:38:23 pm]
by Caterpillar
[April 22, 2024, 18:24:41 pm]
by Katarameno
[April 22, 2024, 17:51:22 pm]
by Don
[April 22, 2024, 16:37:55 pm]
by Katarameno
[April 22, 2024, 14:04:59 pm]
by Katarameno
[April 22, 2024, 12:17:36 pm]
by Διάλεξις
[April 22, 2024, 10:09:44 am]
by Nikos_313
[April 22, 2024, 08:49:18 am]
by Nikos_313
[April 21, 2024, 21:31:41 pm]
by Katarameno
[April 21, 2024, 20:58:56 pm]
by Katarameno
[April 20, 2024, 14:42:13 pm]
by odysseass
[April 20, 2024, 12:32:07 pm]
by Aris★
[April 19, 2024, 22:13:20 pm]
by okan
[April 19, 2024, 21:25:11 pm]
by Caterpillar
[April 19, 2024, 20:58:14 pm]
by IEEE SB
[April 19, 2024, 17:25:23 pm]
Members
Total Members: 9556 Latest: Maou Stats Total Posts: 1418454 Total Topics: 31243 Online Today: 508 Online Ever: 901 (October 13, 2020, 16:39:09 pm) Users Online Users: 3 Guests: 452 Total: 455 |
|