I tried to run the application in my Ubuntu virtual machine, got following:
arkadyz@arkadyz-laptop:~/JavaPoint/dist$ java -jar JavaPoint.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1649)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1667)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1614)
at java.awt.Toolkit.<clinit>(Toolkit.java:1636)
at java.awt.Component.<clinit>(Component.java:568)
at javapoint.Main.main(Main.java:31)
Does anybody have thoughts ?
Thank you in advance.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
http://ubuntuforums.org/showthread.php?t=1099777 Look at this.
I ran it under Ubuntu in a windows 7 virtual machine and it ran fine. I also read that this may only occur on 64 bit java jres. Do you have a 32 or 64 bit processor?
Kyle
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I did exactly as they suggested (should install one package) and it succeeded. My machine is WinXP 32 bit, I created a VM and installed Ubuntu 10.04 there.
Thank you,
Arkady.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
arkadyz@arkadyz-laptop:~/JavaPoint/dist$ java -jar JavaPoint.jar .javapoint.Main.main(Main.java:74)
javapoint.Main.getLog(Main.java:37) /tmp/log6729880720186151754.txt
javapoint.Main.main(Main.java:107) Scheduling main frame invocation
javapoint.Main$1.run(Main.java:114) Setting LAF
javapoint.Main$1.run(Main.java:122) Starting main frame on file /home/arkadyz/JavaPoint/dist/JavaPoint.jar
java.lang.IllegalAccessException: Class javapoint.Utilities can not access a member of class sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
at java.lang.reflect.Method.invoke(Method.java:607)
at javapoint.Utilities.close(Utilities.java:104)
at javapoint.Utilities.createTemporaryFile(Utilities.java:71)
at javapoint.MainFrame.<init>(MainFrame.java:112)
at javapoint.Main$1.run(Main.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Yes, the single jar version is the jar in the store folder. It has it's library files stored inside of the jar to create a single file so users wont have to mess with other folders when moving the program.
Have you tried running other java jars? I'm not sure if this is something wrong with your computer or the program.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
This test is here on purpose; if the program starts normally, the jar stays locked and "save in jar" doesn't work.
The program is restarted at line 89 (Runtime.getRuntime().exec(command)).
Can you pls explain shortly what is the logic of this if-statement and why it is only for windows ?
Cf 3003446
Shortly: Windows locks the jar when it is running, making runtime modification (like "save in jar" feature) impossible.
It works fine on Mac and Linux.
The workaround on Windows is to restart the application from a temporary jar, thus unlocking the original jar.
If you know of a simpler way, I would be glad to use it.
This is java of IBM (not of Sun).
Good to know, I never used it before.
I will soon commit a fix for debug() and debugPrint().
start JavaPoint.jar doesn't work.
That's why the restart fails.
Can you try by replacing "cmd /c start " with "cmd /c java -jar " (line 84 in Main.java)?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
I tried to run the application in my Ubuntu virtual machine, got following:
arkadyz@arkadyz-laptop:~/JavaPoint/dist$ java -jar JavaPoint.jar
Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-6-openjdk/jre/lib/i386/xawt/libmawt.so
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1649)
at java.lang.Runtime.load0(Runtime.java:787)
at java.lang.System.load(System.java:1022)
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1750)
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1667)
at java.lang.Runtime.loadLibrary0(Runtime.java:840)
at java.lang.System.loadLibrary(System.java:1047)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:67)
at sun.security.action.LoadLibraryAction.run(LoadLibraryAction.java:47)
at java.security.AccessController.doPrivileged(Native Method)
at java.awt.Toolkit.loadLibraries(Toolkit.java:1614)
at java.awt.Toolkit.<clinit>(Toolkit.java:1636)
at java.awt.Component.<clinit>(Component.java:568)
at javapoint.Main.main(Main.java:31)
Does anybody have thoughts ?
Thank you in advance.
To be more clear, till now I was running the application in my Windows XP machine. Just decided to try in Ubuntu to see how the GUI behaives.
http://ubuntuforums.org/showthread.php?t=1099777 Look at this.
I ran it under Ubuntu in a windows 7 virtual machine and it ran fine. I also read that this may only occur on 64 bit java jres. Do you have a 32 or 64 bit processor?
Kyle
Great !
I did exactly as they suggested (should install one package) and it succeeded. My machine is WinXP 32 bit, I created a VM and installed Ubuntu 10.04 there.
Thank you,
Arkady.
I have problems to run with "java -jar":
1. Windows XP : program is not started at all
D:\JavaProjects\JavaPoint\dist>java -jar JavaPoint.jar
.javapoint.Utilities.debug(Utilities.java:236)
javapoint.Utilities.debugPrint(Utilities.java:252) C:\DOCUME~1\arkadyz\LOCALS~1\
Temp\log2733483289589678041.txt
javapoint.Utilities.debug(Utilities.java:236) cmd /c start C:\DOCUME~1\arkadyz\L
OCALS~1\Temp\javapoint6817878297783203689.jar D:\JavaProjects\JavaPoint\dist\Jav
aPoint.jar
javapoint.Utilities.debug(Utilities.java:236) java.lang.ProcessImpl@36223622
javapoint.Utilities.debug(Utilities.java:236) -1
2 Ubuntu: program started but with errors
arkadyz@arkadyz-laptop:~/JavaPoint/dist$ java -jar JavaPoint.jar .javapoint.Main.main(Main.java:74)
javapoint.Main.getLog(Main.java:37) /tmp/log6729880720186151754.txt
javapoint.Main.main(Main.java:107) Scheduling main frame invocation
javapoint.Main$1.run(Main.java:114) Setting LAF
javapoint.Main$1.run(Main.java:122) Starting main frame on file /home/arkadyz/JavaPoint/dist/JavaPoint.jar
java.lang.IllegalAccessException: Class javapoint.Utilities can not access a member of class sun.net.www.protocol.jar.JarURLConnection$JarURLInputStream with modifiers "public"
at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:95)
at java.lang.reflect.Method.invoke(Method.java:607)
at javapoint.Utilities.close(Utilities.java:104)
at javapoint.Utilities.createTemporaryFile(Utilities.java:71)
at javapoint.MainFrame.<init>(MainFrame.java:112)
at javapoint.Main$1.run(Main.java:124)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:226)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:602)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:275)
The "single jar" version of JavaPoint is not in dist/ but in store/.
To generate it, go to the "Files" view in NetBeans, right click on build.xml and choose "Run Target" > "Other Targets" > "package-for-store".
Your console output in Windows XP isn't normal, the line references shouldn't be in Utilities.
Can you do a diff to see if your Main matches r233?
My main.java is up-to-date, r233. I updated jar in store/ but still can't run it from Windows.
What do you mean "single.jar" version ? Is it without lib/ directory ?
Yes, the single jar version is the jar in the store folder. It has it's library files stored inside of the jar to create a single file so users wont have to mess with other folders when moving the program.
Have you tried running other java jars? I'm not sure if this is something wrong with your computer or the program.
I understood why I can't run in windows.
We have following condition in Main.java:
if (arguments.length == 0 && System.getProperty("os.name").toLowerCase().startsWith("win") &&
originalFile.getName().endsWith(".jar")) {
……………………………………
return;
}
This is exact the case when I try to run in Windows.
This test is here on purpose; if the program starts normally, the jar stays locked and "save in jar" doesn't work.
The program is restarted at line 89 (Runtime.getRuntime().exec(command)).
This output is not normal:
It should have been:
My post seems to have failed.
I'm trying to add the missing part.
This output is not normal:
It should have been:
What do you have in Main.java line 37?
log2733483289589678041.txt is the log file for the restarted application.
What is its content?
Does it work if you use the latest release instead of building it yourself?
I can't run the latest release from Windows too. Where is log2733483289589678041.txt ?
It's in your Temp/ folder.
The path is displayed in the message (C:\DOCUME~1\arkadyz\LOCALS~1\ Temp\).
If you have tried several times, this folder should be full of temporary files.
I suggest you clean it and run JavaPoint again.
After that, you should have:
* a temporary jar (maybe);
* a temporary .dict file (maybe);
* 2 log files (sure).
One of these logs is for the first stage (before the restart), the other one is for the second stage (after the restart).
I'd like to see both.
I ran release version, see only 1 log file: log2609580182436507789.txt. Don't see option to attach file, its contents are:
javapoint.Utilities.debug(Utilities.java:236)
javapoint.Utilities.debug(Utilities.java:236) cmd /c start C:\DOCUME~1\arkadyz\LOCALS~1\Temp\javapoint2648970386474403834.jar D:\JavaProjects\JavaPoint\store\JavaPoint.jar
javapoint.Utilities.debug(Utilities.java:236) java.lang.ProcessImpl@362b362b
javapoint.Utilities.debug(Utilities.java:236) -1
See also javapoint2648970386474403834.jar
That means the application doesn't restart properly.
I suspect it is locked on the "print('.')" because it cannot use the standard output.
I will try to find a workaround.
Your output really puzzles me.
If you add the following line at the beginning of main():
What does it write?
D:\JavaProjects\JavaPoint\store>java -jar JavaPoint.jar
[java.lang.Thread.getStackTraceImpl(Native Method), java.lang.Thread.getStackTra
ce(Thread.java:1042), javapoint.Main.main(Main.java:70)]
.javapoint.Utilities.debug(Utilities.java:240)
javapoint.Utilities.debugPrint(Utilities.java:256) C:\DOCUME~1\arkadyz\LOCALS~1\
Temp\log4597005489047361631.txt
javapoint.Utilities.debug(Utilities.java:240) cmd /c start C:\DOCUME~1\arkadyz\L
OCALS~1\Temp\javapoint3032731501126104304.jar D:\JavaProjects\JavaPoint\store\Ja
vaPoint.jar
javapoint.Utilities.debug(Utilities.java:240) java.lang.ProcessImpl@35a435a4
javapoint.Utilities.debug(Utilities.java:240) -1
This is what disrupts the line references.
What version of Java are you running?
Can you run the application from the command line with:
If it doesn't work, then we can try to replace "start" with "java -jar" in main().
Can you pls explain shortly what is the logic of this if-statement and why it is only for windows ?
I am running following version of java:
D:\JavaProjects\JavaPoint\store>java -version
java version "1.6.0"
Java(TM) SE Runtime Environment (build pwi3260sr7-20091217_01(SR7))
IBM J9 VM (build 2.4, JRE 1.6.0 IBM J9 2.4 Windows XP x86-32 jvmwi3260sr7-200912
14_49398 (JIT enabled, AOT enabled)
J9VM - 20091214_049398
JIT - r9_20091123_13891
GC - 20091111_AA)
JCL - 20091202_01
This is java of IBM (not of Sun).
start JavaPoint.jar doesn't work.
Cf 3003446
Shortly: Windows locks the jar when it is running, making runtime modification (like "save in jar" feature) impossible.
It works fine on Mac and Linux.
The workaround on Windows is to restart the application from a temporary jar, thus unlocking the original jar.
If you know of a simpler way, I would be glad to use it.
Good to know, I never used it before.
I will soon commit a fix for debug() and debugPrint().
That's why the restart fails.
Can you try by replacing "cmd /c start " with "cmd /c java -jar " (line 84 in Main.java)?
I replaced "start" by "java -jar" and it succeeded to start !!!!!!!
This is output after the replacement:
D:\JavaProjects\JavaPoint\store>java -jar JavaPoint.jar
.javapoint.Utilities.debug(Utilities.java:240)
javapoint.Utilities.debugPrint(Utilities.java:256) C:\DOCUME~1\arkadyz\LOCALS~1\
Temp\log5917158454274654453.txt
javapoint.Utilities.debug(Utilities.java:240) cmd /c java -jar C:\DOCUME~1\arkad
yz\LOCALS~1\Temp\javapoint73222945653960333.jar D:\JavaProjects\JavaPoint\store\
JavaPoint.jar
javapoint.Utilities.debug(Utilities.java:240) java.lang.ProcessImpl@35913591
javapoint.Utilities.debug(Utilities.java:240) 46
I updated Utilities, the line references should work now.
That's fine, but now my concern is whether the first stage terminates correctly.
If it doesn't, the jar will stay locked.
Does the save button work?
Yes, save button works.