swing - Java application does not work properly outside IDE's directory -


When I run it with NetBeans it's all right when I copy and go to the dist directory directory, So some things get smaller. Most importantly, jettison editing becomes confused, some fields only when you hit ESC (if you had hit the first entry, the changes are accepted, otherwise they are not, but you require ESC in both cases) and the same The kind of weird stuff also gets focused. I thought I was not clear ...

P.S. Files are automatically saved (NetBeans feature) if it matters.

EDIT: When I go to Deer Deer and run, it also works.

Edit 2 (Answer):

This problem is in my computer (Ubuntu 9.04), my windows Getting XP inside the virtual box and in the second (real) computer with Windows XP. When I run it with the console with java /path/to/main.jar, it throws the main class, is not found, and the exception does not start at all when I call it java -jar / path / to / main. Run with jar, it works in a way, but when it is said that throws java.lang.NumberFormatException in situations: zero.

The only place I use on the NumberFormat (on table updates):

  decimalable parsers = new passphrase ("0.00");  

And, possibly, this:

  currencyFormatter = NumberFormat.getCurrencyInstance (Locale .getDefault ());  

Where default locale is set

  locale.set default (new locale ("LT", "LT");  

The Java version is 1.6.0_18, which is both JDK in machines used by NetBens and JVM.

Go to the property of your project ( File> Project Properties ) in NetBins . Go to the Libraries tab, click Manage Platforms and see the value for Platform Folders .

From the console, & lt; Platform Folder & gt; Run \ Java -version .

Now try it again without the full path; Just java-version .

I hope these different values ​​are returning.

The route used by the IDE comes from platform definition, which is created by default, when NB is installed and never updated. The path used in the console is Windows Path Environment This variable is updated when Java is installed and over time, the IDE will be separated from the path used.

A good rule of thumb When Java prompts to provide an update, it is time to add a new Java platform to Netbeans .

I usually keep several platforms. At least: the latest version of 1.4.2, 1.5.0, 1.6.0, and an older version of 1.6.0 (currently U4, this version we have suggested in our first product release).


Comments

Popular posts from this blog

sql - dynamically varied number of conditions in the 'where' statement using LINQ -

asp.net mvc - Dynamically Generated Ajax.BeginForm -

Debug on symbian -