On 27/03/06, <b class="gmail_sendername">Michael Yep</b> <<a href="mailto:myep@remotelink.com">myep@remotelink.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Im not exactly sure what you are trying to do, but it sounds like the<br>java included with fedora is causing a problem.  So I installed my own<br>java from sun in my home dir, and here is the test I ran:<br><br>$ cat hello.java
<br>public class hello {<br><br>public static void main(String[] args)throws Exception{<br>        System.out.println("Hi");<br>        System.exit(0);<br><br>}<br>}<br>$ /home/winston/jdk1.5.0_04/bin/javac hello.java
<br>$ /home/winston/jdk1.5.0_04/bin/jar -cf myjar.jar hello.class<br>$ unzip myjar.jar<br>Archive:  myjar.jar<br>   creating: META-INF/<br>  inflating: META-INF/MANIFEST.MF<br>replace hello.class? [y]es, [n]o, [A]ll, [N]one, [r]ename: n
<br>$ cat META-INF/MANIFEST.MF<br>Manifest-Version: 1.0<br>Created-By: 1.5.0_04 (Sun Microsystems Inc.)<br><br><br>Does this work for you?<br><br><br><br>Jeff Mutonho wrote:<br>> On 3/27/06, Ali Helmy <<a href="mailto:alihelmy@gmail.com">
alihelmy@gmail.com</a>> wrote:<br>><br>>>ok, so i exported the path with<br>>>export JAVA_HOME=/home/ahelmy/jdk1.5.0<br>>><br>>>then i checked which jar, it said<br>>>/usr/bin/jar which is a link that points to /usr/java/jdk1.5/bin/jar which
<br>>>is the correct path<br>>><br>>>so then i remade the file using jar -cf, but the bloody bastard<br>>>(MANIFEST.mf) still says Created-By: 0.92-gcc<br>>><br>>>WTF should i do now?<br>
><br>><br>> Why don't you just kill (remove)  /usr/bin/jar and then do<br>> export PATH=$PATH:$JAVA_HOME/bin as already suggest .Do you really<br>> need the /usr/bin/jar syslink?<br>><br>><br>>>On 27/03/06, Kazimieras Vaina <
<a href="mailto:kazimieras.vaina@gmail.com">kazimieras.vaina@gmail.com</a> > wrote:<br>>><br>>>>I did some searching and found that java-1.4.2-gcj-compat-devel contains<br>>>>jar program. You may check if it's installed and remove it.
<br>>>>You can update the PATH as well, if You have exported JAVA_HOME<br>>>>previously:<br>>>>export PATH=$PATH:$JAVA_HOME/bin<br>>>><br>>>>hope that helps<br>>>><br>
>>>On Mon, 2006-03-27 at 06:26 -0600, Michael Yep wrote:<br>>>><br>>>>>As far as the java instalation goes, what i did was unpacked the zip<br>>>>>from sun, and then you just need to type
<br>>>>>export JAVA_HOME=/home/username/jdk1.5.0<br>>>>>its been working great for me since FC1<br>>>>><br>>>>>Ali Helmy wrote:<br>>>>><br>>>>>>The fedora solved project talks about how to make the JRE the default
<br>>>>>>run time environment... I already did that, by replacing the link for<br>>>>>>the java command in gcj by a link to the java command in the jdk<br>>><br>>>folder...<br>>>
<br>>>>>>However, that isn't my problem... my problem is that the JDK jar<br>>>>>>program, creates MANIFEST files usinf gcc... i don't know how the jar<br>>>>>>program does that, and i dont know which file is used to create
<br>>><br>>>MANIFEST<br>>><br>>>>>>files... i think it is an old link in the /usr/bin directory or some<br>>>>>>other old link that i have to replace from pointing at the gcc folder
<br>>><br>>>to<br>>><br>>>>>>the jdk folder...<br>>>>>><br>>>>>>Anyone know what files, libs or programs jar uses to create jar files?<br>>>>>>
<br>>>>>>On 27/03/06, *Kazimieras Vaina* < <a href="mailto:kazimieras.vaina@gmail.com">kazimieras.vaina@gmail.com</a><br>>>>>><mailto:<a href="mailto:kazimieras.vaina@gmail.com">kazimieras.vaina@gmail.com
</a> >> wrote:<br>>>>>><br>>>>>>    Hi,<br>>>>>><br>>>>>>    There is also /usr/sbin/alternatives command to solve Sun jdk and<br>>><br>>>gcj<br>
>><br>>>>>>    conflicts.<br>>>>>>    At<br>>><br>>><a href="http://fedorasolved.org/browser-solutions/sun-java-installation">http://fedorasolved.org/browser-solutions/sun-java-installation
</a><br>>><br>>>>>>    You may find some hints how to use the alternatives command.<br>>>>>><br>>>>>>    On Sun, 2006-03-26 at 20:26 -0500, Dan wrote:<br>>>>>>    > Ali Helmy wrote:
<br>>>>>>    > > Hey mate,<br>>>>>>    > ><br>>>>>>    > > Thanks for the information... i tried your suggestion about<br>>><br>>>the<br>>><br>
>>>>>    > > BufferedReader and it worked... however:<br>>>>>>    > ><br>>>>>>    > > Possibly there's still some gcj toolset stuff left. If you<br>>><br>
>>want to<br>>><br>>>>>>    > > solve this clean, check out the <a href="http://jpackage.org">jpackage.org</a><br>>>>>>    <<a href="http://jpackage.org">http://jpackage.org
</a>> < <a href="http://jpackage.org/">http://jpackage.org/</a>><br>>>>>>    > > site and download the rpm building package. It allows you to<br>>>>>>    create an<br>>>>>>    > > rpm file for the jdk which is compatible with "alternatives".
<br>>><br>>>This<br>>><br>>>>>>    > > way, you can switch the system JRE between gcj and the Sun JDK<br>>><br>>>(and<br>>><br>>>>>>    > > others).
<br>>>>>>    > ><br>>>>>>    > > umm, can you provide more detailed info?<br>>>>>>    > ><br>>>>>>    > > On 26/03/06, *Klaasjan Brand* < 
<a href="mailto:klaasjan@gmail.com">klaasjan@gmail.com</a><br>>>>>>    <mailto:<a href="mailto:klaasjan@gmail.com">klaasjan@gmail.com</a>><br>>>>>>    > > <mailto: <a href="mailto:klaasjan@gmail.com">
klaasjan@gmail.com</a> <mailto:<a href="mailto:klaasjan@gmail.com">klaasjan@gmail.com</a>>>><br>>><br>>>wrote:<br>>><br>>>>>>    > ><br>>>>>>    > ><br>
>>>>>    > ><br>>>>>>    > >     On 3/26/06, *Ali Helmy* < <a href="mailto:alihelmy@gmail.com">alihelmy@gmail.com</a><br>>>>>>    <mailto:<a href="mailto:alihelmy@gmail.com">
alihelmy@gmail.com</a>><br>>>>>>    > >     <mailto: <a href="mailto:alihelmy@gmail.com">alihelmy@gmail.com</a> <mailto:<a href="mailto:alihelmy@gmail.com">alihelmy@gmail.com</a>>>><br>
>><br>>>wrote:<br>>><br>>>>>>    > ><br>>>>>>    > >         Hey mates,<br>>>>>>    > ><br>>>>>>    > >         I need to inquire about two issues in particular
<br>>><br>>>regarding<br>>><br>>>>>>    > >         JDK... Firstly, so that you can understand my<br>>><br>>>background:<br>>><br>>>>>>    > ><br>
>>>>>    > >         - I'm running FedoraCore 5<br>>>>>>    > >         - In the FC installation, I installed the regular Java<br>>>>>>    > >         Development libs & tools (such as eclipse, gcj,
<br>>><br>>>...etc)<br>>><br>>>>>>    > >         - I downloaded and installed the JDK1.5 and the JVM<br>>><br>>>from Sun<br>>><br>>>>>>    > >         Microsystems, Inc.
<br>>>>>>    > >         - I removed all the java related bins in the /usr/bin<br>>>>>>    folder,<br>>>>>>    > >         then recreated the links to the new bins in the
<br>>>>>>    > >         /usr/java/jdk1.4.0/bin library to make the javac,<br>>><br>>>java, jar,<br>>><br>>>>>>    > >         javah... etc commands use the new JDK
<br>>>>>>    > ><br>>>>>>    > ><br>>>>>>    > >         Now here's my problems:<br>>>>>>    > ><br>>>>>>    > >         A) When i create a jar file (ex: jar -cf 
Anyfile.jar<br>>>>>>    > >         Anyclass.class), the manifest file created with it<br>>>>>>    > >         (META-INF/MANIFEST) lists:<br>>>>>>    > >         Manifest-Version: 
1.0<br>>>>>>    > >         Created-By: 0.92-gcc<br>>>>>>    > >         where you see, that my problem is that the manifest<br>>><br>>>file was<br>>><br>>>>>>    > >         created by "gcc" apparently, and not 
1.5.0_01 (Sun<br>>>>>>    > >         Microsystems Inc.) which should have been the case...<br>>>>>>    so, how<br>>>>>>    > >         can i change the manifest file maker?
<br>>>>>>    > ><br>>>>>>    > ><br>>>>>>    > >     Possibly there's still some gcj toolset stuff left. If you<br>>>>>>    want to<br>>>>>>    > >     solve this clean, check out the 
<a href="http://jpackage.org">jpackage.org</a><br>>>>>>    <<a href="http://jpackage.org">http://jpackage.org</a>> < <a href="http://jpackage.org">http://jpackage.org</a>><br>>>>>>    > >     site and download the rpm building package. It allows you
<br>>><br>>>to<br>>><br>>>>>>    > >     create an rpm file for the jdk which is compatible with<br>>>>>>    > >     "alternatives". This way, you can switch the system JRE
<br>>><br>>>between<br>>><br>>>>>>    > >     gcj and the Sun JDK (and others).<br>>>>>>    > ><br>>>>>>    > ><br>>>>>>    > >         And the Note I Get after compiling with (javac
<br>>>>>>    > >         -Xlint:deprecation ...etc):<br>>>>>>    > >         [ahelmy@Laptop Java]$ javac -Xlint:deprecation<br>>>>>>    > >         ReadingFromConsole.java
<br>>>>>>    > >         ReadingFromConsole.java:12: warning: [deprecation]<br>>>>>>    readLine()<br>>>>>>    > >         in java.io.DataInputStream has been deprecated
<br>>>>>>    > >                                 UsrInput =<br>>><br>>>IStream.readLine();<br>>><br>>>>>>    > ><br>>>>>>    > >         So, does anyone know a replacement to read directly a
<br>>>>>>    line of<br>>>>>>    > >         user input from the ( <a href="http://System.in">System.in</a> < <a href="http://System.in">http://System.in</a>><br>>>>>>    <
<a href="http://System.in">http://System.in</a>>) through a<br>>>>>>    > >         console? Because .readline( ) was the one listed in<br>>><br>>>the API<br>>><br>>>>>>    > >
<br>>>>>>    > ><br>>>>>>    > >     It's in the API documentation:<br>>>>>>    > ><br>>>>>><br>>><a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInputStream.html#readLine()">
http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInputStream.html#readLine()</a><br>>><br>>><<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInputStream.html#readLine()">http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInputStream.html#readLine()
</a><br>>><br>>>>>>    > ><br>>>>>><br>>><<a href="http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInputStream.html#readLine%28%29">http://java.sun.com/j2se/1.4.2/docs/api/java/io/DataInputStream.html#readLine%28%29
</a><br>>><br>>>>>>    > ><br>>>>>>    > >     Wrap the InputStream in a BufferedReader and you'll get<br>>><br>>>rid<br>>><br>>>>>>    of the
<br>>>>>>    > >     deprecation (and gain compatibility with different<br>>><br>>>character<br>>><br>>>>>>    sets).<br>>>>>>    > ><br>>>>>>    > >     Klaasjan
<br>>>>>>    > ><br>>>>>>    > ><br>>>>>>    > >     --<br>>>>>>    > >     fedora-list mailing list<br>>>>>>    > >     
<a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a> <mailto:<a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a>><br>>>>>>    <mailto: <a href="mailto:fedora-list@redhat.com">
fedora-list@redhat.com</a> <mailto:<a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a>>><br>>>>>>    > >     To unsubscribe:<br>>>>>><br>>><br>>><a href="https://www.redhat.com/mailman/listinfo/fedora-list">
https://www.redhat.com/mailman/listinfo/fedora-list</a><br>>><br>>>>>>    > ><br>>>>>>    > ><br>>>>>>    > ><br>>>>>>    > ><br>>>>>>    > > --
<br>>>>>>    > > A. Helmy<br>>>>>>    > Check out the first and second replies of this post:<br>>>>>>    > <a href="http://www.fedorasolved.com/viewtopic.php?t=120">
http://www.fedorasolved.com/viewtopic.php?t=120</a><br>>>>>>    > It's for FC4, but the same thing works for FC5.<br>>>>>>    > -Dan<br>>>>>>    ><br>>>>>>
<br>>>>>>    --<br>>>>>>    fedora-list mailing list<br>>>>>>    <a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a> <mailto: <a href="mailto:fedora-list@redhat.com">
fedora-list@redhat.com</a>><br>>>>>>    To unsubscribe:<br>>><br>>><a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list</a><br>>>
<br>>>>>>    <<br>>><br>>><a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list</a>><br>>><br>>>>>><br>>>>>>
<br>>>>>><br>>>>>>--<br>>>>>>A. Helmy<br>>>>>><br>>>>><br>>>>>--<br>>>>>Michael Yep<br>>>>>Development / Technical Operations
<br>>>>>RemoteLink, Inc.<br>>>>>(630) 983-0072 x164<br>>>>><br>>>>>GPG Public Key<br>>>>><br>>><br>>><a href="http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x126439D9">
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x126439D9</a><br>>><br>>>>--<br>>>>fedora-list mailing list<br>>>><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a>
<br>>>>To unsubscribe:<br>>><br>>><a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list</a><br>>><br>>><br>>><br>>>--
<br>>>A. Helmy<br>>>--<br>>>fedora-list mailing list<br>>><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>>>To unsubscribe:<br>>><a href="https://www.redhat.com/mailman/listinfo/fedora-list">
https://www.redhat.com/mailman/listinfo/fedora-list</a><br>>><br>>><br>><br>><br>><br>> --<br>> "All I ask is a chance to prove that money can't make me happy."<br>><br>> Jeff  Mutonho
<br>> Java/J2EE Developer<br>> mob    : + 27 82 907 6420<br>><br>> GoogleTalk : ejbengine<br>> Skype        : ejbengine<br>> Registered Linux user number 366042<br>><br><br>--<br>Michael Yep<br>Development / Technical Operations
<br>RemoteLink, Inc.<br>(630) 983-0072 x164<br><br>GPG Public Key<br><a href="http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x126439D9">http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x126439D9</a><br>
<br>--<br>fedora-list mailing list<br><a href="mailto:fedora-list@redhat.com">fedora-list@redhat.com</a><br>To unsubscribe: <a href="https://www.redhat.com/mailman/listinfo/fedora-list">https://www.redhat.com/mailman/listinfo/fedora-list
</a><br></blockquote></div><br>Ok, I don't really know any thing much about export & PATH stuff, so can some one point me out in a simple guide here? I already removed te syslink in /usr/bin/jar and redid the link to make sure it points to the /usr/java/jdk1.5/jar, but still manifest results in "created by gcj"
<br clear="all"><br>-- <br>A. Helmy