|
Hi,
If DatePicker receives a value, then it will be stuck with that value, even if you remove the date text from it's TextField, or even if you write a text that isn't date format (random characters). Is there a way to tell it to change it's value to null, if the text from TextField is removed or if the text isn't date format (ex: "adasda" instead of "10.10.2010")?
modified 29-Sep-18 12:53pm.
|
|
|
|
|
After some testing on different machines, I found out that this problem occurs only with Java JRE 10.0.2. Using Java JRE 1.8.0, DatePicker runs without any problems and has all the features.
|
|
|
|
|
Hello! I am new to Java and am looking for a source code for automatic license plate recognition.
someone can help me?
thank you in advance.
|
|
|
|
|
Member 13918755 wrote: someone can help me? Yes, it is called using a search engine: www.google.com[^]
|
|
|
|
|
Automatic vehicle license plate recognition is an important component of modern intelligent transportation systems (ITS). Generally vehicle license plate recognition is divided into several steps including license plate extraction, image region which contains a license plate, character segmentation, and character recognition. Automatic license plate recognition system using Camera mounted over the exposure system image of the license plate is captured and the image is processed to extract the license number.
|
|
|
|
|
Hi,
On my workstation the program I made is running well, but here I have Java JDK installed.
When I was done and tried to run it on a different machine, the program starts, and for a split second the GUI shows then the whole program closes itself. After some testing, I found out that the problem somehow is Java JDK.
If I install Java JDK on the testing machine, the program runs fine, even if I uninstall Java JDK after that, the program still runs, which makes me think it might add additional jars in Java folder. If I uninstall Java, and reinstall only java, the program again won't work unless I install Java JDK too.
Did anyone encountered this problem too, or knows a fix for it? Am I right about JDK actually adding additional jars in Java folder, which remain there even after JDK is uninstalled?
Here is a list of libraries my program uses, I marked them at the end with [] because I'm using multiple classes from them and the list would have been way too long if I was to add all of them:
import com.sun.glass []
import java.awt []
import java.io []
import java.net []
import java.text []
import java.time []
import java.util []
import javafx []
Also, I'm using a DLL file, but from my testing that one isn't the problem, as I said, the JDK is somehow.
Hope I explained the problem well enough, if not, I'll happily answer any other questions.
OS: Windows 10 x64 Pro on both machines.
|
|
|
|
|
Any Java application should run on any system that has the correct JRE loaded. Are you sure that the version of the runtime on the test machine is the same as, or later than, the one on the development system?
|
|
|
|
|
Yes, I'm sure, I tried it on a VM and on my laptop, and on both I have to do what I said in the main post.
|
|
|
|
|
Well it is anyone's guess what your program is doing wrong. You will need to find a way to gather more information.
|
|
|
|
|
I did a little more testing, and it seems that I need the JDK installed in order for it to load the DLL. That DLL only adds the minimize function to an undecorated stage, when clicked on taskbar.
The GUI shows for a split second because the DLL is loaded just after stage.show().
I'm loading and using it with:
System.load(System.getProperty("user.dir") + "\\Data\\Minimize_x" + windowsVersion + ".dll");
addMinimize(Window.getWindows().get(0).getNativeWindow());
|
|
|
|
|
I do not have a system available that I can test that. However I have used a similar construct in the past and it worked fine without the JDK. If you are certain that is the problem, and can reproduce it with a small test sample, then you should report it to Oracle.
|
|
|
|
|
As I said, the DLL only adds that function, so I should be able to reproduce it with a simple blank stage.
Thanks.
|
|
|
|
|
I just reproduced of the problem, but this time I even tried JDK 10, rather then 8 which I used in the main app, and has the same problem.
I added this one on drive, with jar and sources in format that can be read online without download.
Link in case you want to see
|
|
|
|
|
OK. I have just run your code on my system which has JRE 8 and JDK 8 installed, and it runs fine. I then installed Java JRE 8 on my wife's system and again your code runs fine. So it does not look like it has anything to do with the absence of the JDK. I did notice in your Java code that you check for 32/64 bit and load a different DLL based on that setting; I wonder if that is part of the problem. Have you checked the eroriC.txt file for any error messages?
|
|
|
|
|
One thing that might be worth trying in that code is to break it down into its constituent parts. However I cannot find the definition for the getNativeWindow method.
|
|
|
|
|
The thing is, I tried to add the loading of the DLL in a try {} catch(Exception e){} block, and in catch to write in a file the message of that exception, but it doesn't write anything in the file. And I can't try to debug the program in Eclipse, because for that I'll need the JDK installed, and if I have that, then the program will run without a problem.
|
|
|
|
|
Sorry, but I cannot reproduce the problem. There must be something else incompatible on the PC where it is failing, but I have no more ideas.
|
|
|
|
|
I managed to find out what the problem was. Using catch Exception wasn't catching the execption, but using what jschell suggested (catch Throwable), I found out that the problem was the DLL files.
With Throwable I was getting dependency exception, so I looked up with "pestudio", and my DLL files, were using debug DLL's that come with Windows SDK not C++ Redistributable.
modified 25-Aug-18 13:31pm.
|
|
|
|
|
Strange then that it worked on my alternate system which does not have JDK or C++ debug libraries. Or maybe that was a release version.
|
|
|
|
|
Well, it was even weirder that it was working with JDK when my DLL files needed those debug C++.
And yeah, if you used my DLL files, and not build them using my code, then it shoudn't have worked. Maybe a program that was installed on that system, added them.
In any case, I'm glad I managed to figure it out, it was getting kinda annoying, having it work on a system, and not another. They need to change that option in Visual Studio, after all I used their "Release" mode, but I had to go in project settings too.
|
|
|
|
|
The JRE will load JNI without problem.
I strongly suspect that your problem is as follows.
1 - You have inadequate error detection.
2 - You are loading the JNI via a static block. The JNI load fails which causes an exception. That by the way means that the class will also fail to load.
Other possibility is that the JNI code is throwing an exception. JNI code that throws system exceptions will cause the VM to exit.
Because of the exception and perhaps because of the class load failure, your application is getting an uncaught exception which causes the 'main' to exit. That means that the JRE exits.
For JNI
ALWAYS, load the class in a try catch block
ALWAYS, catch 'Throwable' (not Exception, not Runtime)
ALWAYS, log/print the exception stack trace. Not the message - the entire stack trace.
ALWAYS, do the above (catch, log) any method call that goes to a JNI method.
Note that the following loads the class. You should NOT have code like this in your main entry class. DO NOT attempt to load the class this way using another class either.
class MyClass
{
private MyJNIClass somevar
...
Instead use a Interface and have a method and that method does a 'new' for your JNI class.
class MyJNIClass implements MyJNIInterface {...}
interface MyJNIInterface {}
class MyClass
{
MyJNIInterface var;
public void setup()
{
try
{
var = new MyJNIClass();
}
catch(Throwable e)
{
// Log/print the stack trace
// Figure out what to do if it fails.
}
}
My last recommendation - do not use JNI.
If you want to access some other language
1. Create an executable with an IO Interface. IO interface would be via stdin/out, sockets, files, etc.
2. Create an API in your java app that runs 1, and uses the IO interface to talk to it.
The above solution means that failures in the other code cannot cause your VM to exit. The is NO way to stop this. That is why I recommend the above.
|
|
|
|
|
When I am running apache servicemix. I am getting this Error
Caused by: java.lang.OutOfMemoryError: Java heap space . Is there a way to increase the java heap size for opensuse11.
Full Error
<pre>08:04:06,029 | ERROR | ADS.MANUALSTART] | ads | 91 - org.apache.camel.camel-core - 2.8.5 | Exchange[
, Id:ID-linux-1q9s-8486-1533729523726-0-3
, ExchangePattern:InOnly
, Properties:{CamelToEndpoint=log:
, Headers:{JMS_IBM_PutDate=20180814, JMSDestination=queue:, BodyType:String
, CaughtExceptionType:org.apache.camel.CamelExecutionException, CaughtExceptionMessage:Exception occurred during execution on the exchange: Exchange[JmsMessage[JmsMessageID: ID:414d5120514949552e4d512e4d414e414c2e6c5b20060c07]], StackTrace:org.apache.camel.CamelExecutionException: Exception occurred during execution on the exchange: Exchange[JmsMessage[JmsMessageID: ID:414d5120514949552e4d512e4d414e414c2e6c5b20060c07]]
at org.apache.camel.util.ObjectHelper.wrapCamelExecutionException(ObjectHelper.java:1187)
at org.apache.camel.impl.DefaultExchange.setException(DefaultExchange.java:287)
at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:51)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:90)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)
at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:306)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.ChoiceProcessor.process(ChoiceProcessor.java:80)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:90)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)
at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:306)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79)
at org.apache.camel.processor.UnitOfWorkProcessor.processAsync(UnitOfWorkProcessor.java:139)
at org.apache.camel.processor.UnitOfWorkProcessor.process(UnitOfWorkProcessor.java:106)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:104)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:85)
at org.apache.camel.component.jms.EndpointMessageListener.onMessage(EndpointMessageListener.java:91)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doInvokeListener(AbstractMessageListenerContainer.java:560)
at org.springframework.jms.listener.AbstractMessageListenerContainer.invokeListener(AbstractMessageListenerContainer.java:498)
at org.springframework.jms.listener.AbstractMessageListenerContainer.doExecuteListener(AbstractMessageListenerContainer.java:467)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.doReceiveAndExecute(AbstractPollingMessageListenerContainer.java:325)
at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:263)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)
at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.OutOfMemoryError: Java heap space
at java.util.Arrays.copyOf(Arrays.java:2882)
at java.lang.AbstractStringBuilder.expandCapacity(AbstractStringBuilder.java:100)
at java.lang.AbstractStringBuilder.append(AbstractStringBuilder.java:515)
at java.lang.StringBuffer.append(StringBuffer.java:306)
at java.io.StringWriter.write(StringWriter.java:77)
at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:111)
at java.io.BufferedWriter.flush(BufferedWriter.java:235)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.cleanUp(MarshallerImpl.java:334)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.write(MarshallerImpl.java:327)
at com.sun.xml.bind.v2.runtime.MarshallerImpl.marshal(MarshallerImpl.java:244)
at javax.xml.bind.helpers.AbstractMarshallerImpl.marshal(AbstractMarshallerImpl.java:95)
at de.mt.esb.ecom.ads.AffiliateProcessor.memoryMarshall(AffiliateProcessor.java:179)
at de.mt.esb.ecom.ads.AffiliateProcessor.process(AffiliateProcessor.java:109)
at org.apache.camel.impl.converter.AsyncProcessorTypeConverter$ProcessorToAsyncProcessorBridge.process(AsyncProcessorTypeConverter.java:48)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.management.InstrumentationProcessor.process(InstrumentationProcessor.java:69)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.DelegateAsyncProcessor.processNext(DelegateAsyncProcessor.java:98)
at org.apache.camel.processor.DelegateAsyncProcessor.process(DelegateAsyncProcessor.java:89)
at org.apache.camel.processor.interceptor.TraceInterceptor.process(TraceInterceptor.java:90)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.RedeliveryErrorHandler.processErrorHandler(RedeliveryErrorHandler.java:318)
at org.apache.camel.processor.RedeliveryErrorHandler.process(RedeliveryErrorHandler.java:209)
at org.apache.camel.processor.DefaultChannel.process(DefaultChannel.java:306)
at org.apache.camel.util.AsyncProcessorHelper.process(AsyncProcessorHelper.java:78)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:116)
at org.apache.camel.processor.Pipeline.process(Pipeline.java:79)
]
|
|
|
|
|
|
|
I want java code for hadoop for builting data warehouse.anyone plz help.
|
|
|
|
|