| Java encryption <--> .NET encryption |
|
 |
Index ‹ java-programmer
|
- Previous
- 1
- Vetoing a change by DefaultCellEditor in JTableI'm using a DefaultCellEditor with a JTextField to capture a String
that is ultimately passed to setValueAt in my TableModel. In that
method, I have logic which could throw an exception if the String's
contents proves to be invalid (i.e. one use is where the String is a
regular expression that might be syntactically invalid).
How can I handle this? Right now, the code throws an Exception which
I'd like to catch, display a dialog, and then return the user to
editing without ever committing the value. Is this easily doable?
Regards,
Brian.
- 3
- java/81177: java patch server down
>Number: 81177
>Category: java
>Synopsis: java patch server down
>Confidential: no
>Severity: serious
>Priority: high
>Responsible: freebsd-java
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: update
>Submitter-Id: current-users
>Arrival-Date: Tue May 17 20:30:07 GMT 2005
>Closed-Date:
>Last-Modified:
>Originator: Ron
>Release: FreeBSD 5.4-STABLE i386
>Organization:
>Environment:
System: FreeBSD justok.thuisnetwerk.nl 5.4-STABLE FreeBSD 5.4-STABLE #0: Sat May 14 16:24:15 CEST 2005 email***@***.com:/usr/obj/usr/src/sys/MYKERNEL i386
>Description:
jdk14 and jdk15 can not be installed, because http://www.eyesbeyond.com/freebsddom/java/jdk15.html is down.
<code/input/activities to reproduce the problem (multiple lines)>
Use any webbrowser to visit the URL, and see that it's down.
>How-To-Repeat:
>Fix:
Someone should bring up the webserver or let the URL point to a webserver that is up.
>Release-Note:
>Audit-Trail:
>Unformatted:
- 8
- JComboBox strange behaviorHello!
I have interesting problem with javax.swing.JComboBox (java 1.4.2)
When I click at combo to open list - there is no reaction to mouse
moves except these on combo header or outside my combo. So I cannot
choose any item from the list.
But I can use keyboard...
This is default combo, I've just create it and populate some Strings
into it.
any idea what's wrong?
B.
- 10
- JNI: passing Objects containing non-primitive types back and forthHi folks,
looked through a lot a threads overhere already but did not find an
answer detailed enough:
I want to map a c-structure like this created in my native code
struct mystruct {
long pid ;
long data[] ;
long meta[][] ;
} ;
to a java-object within my Java-code which would look like this IMHO:
public class ComplexData {
final int maxdata = 100 ;
final int maxmeta = 5 ;
private long pid ;
private data[] = new long[maxdata] ;
private meta[][] = new long[maxdata][maxmeta] ;
public void ComplexData() {
// Assigning values
pid = 1234 ;
data[0] = ...
}...
As far as I understood it is now possible to pass this Java-object to
the native code using the JNI-Function NewObject and read the members
and assign their values to the c-structure's members (to make them
available from within c) and the other way round, assign the values
from the c-structure to the members within the Java-object (possibly
without the initialization in the "Java-world" (I need both
directions).
My problem now is: How do I access the object's members (especially
the array types) from within c? Functions pointed to in different
threads (e.g. (Get|Set)LongArrayRegion ) need the reference to the
array, but I have only the reference to the object up to now.
Any code snippets based on the code above would be helpful.
Cheers
Bernd
- 11
- Java FACT ?"FACT: Java has no first-class functions and no macros. This results in
warped code that hacks around the problem, and as the code base grows,
it takes on a definite, ugly shape, one that's utterly unique to Java.
Lisp people can see this clear as day. So can Python folks, so can Ruby
folks. Java people flip out, and say "macros are too much power",
or "what do u mean i dont understand u" or "fuck you, you jerk,
Lisp will NEVER win". -- Steve Yegge, 2006-04-15
what would you people make of the above statement ? Has anyone here
used Lisp *and* Java on major projects ? If so would you say this
sounds off-base or correct ?
thanks,
--dcnstrct
- 11
- PrintServiceLookup.lookupPrintServices fails to list new printers until re-start (JDK1.4.2_03, Linux RedHat, Tomcat 4.x)Hi Forum,
How could I get
javax.print.PrintServiceLookup.lookupPrintServices(null,null) to return the
current available services while the program that uses lookupPrintServices
is running? In a tomcat servlet I use the lookupPrintServices(..) to get a
list of the printer services available. The class works well and returns the
list but if I install a new printer, the servlet does not list the newly
installed service until I restart Tomcat. Is there a way to unload and
reload the PrintServiceLookup class and then call
PrintServiceLookup.lookupPrintServices?
It appears that the lookupPrintServices(..) returns the list of services
that was available when the instance of the virtual machine was started.
Hence, while the instance is running, it allways returns the same list of
services. If I run a program that lists the services and then exits, the
program lists the newly added printer on re-run. But if the program never
exits (it runs in a loop, re-listing the services every so often), and I add
a new printer while the program is running, the newly added printer is not
listed until I terminate teh rpogram and re-start it.
Thanks in advance for your responser
- 11
- Help needed (GUI/passing objects)
Hi, I'm a student learning java. In my latest assignment, I am to create a
Scheduler/Diary, with a GUI.
I am getting the error
Exception in thread "main" java.lang.NoSuchMethodError: BaseFrame: method
<init>
()V not found
at Dairy.main(Dairy.java:22)
From the main method in 'project.class', I create the diary object, which
creates month and day objects etc...
I create a state object, which takes in the Diary Object and points to the
selected month, day, appointment etc
I then create a gui object, which is to change the state (through methods in
the state).
This error occurs whenever I pass in the state object to the GUI
('BaseFrame').
Exception in thread "main" java.lang.NoSuchMethodError: BaseFrame: method
<init>
()V not found
at Dairy.main(Dairy.java:22)
I'm not sure whats causing this. I'm checking like 22 in the 'diary' class,
but it's a }. Not too helpful.
GUI appears when no state object is passed, can't manipulate the data with
that though....
In main:
------------
//set up the Diary
Diary dia = new Diary();
//set up the state
State diaryState = new State(dia);
//Set up the gui
BaseFrame firstFrame = new BaseFrame(diaryState);
---------------
When setting up the GUI:
---------------
State curState;
//constructor for the basic frame, takes in a state object
public BaseFrame(State sta)
{
curState = sta;
.....................}
--------------------------
Done a search online, didn't get too far. Any ideas? What does that error
mean exactly?
- 11
- changing code while program is runningHello,
I would like to have my class code loaded into application, which is
already running. I tried something like this:
public class Main
{
...
private void reloadClass() throws Exception
{
new Pair("","").print(); //class to be reloaded
System.in.read (); //interval - here comes manual class recompilation
ClassLoader.getSystemClassLoader ().loadClass ("Pair"); //reload class
new Pair("","").print(); //check if new version loaded
}
}
It seems that ClassLoader.loadClass checks the presence of the Pair
class in memory and doesn't relod it. How to omit it?
regards
blacky
- 12
- Recognize Windows ShutdownHi,
how can i recognize that Windows is shutting down (when i'm logged off)?
Sorry for stupid questions, but i didn't found the right solution!
Greets,
Nico
-> remove the underscores in the email <-
- 13
- Download a webpage that contains javascriptI am trying to download the html page at
http://www.dreamteamfc.com/dtfc04/servlet/PostPlayerList?catidx=1
Using the code
public class DownloadWebPage
{ public static void main (String[] args) throws IOException
{
URL url = new
URL("http://www.dreamteamfc.com/dtfc04/servlet/PostPlayerList?catidx=1");
BufferedReader webRead = new BufferedReader(new
InputStreamReader(url.openStream()));
String line;
while ((line = webRead.readLine()) != null)
{
System.out.println(line);
}
}
}
But all I am getting is
<HTML><HEAD><SCRIPT
LANGUAGE="JAVASCRIPT">location.replace("http://www.dreamteamfc.com");</SCRIPT></HEAD></HTML>
I'm guessing that when the web brower meets this code it executes the
javascript
location.replace("http://www.dreamteamfc.com")
And somehow loads the web page.
How do I go about downloading the actual web page that gets displayed
in a normal web browser.
Any help appeciated!
pat
- 13
- 13
- Removing Item From JList - getSelectedIndex problemHi all,
I am currently working on a JList that populates data into a JList
from a CSV file. I have a button that is supposed to get the Selected
index and then delete that item from the JList. Below is the code that
I am using:
int index = lstComputerExceptions.getSelectedIndex();
System.out.println("index is: " + index);
model.remove(0);
int size = model.getSize();
if (size == 0) { //Nobody's left, disable firing.
btnDelete.setEnabled(false);
} else { //Select an index.
if (index == model.getSize()) {
//removed item in last position
index--;
}
lstComputerExceptions.setSelectedIndex(index);
lstComputerExceptions.ensureIndexIsVisible(index);
}
I have printed out what index is and no matter what item I have in the
Jlist I have selected it will always print out
-1. Therefore keeps on causing my program to crash and not delete the
item out of the Jlist.
Any help in this matter would be highly appreicated.
Thank you
- 14
- Precision problem with doubleHi everyone,
I am a Java beginner, and I am trying to create a very simple binary
tree.
Each node has a value, the left child has the same value + an
increment, the right child has the same value - the same increment.
I try to recursively create the tree, but I have precision problems.
My "main" node has a value of 10, the increment is 0.1, tree depth is
4
So i want a tree that goes like this :
depth 1 : 10
depth 2 : 0.9 / 10.1
depth 3 : 0.8 / 10 / 10 / 10.2
depth 4 : 0.7 / 0.9 / 0.9 / 10.1 / 0.9 / 10.1 / 10.1 / 10.3
But at depth 4 when I try to print the value I get 9.700000000000001
instead of 9.7, and 10.299999999999999 instead of 10.3
And things get worse when the depth increase.
All the values and increment are stored in double (native type).
Is it normal? How can I avoid this problem?
Thanks a lot,
Tom.
[main class]
double increment = 0.1;
double startValue = 10;
int maxDepth = 4;
Tree myTree = new Tree(startValue, 1);
myTree.recursivelyCreateChildren(increment, maxDepth);
[Tree.java]
public int depth;
public double value;
public Tree leftChild;
public Tree rightChild;
Tree(double value, int depth){
this.value=value;
this.depth=depth;
System.out.println("node of depth " + depth + " created, value = " +
value);
}
public void createChildren(double increment){
rightChild = new Tree(value - increment, depth+1);
leftChild = new Tree(value + increment, depth+1);
}
public void recursivelyCreateChildren(double increment, int maxDepth)
{
if (depth < maxDepth){
createChildren(increment);
leftChild.recursivelyCreateChildren(increment, maxDepth);
rightChild.recursivelyCreateChildren(increment, maxDepth);
}
}
- 14
- 14
- SET CLASSPATHhi, i'm using the abstract class definition, and when compiling the abstract
class it's ok, but the problem is when compiling the subclass: i get the
following message:
Rect.java:9: cannot resolve symbol
symbol : class GeoFigure
location: class figures.Rect
public class Rect extends GeoFigure
^
1 error
the abstract class is called: GeoFigure;
and the subclass is Rect
so how cn use the set classpath at command line, should it include the
directory where are located all the package files(the abstract class and
subclass .java files), or should it point at onel evel before the directory
that contains the package files?
thank's!
--
SAID BARA
|
| Author |
Message |
gawel

|
Posted: 2005-3-16 19:59:00 |
Top |
java-programmer, Java encryption <--> .NET encryption
Hajo,
I need to exchange encypted data between
.NET and Java environments. The first
problem I encountered is that symmetric
ciphers in .NET needs initialization
vector and Java counterparts don't.
Can some one point me out the place
where I can find any practise and
patterns for encrypted communication
between Java and .NET ?
thanks for any info
Gawel
|
| |
|
| |
 |
Michel Gallant

|
Posted: 2005-3-16 21:15:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
A bit of discussion and some sample code for this for 3DES case:
http://www.jensign.com/JavaScience/dotnet/NetDESEncrypt
- Mitch Gallant
"gawel" <email***@***.com> wrote in message news:d1978h$mo0$email***@***.com...
> Hajo,
> I need to exchange encypted data between
> .NET and Java environments. The first
> problem I encountered is that symmetric
> ciphers in .NET needs initialization
> vector and Java counterparts don't.
>
> Can some one point me out the place
> where I can find any practise and
> patterns for encrypted communication
> between Java and .NET ?
>
> thanks for any info
>
> Gawel
|
| |
|
| |
 |
gawel

|
Posted: 2005-3-16 23:15:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
Michel Gallant wrote:
> A bit of discussion and some sample code for this for 3DES case:
> http://www.jensign.com/JavaScience/dotnet/NetDESEncrypt
At first glance looks great. Thanks for it.
Did you do similar comparison with RSA ?
Gawel
|
| |
|
| |
 |
gawel

|
Posted: 2005-3-16 23:49:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
One more thing.
In this article you mentioned that RSA
is not in JCE. But here I see RSA:
http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#AppA
Can you explain me whre is the truth :)
Gawel
|
| |
|
| |
 |
Michel Gallant

|
Posted: 2005-3-17 3:38:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
Pre JSE 1.5 RSA was only available for digital signature (not for encryption/enveloping).
However, provider was updated in JSE 1.5 to include RSA encryption capability:
http://java.sun.com/j2se/1.5.0/docs/guide/security/enhancements15.html
- Mitch Gallant
"gawel" <email***@***.com> wrote in message news:d19kov$82t$email***@***.com...
> One more thing.
> In this article you mentioned that RSA
> is not in JCE. But here I see RSA:
> http://java.sun.com/j2se/1.4.2/docs/guide/security/jce/JCERefGuide.html#AppA
>
>
> Can you explain me whre is the truth :)
>
>
> Gawel
|
| |
|
| |
 |
Michel Gallant

|
Posted: 2005-3-17 3:39:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
http://www.jensign.com/JavaScience/dotnet/RSAEncrypt
- Mitch
"gawel" <email***@***.com> wrote in message news:d19ipe$nun$email***@***.com...
> Michel Gallant wrote:
>
> > A bit of discussion and some sample code for this for 3DES case:
> > http://www.jensign.com/JavaScience/dotnet/NetDESEncrypt
>
> At first glance looks great. Thanks for it.
> Did you do similar comparison with RSA ?
>
>
> Gawel
|
| |
|
| |
 |
gawel

|
Posted: 2005-3-17 22:40:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
Michel Gallant wrote:
> A bit of discussion and some sample code for this for 3DES case:
> http://www.jensign.com/JavaScience/dotnet/NetDESEncrypt
I implemented AES using your pattern and all works great
except 256 bit keys. In this case I got exception about
not supported key length and in documentation is written
that JCE implementation of AES suppoerts 128, 192 and
256 bit keys.
One more thing, you can add to your article that
decrypted .NET bytes needs to be converted into String in Java
using following statement:
string plainDotNetText = new String(decryptedBytes, "UTF-16LE");
thanks once again for help
Gawel
|
| |
|
| |
 |
gawel

|
Posted: 2005-3-18 22:02:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
Michel Gallant wrote:
> http://www.jensign.com/JavaScience/dotnet/RSAEncrypt
Hajo,
have you ever exchange RSA public key using Base64 between
Java and .NET? I have no problem with exchanging of
symmertic key(AES, DES) but for RSA I got modulus can
not be negative exception. I think it is connected with bytes
order but I do not know what is going on.
regards
Gawel
|
| |
|
| |
 |
gawel

|
Posted: 2005-3-18 22:28:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
gawel wrote:
> Michel Gallant wrote:
>
>> http://www.jensign.com/JavaScience/dotnet/RSAEncrypt
>
>
> Hajo,
>
> have you ever exchange RSA public key using Base64 between
> Java and .NET? I have no problem with exchanging of
> symmertic key(AES, DES) but for RSA I got modulus can
> not be negative exception. I think it is connected with bytes
> order but I do not know what is going on.
I found the reason of problem.
I have 1024 bit RSA. Modulus in java
has 129 bits and privateExponnet has 129 bits
but in .NET modulus has 128 bits and private exponent
has 128 bits. Java adds leading 0 to modulus and privateExponent.
When you add this 0 all is ok. Can you explain it ?
regards
Gawel
|
| |
|
| |
 |
Michel Gallant

|
Posted: 2005-3-18 23:43:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
Shouldn't be a problem .. after all Modulus is simply a number and
same with exponent. That extra 0 is a leading 0 in Big Endian number
so has no significance. If you are careless with interpreting your bits
in swapping from little to big Endian .. it could cause a problem.
I think that "artifact" is documented in some of my C# source code :-)
- Mitch
"gawel" <email***@***.com> wrote in message news:d1eooe$e6s$email***@***.com...
> gawel wrote:
>
> > Michel Gallant wrote:
> >
> >> http://www.jensign.com/JavaScience/dotnet/RSAEncrypt
> >
> >
> > Hajo,
> >
> > have you ever exchange RSA public key using Base64 between
> > Java and .NET? I have no problem with exchanging of
> > symmertic key(AES, DES) but for RSA I got modulus can
> > not be negative exception. I think it is connected with bytes
> > order but I do not know what is going on.
>
> I found the reason of problem.
> I have 1024 bit RSA. Modulus in java
> has 129 bits and privateExponnet has 129 bits
> but in .NET modulus has 128 bits and private exponent
> has 128 bits. Java adds leading 0 to modulus and privateExponent.
> When you add this 0 all is ok. Can you explain it ?
>
>
> regards
>
> Gawel
|
| |
|
| |
 |
gawel

|
Posted: 2005-3-21 18:26:00 |
Top |
java-programmer >> Java encryption <--> .NET encryption
Hajo,
Michel Gallant wrote:
> Shouldn't be a problem .. after all Modulus is simply a number and
> same with exponent. That extra 0 is a leading 0 in Big Endian number
> so has no significance.
if you encode base64 key then it has :)
>If you are careless with interpreting your bits
> in swapping from little to big Endian .. it could cause a problem.
> I think that "artifact" is documented in some of my C# source code :-)
Exactlly but in context of .NET and CryptoAPI.
Gawel
wrote:
>>
>>
>>>Michel Gallant wrote:
>>>
>>>
>>>>http://www.jensign.com/JavaScience/dotnet/RSAEncrypt
>>>
>>>
>>>Hajo,
>>>
>>>have you ever exchange RSA public key using Base64 between
>>>Java and .NET? I have no problem with exchanging of
>>>symmertic key(AES, DES) but for RSA I got modulus can
>>>not be negative exception. I think it is connected with bytes
>>>order but I do not know what is going on.
>>
>>I found the reason of problem.
>>I have 1024 bit RSA. Modulus in java
>>has 129 bits and privateExponnet has 129 bits
>>but in .NET modulus has 128 bits and private exponent
>>has 128 bits. Java adds leading 0 to modulus and privateExponent.
>>When you add this 0 all is ok. Can you explain it ?
>>
>>
>>regards
>>
>>Gawel
>
>
>
|
| |
|
| |
 |
| |
 |
Index ‹ java-programmer |
- Next
- 1
- Hibernate and Eclipse -- where to start?Hi folks,
This began as a thread in comp.lang.java.programmer, but the focus has
really moved toward db stuff, so I repost bits here. For the full
thread, see "searching for yoda - a developer's tale" at:
http://groups-beta.google.com/group/comp.lang.java.programmer/browse_frm/thread/aa12c688b702cc72/f769b8aebe720db5?_done=%2Fgroup%2Fcomp.lang.java.programmer%2Fthreads%3Fstart%3D0%26order%3Drecent%26&_doneTitle=Back&&d#f769b8aebe720db5
[...] how to fit Hibernate into Eclipse. Again, my problem statement
is that I naturally work with objects and object graphs and would
prefer to spend most of my development effort in this domain. I would
like as much as possible to have mapping and schema handled by the
tool. It *seems* to me that the "natural" mode for Hibernate is to
start with the mapping and use the tools to generate Java and schema.
This is still better than starting with a relational model.
The learning required for these technologies is what I'm confused
about. What exactly do I need to learn? I have a couple of Hibernate
books (the "in Action" is one of them and is, so far, quite good). The
API seems reasonable and not too intimidating. If I were still a
vi/JDBC coder, I would simply add Hibernate API as a tool and
incrementally move forward. But, now that I'm a full-fledged Eclipse
user and committed to focusing on the object model, I'd like to (1)
integrate Hibernate into Eclipse (via any of the afore-mentioned
plug-ins or others), and (2) try to work from the object side of ORM.
Online docs for the plug-ins to solve (1) seem weak. It's hard to tell
which plug-in does what, and what the advantages/disadvantages of each
might be. (2) seems to imply, from my reading, a need for XDoclet or
some other Attribute-Oriented solution to bury the necessary hibernate
tags into the code. Once again, the docs I've found seem weak. More to
the point, as I've mentioned, each new link leads to five others and
their associated technology requirements...It just gets out of hand
quickly. My hope is for someone here to point the way through the fog
and say "here's how to integrate Hibernate" or perhaps "don't bother
integrating Hibernate, use this basic config file and modify as
needed", etc.
Any guidance would be greatly appreciated.
-don.
- 2
- performance and memory usage.
Hi
I created a test program to try the speed and size management of the JDK
HashMap. With regards to this I was wondering if anybody has any
comments on whether this is an appropriate way of testing this
performance, i.e. how realistic is the results with respect to caching
influence of data, heap management etc. The code is simple, but would it
produce a correct result. (the program finishes in 11 seconds on my
machine). the code is attached.
Secondly, I was wondering about the memory (heap) usage in java for this
program. It needs at least 256 MB of heap to run to finish. cmd:
java -Xms32m -Xmx256m -cp target/classes/ App
Using -Xmx128m causes OutOfMemoryError.
When calculating on the size of the datastructure i find approx that
2M Dto's = 16MB
2M Integer's for map key = 8MB
2M Integer's for ArrayList = 8MB
Thats a total of 32MB plus some megabytes for the objects,
datastructures, JVM and so on. So probably about 48-64MB in total.
Thats a completely different number from 128 MB or 256 MB.
Does anybody have any comments on why the program requires that much memory?
arnie
*****************
/* Create 2 million Dto objects with random data and insert into HashMap
also add key to an iterable list */
public void test1() {
int size = 2000000;
Map<Integer, Dto> hmap = new HashMap<Integer, Dto> (size);
Collection<Integer> alist = new ArrayList<Integer> (size);
Random r = new Random();
Dto data;
for (int c=size; c>0; c--) {
data = new Dto();
data.ip= r.nextInt(2000000000);
hmap.put(data.ip, data);
alist.add(data.ip);
}
int c = 1;
for (Integer d : alist) {
hmap.get(d);
}
}
/* Simple data placeholder */
public class Dto
{
public int ip;
public int serialnum;
}
- 3
- Is Eclipse the Commercial IDE Killer?Thomas G. Marshall wrote:
> Super Spinner coughed up:
>> Tim Tyler wrote:
>>> In comp.lang.java.advocacy Super Spinner <email***@***.com>
>>> wrote or quoted:
>>>
>>> [Eclipse plugins]
>>>
>>>> I'd say that anyone that came up with an extension wouldn't be able
>>>> to make money because an OSS group would make a knock-off and give
>>>> it away for free.
>>>
>>> Your argument apparently suggests that nobody can make money selling
>>> software. I think history has proven that that is not the case.
>>
>> I think that one can make money by selling software only if the
>> software is "complex", where "complex" means "too complex to be
>> satisfactorily knocked off by OSS". And the set of "complex" sofware
>> becomes smaller and smaller, as OSS commodotizes more and more
>> markets. I used to think that something like Excel was sufficiently
>> complex to be safe from OSS, but I now know that within the next 5
>> years the spreadsheet market will be fully commodotized and therefore
>> not profitable. The same goes for all "office"-type apps. The same
>> goes for Photoshop and the like.
>>
>> The only software that I can see being safe from commodotization is
>> software that requires special domain knowledge, knowledge that devs
>> themselves do not possess and aren't likely to obtain in a competent
>> manner. Something like tax preparation software; this requires expert
>> knowledge of the tax laws and accountants that have such knowledge
>> aren't foolish enough to work for free like software devs appear to be
>> eager to do. So I can't see OSS "winning" in that space (yes, there
>> are OSS tax preparation packages, but the vast majority won't trust
>> that the devs understand the tax laws enough to trust those packages).
>>
>> Now, as for IDE extensions, sorry, there's no way that those are out
>> of the reach of OSS commodotization. Any extension would be knocked
>> off within a year, so the developers of the original would only have
>> one year to recoup the initial investment of resources and I don't see
>> anyone bothering to try. So nearly all future IDE extensions will
>> have to come from OSS from the get-go.
>>
>> A lot of OSS starts life as poor man's versions of commercial software
>> and gradually improves, but as commercial software is killed off, new
>> software inventions will have to come from OSS itself.
>>
>> As for individual programmers, they'll have to make money by working
>> on in-house stuff or custom solutions for a contractor, because it'll
>> be quite difficult to make money selling software to the general
>> public since OSS competition will make such an effort prohibitive.
>
> I have said for a lonnng time that if you write free software, you are
> only
> making it more difficult for other software engineers to earn a living. I
> don't mean small little utilities, like OE_QuoteFix and the like. But
> creating entirely free large scale applications doesn't make you a hero,
> it makes you a villain.
>
There's an easy solution to this. All the "for money" people have to do is
WRITE BETTER software...
I can't believe that projects like Eclipse are doing so well, simply because
they are OSS. It's because they are better...
--
******************************************************************************
Registered Linux User Number 185956
FSF Associate Member number 2340 since 05/20/2004
Join me in chat at #linux-users on irc.freenode.net
Buy an Xbox for $149.00, run linux on it and Microsoft loses $150.00!
7:42pm up 10 days, 4:15, 1 user, load average: 0.05, 0.07, 0.03
- 4
- Error :could not initialize interface awt - Exception:java.lang.ExceptionInInitializerErrorHello
i had problems by the install of the german language pack 6.0.2.CF1
for a Lotus domino Server 6.0.2 CF1.
the System:
Acer altos 19000 Server
2X Pentium Pro 200 Mhz
512 MB Ram
OS windows 2000 Server SP4
the Update of the Notes Server was no Problem but when I tried to
install the Language Pack German (its an Java install Wizard ) there
coms the following Error Message :
Error :could not initialize interface awt - Exception:
java.lang.ExceptionInInitializerError
and if i installd the java software jre 1.3.1 standart the Aplet in
Systemcontrol could not be opend without anny Error Message.
what can I do?
Please help.
Thanks for Help
Stefan Germany
- 5
- src.zip of j2ee1.4 sdkHi,
I downloaded the j2ee1.4 sdk, but I can't seem to find the source files
in that package. They used to be in a src.zip file, or not? Anyway I
already looked at the Sun website, but I didn't find a URL to download
the source files from.
Kind regards,
Dirk
- 6
- Image Processing Problem. Need HelpHello, I am writing a web application with Java. There is a function that
user can upload a picture to server, and the server will resize it. I am
using the Java API to do this function. However, the result is not very
satisfactory. The resized image quanlity is very bad.
Can anyone reccommend that any way or tool can resize image with good
quality?
Please help. My boss needs me to complete this project this week.
Regards,
Chris
- 7
- what i do wrong???Hello All!
I think I have a mistake in my logical sequence of thoughts...
When I want to take influence on my JComponents (JTextField,
JCheckBox, etc.),
do I have to place a listener within the constructor???
My problem was the following. I wanted to get the values from my
different JTextFields an write them to any *.txt file. That did only
work, when I inserted a KeyListener who registered any changes in the
text fields. But my real problem is now, to get the values back from
the *.txt file an set them with setText(String) in the text fields.
This don't work.
I have seen in the NG, that there will be oft spoken about
revalidate() or repaint(), but that don't work anyway.
It does not matter, what I want to do - set a component enabled, or
disabled or what ever, I have to have an adequate listener within the
constructor so that the changes will be visible, isn't it that way???
For example:
public void any_method()
{
myTextfield.setEnabled(false);
}
// IT DON'T WORK
// ...but I don't know why. When I put it within the constructor, it
works...
I don't know what to to. I know it from MFC, there I could get
influence on my components in any method.
I don't know what I do wrong in Java.
(My program is an application with JFrame and SWING componets. I use
JTabbedPane and for each tab a Jpanel)
There must be a simple solution for my problem (I hope so).
Please led me out from this dead-end street.
Thanks in advance
Dariusz
- 8
- show a form from anotherPlease bear with me as I am pretty new to Java.
I am developing a Java Client application.
I have a frame with a button. When I click on the button, it hides the
current frame and opens another frame which is in another class.
When I click on a button on this second frame, I want to close it
(this.dispose) and show the first frame.
The question I have is:
From the second class frame, how do I reference the first frame?
I don't want to close the first frame as I want to keep any data entered.
TS
- 9
- How to receive events from a jcombobox in an internal Jpanel ??Good evening,
I've a Frame with two Jpanel, in Jpanel1 I've a Jcombobox and it's
listener while in Jpanel2 I've a JLabel where I want to write the
selected value of the Jcombobox,
Jpanel1 , Jpanel2 and the main frame are in 3 separate class and files,
this because I want to arrange a modular design.
My question is how I can receive in the main Frame the event coming
from Jcombox value changed in Jpanel1 ???
Thanks for your help
Antonio
www.etantonio.it/en
- 10
- Location of Temp Directory?I'm having an app developed for me and they are storing the files in a
newly created folder on the C: drive but I don't want to make directory
there. Is there not a way to get the temp variable for machine, like
%temp or %tmp? Thanks
- 11
- Extending the code
I have the following code but i want to add a function which will allow
me to count the number of vowels in the text file. I was wondering if
anyone would be willing to give me some help with this
[CODE]
import java.io.*;
import java.util.*;
public class App {
//Create BufferedReader class instance
public static InputStreamReader input = new
InputStreamReader(System.in);
public static BufferedReader keyboardInput = new BufferedReader
(input);
public static void main(String[] args) {
int[] lengths = new int[100]; //Runtime error if the file contains a
word of more than 100 characters
int longestWord = 0;
for(int i = 0; i < lengths.length; i++) {
lengths[i] = 0;
}
try {
System.out.println("Enter the name of the file you wish to read:
");
String fileName = keyboardInput.readLine();
FileReader file = new FileReader(new File(fileName));
BufferedReader myFile = new BufferedReader(file);
int numTokens = 0;
int numWords = 0;
int numChar= 0;
String line;
while ((line = myFile.readLine()) != null ) {
String[] words = line.split(" ");
numWords = numWords + words.length;
for (int i = 0; i < words.length;i++) {
numChar = numChar + words[i].length();
if(words[i].length() > longestWord) {
longestWord = words[i].length();
}
lengths[words[i].length()] = lengths[words[i].length()] + 1;
}
}
System.out.println("\nThere are " + numWords + " words in the text
file");
System.out.println("\nThere are " + numChar + " characters in the
text file");
System.out.println("\nThere length frequency of the words is as
follows:");
System.out.println("\nLength : Frequency ");
for(int i = 0; i <= longestWord; i++) { //Print frequencies only up
to the longest word
System.out.println(i + " :"+lengths[i]);
}
myFile.close();
}
catch(IOException iO) {
iO.printStackTrace();
}
}
}
[/CODE]
- 12
- Creating HTML files from Java accessing OracleHello folks,
I have some queries that folks would like to have as HTML reports. At
first I tried Oracle Reports but it's HTML output seems really poor
and not 508 compliant which is an issue for us. I'd like to use JAVA
(I use Jdev as my IDE right now.) but was hoping someone might have
some insight on the best way to tackle this. I guess I am looking for
methods that would make things easier rather than just outputting
print commands line by line. :)
Thanks folks...
- 13
- Any HID support for Java?Human Interface Device (mouse, etc)
Does anyone know whether java support the HID devices? (under MS
Windows)
I checked the document but did not see any. A google on this group
also returns little information.
Thanks a lot.
- 14
- Trusting ceritificates where CN does not match website hostnameJDK 1.4.2_08
I am getting the following exception:
javax.net.ssl.SSLHandshakeException:
sun.security.validator.ValidatorException: No trusted certificate found
at com.sun.net.ssl.internal.ssl.BaseSSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_az.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SunJSSE_ax.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.a(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.j(DashoA12275)
at com.sun.net.ssl.internal.ssl.SSLSocketImpl.startHandshake(DashoA12275)
at
org.apache.axis.components.net.JSSESocketFactory.create(JSSESocketFactory.java:224)
I have imported the certificate into the cacerts file via keytool -import.
However, my problem is that, the operator has setup a development and
production website, where the hostname naturally differs ... but both
development and production URLs have the same certificate.
That is, the production, Verisign-signed server certificate is the same
certificate on the development website. This ceritificate, therefore, has
the common-name ( CN ) set to the hostname of the production website.
Thus, even if I import the certificate into the cacerts file, because the
server certificate' CN does not match hostname of the website, I get the
exception above when connecting to their development website.
Apart from implementing DummyTrustManager as per this article:
http://www.javaworld.com/javatips/jw-javatip115.html
... which I'd rather not, is there any other workaround ??
- 15
- Reference and Garbage CollectionI'm not quite sure about what kind of references to an object determine
its "alive" quality and its readiness for garbage collection. For the
moment I understand that *any* living reference, including non-explict
of member classes, keep the object alive.
Would you agree that the follwoing class "NeverRelease" entails
instances which will never get prone to garbage collection?
class NeverRelease
{
Child1 child;
public NeverRelease ()
{
child = new Child1();
}
private class Child1
{
}
}
While would you also agree that instances of the following class
"AlwaysRelease" always become garbage because the member class is static
and hence does not take reference to the enclosing class?
class AlwaysRelease
{
Child2 child;
public AlwaysRelease ()
{
child = new Child2();
}
private static class Child2
{
}
}
|
|
|