Re: [Java] Development Kit Issues

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 27/03/06, Michael Yep <myep@xxxxxxxxxxxxxx> wrote:
Im not exactly sure what you are trying to do, but it sounds like the
java included with fedora is causing a problem.  So I installed my own
java from sun in my home dir, and here is the test I ran:

$ cat hello.java
public class hello {

public static void main(String[] args)throws Exception{
        System.out.println("Hi");
        System.exit(0);

}
}
$ /home/winston/jdk1.5.0_04/bin/javac hello.java
$ /home/winston/jdk1.5.0_04/bin/jar -cf myjar.jar hello.class
$ unzip myjar.jar
Archive:  myjar.jar
   creating: META-INF/
  inflating: META-INF/MANIFEST.MF
replace hello.class? [y]es, [n]o, [A]ll, [N]one, [r]ename: n
$ cat META-INF/MANIFEST.MF
Manifest-Version: 1.0
Created-By: 1.5.0_04 (Sun Microsystems Inc.)


Does this work for you?



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

--
Michael Yep
Development / Technical Operations
RemoteLink, Inc.
(630) 983-0072 x164

GPG Public Key
http://pgpkeys.mit.edu:11371/pks/lookup?op=get&search=0x126439D9

--
fedora-list mailing list
fedora-list@xxxxxxxxxx
To unsubscribe: https://www.redhat.com/mailman/listinfo/fedora-list

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"

--
A. Helmy

[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux